Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2009

    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.

    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)
    MECHANICS_WORKORDERS (Mechanic_ID, WorkOrder_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.

  2. #2
    Join Date
    Oct 2011
    I think your entity and relation names should be singular (FYI, I'm not an expert - still taking my db1 class).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts