0% found this document useful (0 votes)
6 views

Project Code

Uploaded by

Goat Noodle
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Project Code

Uploaded by

Goat Noodle
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

sql code

create database inventory;


use inventory;
create table item(ino int primary key,iname varchar(30),prate float,srate float,qoh
int);
create table customer(cid int primary key,cname char(10));
create table supplier(sid int primary key,sname varchar(30),sadd
varchar(50) ,mobile char(l0));
create table pmaster(pid int primary key,pdate date, sid int,total float, foreign
key(sid) references supplier(sid));
create table pdetail(pid int,ino int,qty int,rate float,total float, foreign
key(pid) references pmaster(pid) , foreign key(ino) references item(ino));
create table smaster(saleid int primary key,sdate date, cid int,total float,
foreign key(cid) references customer(cid));
create table sdetail(saleid int,ino int,qty int,rate float, total float, foreign
key(saleid) references smaster(saleid),foreign key(ino) references item(ino));

You might also like