내 데이터베이스에 상태 목록을 저장하려고합니다. 그러나 나는 그것을 '국가'라고 부를 수없는 것 같습니다. SQL Management Studio의 Intellisense는 색다른 느낌을줍니다.SQL Server에서 State라는 테이블을 만들 수 없습니까?
올바른 가정인가요? 다른 것으로해야합니까?
create table Category
(
ID int primary key identity(1,1),
Name nvarchar(256) not null
)
go
create table Subcategory
(
ID int primary key identity(1,1),
Name nvarchar(256) not null,
IDCategory int foreign key references Category(ID)
)
go
create table Advert
(
ID int primary key identity(1,1),
IDAdvertiser int foreign key references Advertiser(ID),
IDSubcategory int foreign key references Subcategory(ID),
ImagePath nvarchar(2048) not null,
StartDate datetime not null,
FinishDate datetime
)
go
create table Advertiser
(
ID int primary key identity(1,1),
Name nvarchar(2048) not null,
Contact nvarchar(256) not null,
Website nvarchar(256) not null
)
go
create table State
상태가 너무 일반적/공통적이므로 정보를 더 많이 사용하십시오. IE 상태 무엇? 그런 다음 예약어와 충돌하지 않으며 * 다른 사용자가 데이터 모델을 읽는 것이 더 분명합니다. –
OMG 조랑말에 동의합니다. 테이블 이름은 직관적이어야합니다. Tbl 이름은 포함 된 데이터에 대한 힌트를 제공해야합니다. – MarlonRibunal
왜 사용하지 않습니까? 다른 나라들에는 이들이 없기 때문에 A의 미국 국외로 나가기를 원한다면 추측 할 수 없습니다. [이 주석 사슬] (http://stackoverflow.com/questions/3637935/column-type-and- 3638587 # 3638587) – gbn