data structures versus data bases???

Terry Reedy tjreedy at
Sat Nov 10 16:21:19 CET 2001

"husam" <husalwan at> wrote in message
news:3BED344B.5050703 at
> hi,
> im trying to learn programming with python. one of the things
> me is the difference between data structures and data bases. so, can
> tell me what the difference is between them?

Examples of data structures: set, list (stack, queue, deque are
specialized examples), dictionary, tree, heap, matrix.  A particular
organization of data with associated methods of operation upon them.
An abstract data structure is defined by the interface of the
methods -- what you can do -- rather than by the bit-by-bit
organization of any particular implementation of that structure.

Database: a collection of data on a particular topic using some data
Example: phone book, address book, a business database of suppliers
and customers, product and services, purchases and sales.
Relational database: a set of tables, each of which is a set/list of
records, each of which is a set/list or association of named fields.

Hope this help a bit.

Terry J. Reedy

More information about the Python-list mailing list