1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Movie Project Database

Discussion in 'SQL PL/SQL' started by migoysplace, Oct 17, 2012.

  1. migoysplace

    migoysplace Guest

    Hey,

    I am working on a project for a movie database
    I have 3 entities ( Movie, Theater, TimeShow)
    The showtime is going to be my intersection entity for this database. The ID's for Movie and Theater as the foreign composite keys

    I'm just a little confuse on the normalization part for the Timeshow intersection entity since every movie has 2 different start times

    My TimeShow tables looks like this

    THEATERID
    01
    MOVIEID
    02
    SHOWTIMES
    5:00pm

    THEATERID
    01
    MOVIEID
    02
    SHOWTIMES
    10:00pm


    Does this violate any normalization rules? Do i have to make all SHOWTIMES as part of the composite key too?
     
  2. dariyoosh

    dariyoosh Forum Advisor

    Messages:
    118
    Likes Received:
    19
    Trophy Points:
    260
    Hello there,


    You can find a very interesting article about Normalization here,

    http://www.orafaq.com/wiki/Normalization

    When you say
    What do you mean exactly? that is, at 5:00 PM one can watch a movie or a
    theater at the same place, at the same time?


    Regards,
    Dariyoosh
     
  3. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,347
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    One move is scheduled for multiple times at a given theatre; this is the way it is in real life as we all should know. Foreign keys are not unique entries as they can be associated with more than one set of data; if this were a primary key on the timeshow table then, yes, all fields would need to be included to allow multiple showings for a given theatre and location. As you have it no constraints are violated and your definition is fine.