Fast Food Restaurant Management System Database with Source Code

Fast Food Restaurant Management System Database with Source Code.

Source Code for (PostgreSQL)

create table public.tbl_client(c_id serial primary key,

  name varchar(40),

  cnic_no varchar(15),

  cell_no int,

  city varchar(20),

  countery varchar(20),

  passport_no varchar(12),

   ct_id int /*FK*/

  

  )

alter table public.tbl_client add constraint ctid foreign key(ct_id)references public.tbl_client_type(ct_id)

 create table public.tbl_client_type(ct_id serial primary key,

name varchar(40))

 

create table public.tbl_food(f_id serial primary key,

name varchar(20),

quantity int ,

amount decimal(18,3),

  ft_id int /*FK*/

)

alter table public.tbl_food add  constraint t_f foreign key(ft_id) references public.tbl_food_type(ft_id)

 

create table public.tbl_food_type(ft_id serial primary key,

name varchar(40))

 

create table public.tbl_room(r_id serial primary key,

r_no int,

r_phone_no int,

rt_id int /*FK*/

)

alter table public.tbl_room add constraint rid foreign key(rt_id)references public.tbl_roomtype(rt_id)

 

create table public.tbl_roomtype(rt_id serial primary key,

name varchar(20))

 

create table public.tbl_services(s_id serial primary key,

name varchar(20),

charges decimal(18,3),

date_ date,

total_charges decimal(18,3))

 

create table public.tbl_servestype(st_id serial primary key,

  name varchar(20))

 

create table public.tbl_order(o_id serial primary key,

date_ date,

c_id int,

r_id int,

f_id int,

s_id int

 

)

alter table public.tbl_client add  constraint cid foreign key(c_id) references public.tbl_client(c_id)

alter table public.tbl_room add constraint rid  foreign key(r_id) references public.tbl_room(r_id)

alter table public.tbl_food add constraint fid foreign key(f_id) references public.tbl_food(f_id)

alter table public.tbl_servestype add constraint sid foreign key(s_id) references public.tbl_services(s_id)

 

create table public.tbl_payment(p_id serial primary key,

   date_ date,

   total_amount decimal(18,3),

   o_id int,

)

alter table public.tbl_order add  constraint oid foreign key(o_id) references public.tbl_order(o_id)

 

 

 


Download Source Code


more Details


Click here Projects

Leave a Reply

Your email address will not be published. Required fields are marked *