data structures versus data bases???

Laura Creighton lac at strakt.com
Sat Nov 10 11:57:19 EST 2001


> hi,
> im trying to learn programming with python. one of the things confusing 
> me is the difference between data structures and data bases. so, can you 
> tell me what the difference is between them?
> 

In common usage, a data structure is something you make to put your
data in.  A class, a list, a dictionary, anything you can put data in.

A database is somebody else's data structure(s), possibly already full
of data.  You can buy them from people like Oracle, or get free ones
like Postgres, but they all share the property that they are _somebody
else's box of stuff_.  If you want to use the data in a database, you
have to use whatever rules the somebody else came up with on how to
get at and use the data.  They are traditionally quite complicated,
but do not have to be.

All databases are data structures.  You could go write one.  Then you
would get to be the somebody else, whose data structures made up your
database.

Laura Creighton





More information about the Python-list mailing list