I'm trying to get my head round this mind boggling stuff they call Database Design without much success, so I'll try to illustrate my problem with an example.
I am using MySQL and here is my question:
Say I want to create a database to hold my DVD collection. I have the following information that I want to include:
- Film Title
- Actors
- Running Time
- Genre
- Description
- Year
- Director
I would like to create relationships between these to make it more efficient but don't know how.
Here is what I'm thinking for the database design:
Films Table => filmid, filmtitle, runningtime, description
Year Table => year
Genre Table => genre
Director Table => director
Actors Table => actor_name
But, how would I go about creating relationships between these tables?
Also, I have created a unique ID for the Films Table with a primary key that automatically increments, do I need to create a unique ID for each table?
And finally if I were to update a new film into the database through a PHP form, how would I insert all of this data in (with the relationships and all?)
thanks for any help you can give, Keith