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

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More

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)                                                                         

+ Click Here To Join also Our facebook study Group.

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


See Your Saved Posts Timeline

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)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

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),
Address varchar (100),
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),
Address varchar (100)
)
****************************************************************************

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 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!

RSS

© 2019   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service