Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2004

    Newbie question about design of a table

    I have heard that if a field is going to repeat itself multiple times in 1 table that it then should get its own table. Example:

    I have been using a "book collection" as practice to understand database concepts and relationships. I have a book collection and if in one table I put the tittle, author, isbn, edition (hardcore/soft), read/unread (if I read it yet), topic (horror, fantasy etc..)

    Now lets say thats all the fields I care to have on my database... am I right to think that the following should have their own tables?


    Or, is there more or less? Thx for any help.

  2. #2
    Join Date
    Sep 2003
    The extremely Royal borough of Kensington, London

    In many cases yes. However, there are situations when value checking can be accomplished through other means such as a check constraint. In your case I would create a new table for 'authors' and 'edition', while enforcing that the value for 'Read/Unread' is valid through a check constraint. Ofcourse, there is nothing to stop you from having a lookup table for each such field.
    Last edited by r123456; 07-20-04 at 22:50.
    Bessie Braddock: Winston, you are drunk!
    Churchill: And Madam, you are ugly. And tomorrow, I'll be sober, and you will still be ugly.

  3. #3
    Join Date
    Jun 2004
    Seattle, WA
    I agree with Robert. An author table would be good, especially if you have little more detail about each Author. If not you are just thinking about just having the name, think of this...Is it easier to type (copy &paste) an author 18 times or just put a number which Acess made, or EVEN a value you defined, such as first three letters of an author's first and last name?
    My Blog

Posting Permissions

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