create table Member
(
sn int identity(1,1) primary key,
name nvarchar(5) not null,
id varchar(20) not null,
m_join_date datetime default getdate(),
sex bit default(0),
birthday char(10)
)
create table Category
(
cate_id int identity(1,1) primary key,
cate_name nvarchar(20) not null
)
create table Cafe
(
sn int identity(1,1) primary key,
name nvarchar(50) not null,
make_date datetime default getdate(),
fk_cate int foreign key references Category (cate_id)
)
create table Member_join
(
fk_member int foreign key references Member(sn),
fk_cafe int foreign key references Cafe(sn),
join_date datetime default getdate(),
visit_count int default(0),
)
create table Member_visit
(
fk_member int foreign key references Member(sn),
fk_cafe int foreign key references Cafe(sn),
visit_count_day int default(0),
visit_date_day char(10)
)
댓글 영역