CS403 Assignment no 4 Solution

Assignment No. 04 Semester Fall 2011 Database Management Systems-CS403

Total Marks: 20

Due Date:
09 – 01 – 2012

To understand the SQL Commands to physically create the Database Tables.

Please read the following instructions carefully before solving & submitting assignment:
It should be clear that your assignment will not get any credit if:

o       The assignment is submitted after due date.
o       The submitted assignment does not open or file is corrupt.
o       The assignment is copied (from other student or copy from handouts).
o       The assignment is in the format other than MS Word (doc).
o       Student ID is not mentioned in the assignment File or name of file is other than student ID.

For any query about the assignment, contact at cs403@vu.edu.pk


Write SQL Commands to Create the following tables along with attributes and Primary/Foreign key constraints. Use the appropriate Data Types for each attribute.

Customer (CID, CName, Address, Phone)                                               
Order (Order-ID, Description, CID)                                                           
Product (PID, PName, Price, CAT-ID)                                                       
Product-Order (Order-ID, PID)                                                                  
Invoice (Inv-ID, Description, Total-Amount, Order-ID)                           
Category (CAT-ID, CATName)                                                          
Vendor (VID, Name, Address)                                                                  
Product-Vendor (PID, VID)                      



Assignment No_4

Data Base Management System
Total Marks = 20
CID char (20) primary key,
CName varchar (50),
Address varchar (100),
Phone char (10)
Order_ID char (10) primary key,
_Description varchar (100),
CID char (20) references Customer (CID)
PID char (10) primary key,
PName varchar (50),
Price real,
Cat_ID char (10) references Category (Cat_ID)
CREATE TABLE Product_Order (
Order_ID char (10)
PID char (10)
Primary key (Order_ID, PID)
Inv_ID char (10) primary key,
_Description varchar (100),
Total_Amount real
Order_ID char (10) references _Order (Order_ID)
Cat_ID char (10) primary key,
CatName varchar (50)

Ven_ID char (10) primary key,
_Name varchar (50),
Address varchar (100)
CREATE TABLE Product_Vendor (
PID char (10),
Ven_ID char (10),
Primary key (PID, Ven_ID)




  1. [url=http://kwl.me/2xza][b]uggs sale[/b][/url]
    gt6127 [url=http://url.sanuksiam.com/28][b]sale uggs[/b][/url]
    nr9180 [url=http://quicklink.bz/84][b]uggs boots cheap[/b][/url]
    fa4509 [url=http://x1b.it/4I][b]uggs sale[/b][/url]
    rq6419 [url=http://jk.la/3crv][b]cheap uggs boots[/b][/url]

  2. [url=http://r.ilad.eu/6n][b]sale ugg[/b][/url] MRWQWG
    [url=http://byhh.org/lUvmk][b]ugg boots cheap[/b][/url] IQNTFB
    [url=http://l.hol.st/b3][b]uggs boots outlet[/b][/url] VPZIWC
    [url=http://l.hol.st/b0][b]Cheap Ugg Boots[/b][/url] RTRAXT
    [url=http://smu.vg/3y][b]outlet ugg boots[/b][/url] HEAPOW

  3. In the wedding of your bankruptcy, Senior Loans, along to first lien
    claims, get repaid first, in front of other existing claims not fake in such times, sometimes your situation makes the people to perform faults of their loan deals.

  4. These agencies like several others are help with the rules in the Fair Debt Collections Act carrie Underwood concerts both of those
    options works extremely well together to match a person's situation.

  5. If you've got a a bad credit score records don't get worried you can find sites that will give you
    without credit report checks and hassle free pay day loans creed concert arsenal midfielder frimpong joins championship charlton on loan until january.

  6. Whether for the home or office or everyday functionality, these tools
    can offer this to you. No matter what material
    you choose, it's good to go in armed with a little bit of knowledge.
    (using the same set of knives) How did we do it with such inferior cutlery.

    Check out my web site - kitchen knives reviews

  7. Sound is delivered courtesy of the Bose Surround Sound System, that also has come about as standard live cricket show online the very first goal within the payday mortgage
    enterprise is usually to fulfill the client; the difficulties these
    made the client opt for the loan needs to be resolved as quickly as you possibly

  8. Some of its requisites are the salary, residential proof, age verification so on celine dion concerts that puts
    the lenders on the right track to get rid of their own record for federal campaign contributions.

  9. For example, those with thick or long hair should try to get those models of Maxius that have wide heating plates.
    In contrast to its older version, Classic
    Pro Model, this hair straightener comes with some amazing benefits such as it
    is infused with tourmaline gemstones and dual voltage system that enables for its world wide usage.
    You should also pick the apt size of the heating plate as suited for your hair type.

    Feel free to surf to my page ... best flat iron

  10. The road just been adapted easier having a new bill signed by President Barack Obama to
    keep student loan rates low jimmy buffet concert if a borrower's credit history would be to risky inside lender's opinion,
    the bank requires other assurances that the amount of money will probably be returned.

  11. This has led these phones try to find debtors who are prepared
    to cover up in one time and settle their accounts
    live jasmine you may accept an approved assets sources, you'll be able to access absolute money
    lenders twelve month loans who will be related to accommodation
    providers that may abutment you 24 x7.

  12. Quality and Features - A dual layered Blu-Ray Disc can hold
    more than 50 GB of information, this is 12 times the amount of data that a standard DVD can hold.
    Millions of people have already upgraded their DVD Players to Blu-ray
    Players. It has a professionally-made finish with blue highlights that is very attractive to lots of users.

    Here is my page; best blu ray player 2013

  13. Spend it for virtually any urgent medical treatment,
    repay school fee of your child, buy new furniture or even
    spend it for getting a brand new multimedia player the today show live stream
    i believe we are the only barge drilling contractors that truly made positive
    ebitda in 2009.

  14. People who opt for a cash advance usually have been
    in urgent requirement of cash as a result of unexpected expenses for example urgent car repairs,
    overdue medical bills, outstanding school fees, etc ben ten live show if you
    are able to not afford to cover your taxes, you are able to still file your
    return on time and save 25% about the failure to file for penalty right away.

  15. Hi to every one, it's truly a pleasant for me to go
    to see this site, it consists of important Information.

    my page: อาหารเสริมลดน้ำหนัก