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 > Opinions on Table Structure Needed Please.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-13-11, 18:18
ron_j_m2002 ron_j_m2002 is offline
Registered User
 
Join Date: Dec 2009
Posts: 8
Opinions on Table Structure Needed Please.

Hello all.

Looking for some advice for a table design for a db2 class I am in the middle of.
The project is a database for a car repair shop.
Here is what I have so far.

Code:
CUSTOMERS (Customer_ID, Customer First Name, Customer Last Name)
VEHICLES (Vehicle_ID, Vehicle Make, Vehicle Model, Vehicle Year)
CUSTOMERS_VEHICLES (Customer_ID, Vehicle_ID)
MECHANICS (Mechanic_ID, Mechanic First Name, Mechanics Last Name)
SERVICEWRITERS (ServiceWriter_ID, Service Writer First Name, Service Writers Last Name)
WORKORDERS (WorkOrder_ID, Work Order Date) 
JOBS (JOB_ID, Job Description, Job Price)
CUSTOMERS_WORKORDERS (Customer_ID, WorkOrder_ID)
SERVICEWRITERS_WORKORDERS (ServiceWriter_ID, WorkOrder_ID)
MECHANICS_WORKORDERS (Mechanic_ID, WorkOrder_ID)
JOBS_WORKORDERS (WorkOrder_ID, JOB_ID)
PARTS (Part_ID, Part Name)
JOBS_PARTS (JOB_ID, Part_ID, Quantity)
SUPPLIERS (Supplier_ID, Supplier Name)
PARTS_SUPPLIERS (Part_ID, Supplier_ID, Price)
PARTMAKE (PartMake_ID, Part Make)
PARTMODEL (PartModel_ID, Part Model)
PARTYEAR (PartYear_ID, Part Year)
PARTS_PARTMAKE (Part_ID, PartMake_ID)
PARTMODEL (Part_ID, PartModel_ID)
PARTYEAR (Part_ID, PartYear_ID)
I am somewhat new to database, and I feel like I have an extraordinary amount of many to many relationships.
Does this look somewhat correct, or am I way off base here?
I am afraid I am overcompensating things.

Thanks for any input.
Reply With Quote
  #2 (permalink)  
Old 10-18-11, 17:15
optimus203 optimus203 is offline
Registered User
 
Join Date: Oct 2011
Location: Connecticut
Posts: 3
I think your entity and relation names should be singular (FYI, I'm not an expert - still taking my db1 class).
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