Page 1 of 1

simple database structure question

Posted: Mon Jul 28, 2003 4:52 am
by tangoman
I'm trying to write a simple database to keep track of DVDs, and am having a little trouble visualising the structure. I could do with a little push in the right direction from someone who knows what they're doing :)

The problem:

A group of us have joined an online dvd rental site. We each have x requests that are submitted to the site at various occasions. We need to keep track of who has requested what. We also lend DVDs to each other and need a way of keeping track of who's got which DVD, and possibly when it was lent.

So, it's sort of a dual purpose application. Keeping track of who's requested a DVD for rental, and who's borrowed one from a friend.

This is the first time I've done this since uni (about 7 years ago!) and I'm, well, rusty would be an understatement :)

Posted: Mon Jul 28, 2003 8:16 am
by Stoker
...Doing such is likely to be in conflict with the terms and rental agreement you have with that site..

Posted: Mon Jul 28, 2003 8:23 am
by tangoman
I don't see how. We just want to make sure nobody rent the same DVDs. You're telling me it's against their T&Cs to rent a DVD and invite friends over to watch it?

Sticking to the issue

Posted: Wed Jul 30, 2003 2:13 pm
by illiquid050
Let's see what you have so far? Or have you not started?

I'm a total novice but I can take a stab at it.

dvdTable
ID__Title_____ LocationId____RentedById___DueDate
1___Starwars____1___________2___________050403
2___Godfather___1___________2___________050403
3___TombRaider_2___________3____________050603

LocationTable
LocationId__LocationName
1___________1211 Front St
2___________1280 Front St

RentedBy
RentedById____RentedByName
1______________Greg
2______________Tony
3______________Rachel

I think this is how I would go ahead and start... but then again I've just started learning so I'd love to get a confirmation from someone with more experience.

Posted: Thu Jul 31, 2003 7:31 am
by tangoman
Well, currently I have 4 tables

dvd:
id
title
owner
location
comments

member:
id
name

loan:
id
memberid
dvdid
date

rentalrequest:
memberid
dvdid
date
status

I've got the whole thing up and running as a searchable database of dvds. Now I just need to add the rentalrequest and loan sections.

I'm having bucketloads of fun trying to work it all out :)