Hello everyone, I'm wondering how I would represent the following case in a database.

I have a general content class that contains generic information about a piece of 
content. I then have more specific classes such as document (which will inherit the 
content class). How would I go about relating the two in the physical database? So far 
classes look like so:

--------------
|  content   |
--------------
| -contentID |
| -title 
| -dateAdded |
| -etc...    |
|------------|
| +add(s)    |
| +etc...    |
|            |
--------------

--------------
|  document  |
--------------
| -documentID|
| -fileName  |
| -fileSize  |
| -etc...    |
|------------|
| +upload(s) |
| +etc...    |
|            |
--------------

How do I represent the 'document' is a 'content' relationship in the DB? Would the 
content class contain the ID of the more specific class (ID of the document)?

And please excuse me if my ASCII art isn't up to par :)

Thanks,

Phillip
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to