SQLTeam.com | Weblogs | Forums

Need help with a Database (I'm new to this)


#1

Hi guys, I've been tasked to form a database for a rental shop. Right now I have:

Customer: custno(PK), name, address, DVDs, registration
Rental: dvdno(FK), custno(FK), hiredate, returndate
DVD: dvdno(PK), filmno, dateofpurchase
Film: filmno(PK), title, year, genre, director(FK), star(FK)
Star: Starno(PK), name, birthplace, birthyear, deathyear
Director: directorno(PK), name, birthyear, deathyear

However, I have been tasked with having more than one star per film. Right now my database only allows one star per film. Do you have any idea how I would amend this? Would it require an extra table?

Thanks


#2

This sounds like homework or some other type of class assignment.

We can't do that for you, but we can help guide you to the solution.

Typically when you need a one-to-many relationship in table design, you will have to add another table, an "intersection" table that has the key from each of the other tables plus any additional column data that relates just to that specific combination of data.


#3

Cheers @ScottPletcher ! This seems to have worked !

Just to add that this is not a class assignment! Just challenging myself to learn new things and found this problem online :slight_smile: