View Full Version : Need Help With Database!!!!!


yan89
06-13-2007, 03:12 AM
Hi, I'm a high school student and have to create a database for a video shop. I'm having trouble with it and hope you guys can help me :)

There're 4 tables in the database: customer, staff, video, rental

1) There's a "days late" field in the rental table. Can the number in the field change automatically referring to the "due date" and the date on the computer?

2) If Q1 is possible, what about the late charges for overdue videos? I don't want to do the calculation manually....

Rich
06-13-2007, 03:48 AM
As far as the days late is concerned use a query and the DateDiff function to return the value. As far as the video db this topic comes up here regularly, use the search button and you should find many posts on the topic

ColinEssex
06-13-2007, 04:22 AM
You shouldn't store the "DaysLate" value - it should be calculated (as Rich said) when you need it using the query.

Also assuming you will have more than one copy of a some videos - you'll need to safeguard against not booking out more copies than you have in stock.

Col

Uncle Gizmo
06-13-2007, 04:30 AM
you'll need to safeguard against not booking out more copies than you have in stock.

And further to this, I understand there is a good example of how to do stock Control on Allen Brown's web site. May be more than you need for a college project though!

comment added as an afterthought:
(thinking about it, you probably don't need stock control?)