Results 1 to 3 of 3

Thread: database design

  1. #1
    Join Date
    Feb 2013

    database design

    Hello, I'm quite new to databases and am doing a project which is creating a library management system and just want some advice.

    There will be different types of media available (book,journal,dvd).

    My question is which method would be better,

    1. Have a media table where all common attributes are located


    2. Have tables for each media type?

    And would I have to make a table for the multiple copies of each media?

    Any advice would be appreciated and thanks in advance.
    Last edited by TeaJay; 02-26-13 at 20:26.

  2. #2
    Join Date
    Feb 2013
    Used the first method and got this:

    I'm still not sure how to do the attributes for each media that are only for that specific type

    eg. book has isbn but journal has issn, etc

  3. #3
    Join Date
    Jun 2003
    There's no good way to handle this, unfortunately.
    If most attributes are shared between media, and you don't anticipate adding more media types, then store all the attributes in the same table and leave the unused ones as NULLs.

    Otherwise, consider creating an XML column to store the media-specific data.
    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