If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > design question for a simple car sharing app

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-14-08, 13:44
sthapit sthapit is offline
Registered User
 
Join Date: Sep 2008
Posts: 4
design question for a simple car sharing app

We live in a house with 5 people and we share 2 cars. It's been working out ok but we thought it would be more efficient (and cool) to write a little application where we "checkout" cars a la zipcar. We're not looking to build anything fancy - just a basic registration system that (a) lets us know when the cars are available and (b) lets us reserve a car. I'm thinking of something like this:

users (id, email)
cars (id, title)
hours(car_id, day_of_week, start_time, end_time)
reservations (user_id, car_id, date, start_time, end_time)

(The hours table needs to be there because our garage is open only within certain hours during the day). Am I thinking of the problem correctly? Any suggestions would be greatly appreciated before I spend the next few days (or weeks?) on this.
Reply With Quote
  #2 (permalink)  
Old 09-14-08, 14:19
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
suggestion: in the reservations table, replace 3 columns, date, start_time, end_time, with 2 columns, start_datetime and end_datetime

otherwise, your tables look fine
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 09-22-08, 03:04
varmarvd varmarvd is offline
Registered User
 
Join Date: Sep 2008
Posts: 2
R V D

nice thought
Reply With Quote
  #4 (permalink)  
Old 09-22-08, 03:08
varmarvd varmarvd is offline
Registered User
 
Join Date: Sep 2008
Posts: 2
the hours table can alone be sufficient if u can accomodate a column which specifies the state whether its past or presently running or is it reserved for future.....
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On