[DB-SIG] DB scheme question
dieter at handshake.de
Mon Dec 13 07:40:59 CET 2010
John Q. Public wrote at 2010-12-11 10:18 -0800:
>Before I can ask my question, I have to present the data I work with.
>My goal is to create a (very) simple version control for a unique type of
>The file has three parts:
>1. atoms - set of attributes (e.g. name, id, etc). Each version of the file
>contains up to thousands of atoms
>2. molecules - has some attributes (e.g. name, id, etc) and a group of atoms
>(list of atoms ids). Each molecule can contain zero to hundreds of atoms.
>3. matter - a group of molecules (a matter to molecule is what molecule is
>to atom - and no, it's not homework of some kind....)
>Each file version is only slightly different from the previous version
>(changes in only few atoms, molecules and\or matter).
I am an object enthusiaste and therefore tend to regard the
world in object oriented terms.
Therefore, I would model your version problem as a set of objects
and then use an object relational mapper (e.g. "SQLAlchemy") to
map this to the relational model.
If there is no need to avoid redundancy across versions,
the version model could be extremely simple: each version
contains copies of its components.
More information about the DB-SIG