Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with database

Status
Not open for further replies.

iissa

Programmer
Feb 1, 2001
2
GB
I am trying to create a database for a video store
but i am having great difficulty with it.
i want to create a database that will store the movie(information), and then say if that movie has 100 copies i want information about the copy number as well.
the way i thought that would work, was as soon as i get a new movie i enter the information, then the information is entered into the movie database and also a new table is create for that particular title, with say a 100 entries for each copy.
but i am having trouble linking the three tables together
can some one help me
 
Confused.

I only see two tables in your discussion. The way the discussion appears to be describing them, doesn't appear to be a relational model. I would think I would have one table to more-or-less show the inventory (MovieID, DateAvail, Title, NumCopies, SerialNumLow, SerNumHi) and a second, (RentalDate, MovieId, SerialNumber, DueInCategory, CustomerID), a third for the customer Info (CustomerID, Name, Addr, Phone, ...)

On entry of a new Movie, let the App assign SerialNumLow the next Sequential Value, and the SerialNumHi would be calculated by by adding the NumCopies to SerialNumLow. Now, you automatically have a tracking process for each 'movie' available. I'm sure You have additional fields which I havn't included, this is just a thought in progress ...



MichaelRed
mred@duvallgroup.com
There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top