Professional Documents
Culture Documents
Databse Qu N Lí Bán Café
Databse Qu N Lí Bán Café
)
go
CREATE TABLE foodf
(
id int identity primary key,
name varchar(100) not null default'chua dat ten',
)
go
CREATE TABLE food
(
id int identity primary key,
name nvarchar(100) not null default 'chua dat ten',
idfood int not null,
price float not null default 0,
foreign key(idfood) REFERENCES dbo.foodf(id),
)
go
CREATE TABLE bill
(
id int identity primary key ,
datecheckin date not null default getdate(),
datecheckout date,
idtable int not null,
status int not null default 0
foreign key (idtable) REFERENCES dbo.tablef(id),
)
go
CREATE TABLE billinfo
(
id int identity primary key,
idbill int not null,
idfood int not null,
count int not null default 0,