We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

www.vustudents.ning.com

 www.bit.ly/vucodes + Link For Assignments, GDBs & Online Quizzes Solution www.bit.ly/papersvu + Link For Past Papers, Solved MCQs, Short Notes & More

Cs403 Assignment No 4 Solution & Discussion Due Date: 09-01-2012

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

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)

Product-Vendor (PID, VID)

..How to Join Subject Study Groups & Get Helping Material?..

Views: 2081

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

Attachments:

Replies to This Discussion

Yaaaar in main se 1 query b analyze nahi kr rahi.

Check this Solution

Attachments:

See the attached file for idea solution of Cs403 Assignment

Attachments:

Another Solution

CREATE TABLE Customer (
CID char (20) primary key,
CName varchar (50),
Phone int (12)
)

*******************************************************************...
CREATE TABLE _Order (
Order_ID int (10) primary key,
Description varchar (100),
CID int (20) references Customer (CID)
)

****************************************************************************
CREATE TABLE Product (
PID int (20) primary key,
PName varchar (50),
Price real,
Cat_ID int (20) references Category (Cat_ID)
)

*******************************************************************...
CREATE TABLE Product_Order (
Order_ID int (20)
PID int (20)
Primary key (Order_ID, PID)
)
***************************************************************************
CREATE TABLE Invoice (
Inv_ID int (20) primary key,
Description varchar (100),
Total_Amount real
Order_ID int (20) references _Order (Order_ID)
)
****************************************************************************
CREATE TABLE Category (
Cat_ID int (20) primary key,
CatName varchar (50)
)

****************************************************************************
CREATE TABLE Vendor (
VID int (20) primary key,
Name varchar (50),
)
****************************************************************************

CREATE TABLE Product_Vendor (
PID int (20),
VID int (20),
Primary key (PID, VID)

All these are WRONG solutions, except this one as posted above: MIT VIRTUALIANS CS403.doc

This solution also have minor mistakes, but those are just syntax related. e.g Missing COMMA ',' sign.

Well, I'm done, gonna throw my solution to LMS, let's see what happens!

Latest Activity

+"illegal weapon"++ liked Sharal Khan's blog post mja yaqeen hai
10 minutes ago
27 minutes ago
nazia, Awais and fatima waqar joined + M.Tariq Malik's group

CS619 Final Project

55 minutes ago
+++Mahoo+++ posted discussions
1 hour ago
+ !Captain Cadillac+ liked Sharal Khan's blog post mja yaqeen hai
1 hour ago
1 hour ago
2 hours ago

1

2

3