need help in DB design

  • Hello everyone, i have some requirements for the project, i designed a db , but also need help to confirm it, is it fine or not? and need help to make it correct coz facing some problem is 2 points of the req, so is there anyone who helping me in this regard. i know this is not good to ask help for db design but i know in this site, many gurus are present so i need help from these ones.

    reply me with ur email id, so i want to share the requirements also with u for further assistance. or if anyone need it on this , then reply me i will post the requirements in this forum also.

    Thanx in Advance.

  • Please post it on this thread so everybody can see it. Obviously it will help if you also explain how and for what the database is going to be used.

    John

  • Here are the Requirements:

    Following parts of the project are:

    1.Customers Records

    2.Vendors Records

    3.Invoice

    4.Inventory

    Customers Records:

    In Customer Record Form following field should be entered

    1.Customer ser name like “Mr” or “MISS”

    2.Customer Name

    3.Customer Phone

    4.Mobile

    5.Address

    6.No of Vehicle Customer have

    7.Vehicle Model

    8.Vehicle Color

    9.Veh No

    10.Veh. Frame No

    11.Veh Make

    Vendors Records:

    In Vendors Form is like customer form except Vehicle information and one extra field like his shop address and shop phone number if any.

    Invoice form :

    In this i have Customers Info, Customers Vehicles Info (e.g. Make, Vehicle No, Model, Color, FrameNo). Also have Estime No, Tax Deduct,Total Amount, Net Amount,Discount and Payment Mode fields.

    For Estimate form :

    In this i have Insurance Company, Brance, Phone, Servey Company, Surveyor Name and Phone No.

    I have make the following tables:

    Customers

    CustomerID(Pk)

    Name

    SerName

    Address

    PhoneNo

    MobileNo

    Vendors:

    VendorID(PK)

    VendorName

    Address

    PhoneNo

    MobileNo

    ShopAddress

    ShopPhoneNo

    Vehicles:

    VehicleID(PK)

    CustomerID (FK)

    VehicleZNo

    Make

    Model

    Color

    FrameNo

    Transactions:

    TransactionID(PK)

    CustomerID(FK)

    PaymentModeID(FK)

    TransactionDate

    Discount

    Tax

    PaymentServiceFees

    TotalAmount

    NetAmount

    PaymentModes:

    PaymentModeID(PK)

    ModeName

    Description

    Estimates:

    EsrimateID(PK)

    InsuranceCompany

    Brance

    PhoneNo

    ServeyCompany

    SurveyorName

    ServeyPhoneNo

    Kindly check it, i didn't make another relations, as me confused how to relate vendors with which table?Make estimates table relation with which table, so i makes that ones which i understand.I make the table Vehicle as i though one customer have many vehicles and against one vehicle there are many customers.kindly check it .

    This db is designed as the client wants to check how many items related to his Car showrooms or parts of the cars such as Tyres,etc.. sold and which buyer or customer buys it, they also give some discount and deduct taxes if any.

    plz check it is this fine or not?

    Thanx in Advance.

  • A few observations:

    (1) You should have separate tables for insurance companies and survey companies. You shouldn't duplicate that information in every record in your Estimates table.

    (2) If you have a many-to-many relationship between vehicles and customers, then you should take the CustomerID column out of the Vehicles table and create what is known as a junction table called VehiclesCustomers with columns VehicleID, CustomerID.

    (3) If you post the full DDL for your tables then we can check that your foreign key constraints look right and that you are using the right data types for your columns.

    (4) You mention that you client wants to check how many car parts he's sold, however you don't have a table for car parts.

    John

  • I would also suggest splitting out things like "Name" into FName MInitial and LName. Also, "Address" into AddressLine1, AddressLine2, City, State, ZIP, County, Country. Although you may not want to get this granular.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply