How to maintain One to Many Relationship in database ?? Which is the appropriate process??
Like, I am inserting library information from a form. Library name,library description,library address fields are in text boxes. There is a group of check boxes which are representing which books are available in that library. Assume I have three table 'library','books','library_book_relation'.
In this secenerio, Which is the exact process ??Do I have to insert data into two tables (library,library_book_relation) with 2 query like 1. insert to into library
.... and 2. insert to into library_book_relation
.... simultaneously, Or there is any other method to do the job ??
What I'll have to do (query) when I would like to retrieve library information from database ?? Which method does software world follow ??