I have created two tables in SQL.
First one is for the movies (movie title, id, description, year).
Second one is for the directors (director name, id, birthday).
Now the first thing I'm doing right now is that I can add a new movie and a new director separately. So let's say at first I insert a new movie and then I insert a new director. What I want to do is that having inserted the movie before the director I want to be able to insert a new director and also create a relation between the two.
So at first I have the movie insertion. Where I can insert the title, description and the year.
Then I have the director insertion. Where I can insert the name of the director and his/her birthday. And also I should have a dropdown menu with the existing movies. So I could choose a movie for the director.
How can I create a relation between those two? I already have the thing built up, kinda so right now I have the insertions separately and I also have the dropdown with the existing movie titles. What I don't know is how to connect those two so if I want to display the movie I could also display the right director for it. And same thing goes when I need to add more than one directors for the movie, so then it would also display those two directors for that movie.
Okay, I hope You can understand what I meant. Thanks.