You are on page 1of 1

create database db_txtmsystem;

use db_txtmsystem;
create table tbl_admin(admin_id varchar(20) primary key, a_password varchar(20),
a_question varchar(100),a_answer varchar(50));
create table tbl_customer(cust_id int primary key, cust_name varchar(25), cust_a
ddress varchar(50),cust_phone numeric(10),cust_email varchar(20));
create table tbl_supplier(sup_id int primary key, sup_name varchar(30), sup_addr
ess varchar(50), sup_email varchar(20), sup_phone numeric(10));
create table tbl_product(prdt_id int primary key, prdt_description varchar(50),
prdt_price numeric(16,2),prdt_quantity numeric(10,2));
create table tbl_stock(prdt_id int foreign key references tbl_product(prdt_id),s
tock_remark varchar(20));
create table tbl_purchase(pur_id int primary key, sup_id int foreign key referen
ces tbl_supplier(sup_id), prdt_id int foreign key references tbl_product(prdt_id
), pur_description varchar(20),pur_quantity int,price numeric(10,2));
create table tbl_employee (emp_id int primary key, emp_name varchar(25), emp_add
ress varchar(50), emp_phone numeric(10), emp_email varchar(25), emp_joiningDate
datetime, emp_city varchar(25));

select
select
select
select
select
select
select

*
*
*
*
*
*
*

from
from
from
from
from
from
from

tbl_admin;
tbl_employee;
tbl_customer;
tbl_supplier;
tbl_product;
tbl_purchase;
tbl_stock;

You might also like