Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2008

    Student needs a little help for inheritance

    First of all hi everyone, that's my first post in the forum after having read it for a while.
    I am preparing a little project for uni, I need to provide and build a db with Access 2003 and then build a little 2005 project to manage data.
    Here is the topic. there is a small library that could lend books,magazine,videos

    I read about inheritance so, one solutions I came up with is creating a Item table with common fields and three sub tables for books, magazines and videos. Now I joined these three tables by linking 1:1 with the PK of the Item table. I can't figure out how then to simple add a new book, new magazine and new videos. I know I could put all the fields in a table to make things easier, but I think that my solution is more scalable and it will allow to have for example other kind of items in the future. I am stubborn and I want to try to make it work, can anyone give me an help.
    I attached a relationship img
    Maybe if someone could send me a little db in Access 2003 with just a couple of fields for each sub table will help me to try these solutions

    Please this stuff is quite urgent, all the help is appreciate
    Attached Thumbnails Attached Thumbnails SolutionTwo.jpg  
    Attached Files Attached Files

  2. #2
    Join Date
    Jun 2003
    Good Lord. Make your life easier and combine those into a single "Media" table.
    How would you extend your design to allow them to loan CDs, scripts, newspapers, public documents, etc?
    Do not be overly concerned with leaving nulls in columns that do not apply to all media. The last time disk utilization was an important factor was about 20 years ago.
    If it's not practically useful, then it's practically useless.

    blindman "sqlblindman"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts