Assignment No. 04 Semester Fall 2011 Database Management Systems-CS403 |
Total Marks: 20
Due Date:
09 – 01 – 2012
|
|
Objective
To
understand the SQL Commands to physically create the Database Tables.
Instructions:
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
GOOD LUCK
|
||
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)
=================================================================
SOLUTION
Assignment No_4
Data Base Management System
Total Marks = 20
Solution:
CREATE TABLE Customer (
CID char (20) primary key,
CName varchar (50),
Address varchar (100),
Phone char (10)
)
*************************************************************
CREATE TABLE _Order (
Order_ID char (10) primary key,
_Description varchar (100),
CID char (20) references Customer (CID)
)
*************************************************************
CREATE TABLE Product (
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)
)
CREATE TABLE Invoice (
Inv_ID char (10) primary key,
_Description varchar (100),
Total_Amount real
Order_ID char (10) references _Order
(Order_ID)
)
*****************************************************************
CREATE TABLE Category (
Cat_ID char (10) primary key,
CatName varchar (50)
******************************************************************
CREATE TABLE Vendor (
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)
)
|
Here All students can get Virtual University Past Old Midterm Final term Solve Papers Quiz Assignments Projects Solutions.
CS403 Assignment no 4 Solution
Subscribe to:
Post Comments (Atom)
-
ACTIVATION OF THE SEMESTER FREEZE LINK Published On: Tuesday, November 20, 2012 Dear students, You are informed that rules an...
-
MGT201…. Midterm Subjective Suppose ABC Company is given Rs. 3 as a dividend which is expected to grow at constant rate of 9% per yea...
-
General Manager IT in City School Lahore APPLY Industry: Education/Training Functional Area: ...
-
How to set up a hotspot shield? Step 1 >> Download Hotspot shield here after download install hotspot shield into your compu...
-
Assignment No. 04 Semester Fall 2011 Database Management Systems-CS403 Total Marks: 20 Due Date: 09 –...

[url=http://kwl.me/2xza][b]uggs sale[/b][/url]
ReplyDeletegt6127 [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]
en4649
[url=http://r.ilad.eu/6n][b]sale ugg[/b][/url] MRWQWG
ReplyDelete[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
In the wedding of your bankruptcy, Senior Loans, along to first lien
ReplyDeleteclaims, 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.
These agencies like several others are help with the rules in the Fair Debt Collections Act carrie Underwood concerts both of those
ReplyDeleteoptions works extremely well together to match a person's situation.
If you've got a a bad credit score records don't get worried you can find sites that will give you
ReplyDeletewithout credit report checks and hassle free pay day loans creed concert arsenal midfielder frimpong joins championship charlton on loan until january.
Whether for the home or office or everyday functionality, these tools
ReplyDeletecan 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
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
ReplyDeleteenterprise 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
can.
Some of its requisites are the salary, residential proof, age verification so on celine dion concerts that puts
ReplyDeletethe lenders on the right track to get rid of their own record for federal campaign contributions.
For example, those with thick or long hair should try to get those models of Maxius that have wide heating plates.
ReplyDeleteIn 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
The road just been adapted easier having a new bill signed by President Barack Obama to
ReplyDeletekeep 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.
This has led these phones try to find debtors who are prepared
ReplyDeleteto 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.
Quality and Features - A dual layered Blu-Ray Disc can hold
ReplyDeletemore 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
Spend it for virtually any urgent medical treatment,
ReplyDeleterepay 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.
People who opt for a cash advance usually have been
ReplyDeletein 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.
Hi to every one, it's truly a pleasant for me to go
ReplyDeleteto see this site, it consists of important Information.
my page: อาหารเสริมลดน้ำหนัก