Question : Video Rental Database

Hello I have never used access before, and i have now been given an assignment in it , The assignment is to create a database for a video rental store, I have started the Tables,

CUSTOMER Table
CustomerID (autonumber)
Date Joined /date/time
Surname /txt
FirstName /txt
Address 1 /txt
Address 2 /txt
Town /txt
County /txt
Postcode /txt
PhoneNum /txt
References /txt

RENTALtable
Rental ID (autonumber)
Movie ID (txt)
Rental Date (date/time)
Rental In (date/time)
Rental Price (txt)

VIDEO:
Movie ID (autonumber)
Title /txt
Type (ie tape,dvd
Rental Cost (currency)
Rental Days (number)
Payments /txt
Payment Methods /txt
Payment Amount /txt
CC# /number
CC Expdate /number
PaymentMehtod /txt
PaymentMethodID /txt
Creditcard yes/no /txt

VIDEO STORE:
customerID  (autonumber
Movie ID /txt
RentalDate /txt
paymenttype /txt
totalcost /txt
Total Cost /txt

Just want to know if these tables are ok before I go anywere further,

The next thing i will be doing is the relationships , so if you know what they will be please commnet or do i do something else before the relationships>?

Thanks Pete

Answer : Video Rental Database

okay first up, spaces in column names, ditch 'em, hell spaces in any names get rid of.

Credit Card number, I'd go a text field here and put an input mask on it maybe. No point in storing things as numbers if they will only be used as text. Personal preference however.

Why are there individual payment info in the video table, This ought to be a lookup table for the videos you have yes?

I think this data should be in payments.

Watch your ID and foreign key columns. This is contentious (i.e. a lot fo people think I am wrong) but I think and ID column should be an ID column, A foreign key column should be called FK.

Make sure your ID - FK columns are the same data type, you have some foreign keys which are text.

Also I always put structural columns at the top of the table, these are the columns you will care about, the rest is stuff for users. Makes life easier for your joins and so on.

I see you have parameters working for the query (nice) remember you can use references to a form as a parameter (this will help alter when you build your forms.

for example instead of

[Enter Type]

you could have:

= Forms!YOPURFORMNAME.YOURCONTROLNAME

and you can make the users  a ncie little combo box for them to choose a valid type, saves them making typos.

Now your forms a bit boring, this is because your queries aren't joining tables. You gotta join some tables up. for example Rental would be nice if it had the custoemr details rather than a number right?

Try changing the underlying query to have the three tables (Rental, customer, and Video) and whacking some of the new fields in there (to see available fields click view / field list), Users don't like numbers, remember they are pretty stupid as a rule ;)

You could also play with setting up some combo boxes and or list boxes. A list box on this form showing payments made by the customer would be pretty cool.

Drop a list box and play with the rowsource, also use the criteria explained above where you reference a forms values.

Don't forget to use

me.YOURLISTBOXNAME.requery

in the on current event of your form.

Hope that's enough for you to go on with ;)

but you aren't doing any joining.

What you here

Random Solutions  
 
programming4us programming4us