How to Relate tables and Normalized the Data??

  • Its my first experience .I have done some work  but I want that some one check my work .Is it correct or not ? OR its relations and its primary keys are correct .please help me about Sale data and check this .Is it Sale process is fully normalized or Not?

    We make a Point of sale system for mobiles. it’s a online application that’s keep all records in database.

     

    Sale process have five tables . Sales table is the main table that are relate to the other tables.

     

     

    1.      Sales

    2.      SalesReturn

    3.      SalesLineItem

    4.      Commission

    5.      Store

     

    These tables attributes are as:

     

    Sales: (saleId, mobileNo, customerName, amount, storied, saleBalance,

    SaleDate, itemCode, unitPrice, croId, commissionCode, returnId)

    Sales Return: (returnId, customerNo, dealerCode, paymentMade,

    InvoiceNo, invoiceDate, SIRNO, SIRDate)

    Store: (storeId, storeAddress, storeName)

    SalesLineItem: (itemCode, quantity)

    Commission:  (commissionCode, description, newSaleRegularCommission,

    NewSalePrepaidCommission, rechargeCommission, hardwareCommission, witholdingTax, firstSaleWithoutCommission)

     

    Sales table is the main table its primary key is the saleId

    SalesReturn:  table have returnId as a primary key and return Id represent as a foreign key in the sales table .

    Store: table primary key is the StoreId and storeId represent as a forigen key in the Sales table.

    SalesLineItem: item Code is the primary key and this represent as a forigen key in the sale table.

    Commission: In Commission table commissionCode is a primary key and commissionCode represent key as a sale table.

  • just a thought

    customers are an entity

    Sales: (saleId,, customerID, amount, storied, saleBalance,

    Customer: (customerID,mobileNo,CustomerName)

    MVDBA

  • SalesLineItem: (itemCode, quantity)

    where is the reference to saleID

    perhaps

    SalesLineItem: (ID(PK),saleid(FK),itemCode(FK), quantity,)

    MVDBA

  • In Customer Table We add all the customer related information.Such as

    Customer: (customerNo,mobileNo,customerName,userName,telephoneNo,

    officeAddress,residenceAddress,residenceAddress,customerNIC,customerNTN,

    PassportNo,previousMobileNo)

     

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

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