database design help

B

Brian Blais

Hello,

I am trying to design a system for people to submit a series of documents to a
project. I want users to have the ability to submit updates to any documents, so
that there should be a history (or sequence) for each document. I think in terms of
python data structures, so the relational database organization is not all that clear
to me (so I am trying to learn it!). I am using buzhug, but the concept should be
the same in any rdb.

So my conceptual structure would look something like:

project1:
document 1, document 1a, document 1b
document 2
document 3, document 3a

project 2:
document 4, document 4a

etc...

I want to be able to query the history of any single document, so I can get a list of
document 1, 1a, and 1b. or document 3 and 3a, etc...

So I have something like this (omitting a few lines, for clarity) to set up the
record structure:

users.create(('name',str),
('email',str))

project.create( ('description',str),
('label',str),
('creation_date',date),
('submitter',users))

documents.create(('filename',str),
('submit',date),
('submitter',users),
('type',str),
('project',project))

with this structure, I can get a project with a series of documents, but each
document doesn't have a history. My first thought (with Python data structures) is
to use a list, but that's not an rdb concept. Do I make something like:

document_sequences.create(('name',str),('project',project))

and then change documents so that it contains not only a project field, but a
document_sequence field? Am I thinking about this correctly?

Is there a resource I can read that goes through any of this?


thanks,


Brian Blais
 
J

Jim

It sounds to me that you want Subversion. There is a Python binding
if you have anything you'd need to do beyond what already comes with
the system (there are a variety of web interfaces already out there,
for instance, so I don't know that you'd need to do anything extra).
Just google "subversion".

Jim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top