Jump to content
Larry Ullman's Book Forums

CalebCurry

Members
  • Posts

    6
  • Joined

  • Last visited

Posts posted by CalebCurry

  1.  

    What you choose is really up to you. I think both solution one and two are good. Read my post and determine what your needs are first. Number fire (mine) is of course a combination of your solution one and two. Good job, btw. This table design sounds well planned.

     

    I really need to know why ENUM or SET are bad options... Do you have the ability to explain farther why they are a bad choice? In the book I see Larry use it for male or female, but then again, those won't ever change, or anything.

    For your 4th option, do you mean like this?

     

    Song table - song ID, name, genre.

    genre table - genre name

    song genres table - Song ID, Genre ID.

     

    to allow for a main genre and also some extras? if not can you clarify?

  2. Let's say I have a database for music. it has an ID, the name of the song, and all that other information, and then it has style. (such as rock, rap, country...)

    Would it be best to:

    1. make a table of available styles and link it to the table with a foreign key,

    2. make a table for styles and a table for music, and have an intermediary table listing all the styles for each song (to allow for multiple styles)

    3. Use the SET or ENUM datatype to allow for specific choices.

     

    Please explain why. Thank you!

  3. How does This table allow for multiple authors for one book?

    if it doesn't pleae tell me how to implement it.

    (page 176, chapter 6 - normalization)

     

    PUBLISHERS

    publisher id

    name

    address1

    address2

    city

    state

    zip

     

    BOOKS

    book_id

    publisher ID

    title

     

    BOOKS AUTHORS

    book_id

    Author_id

     

     

    AUTHORS

    author_id

    author

     

     

    I'm not sure how everything ties together,...please explain it more. why doesn't BOOKS reference to author? like if you were searching it...shouldn't the author be a foreign key so it's in the books table??

    also, why are all the ids with an underscore except publisher id? I'm not sure if that matters.

×
×
  • Create New...