CREATE TABLE A1_Prof( PID char(4) PRIMARY KEY, PName char(10) not null, PDept char(15) ); CREATE TABLE A1_Student( ID char(9) PRIMARY KEY, Name char(10) not null, Dept char(15) not null, Grade number(5) not null, PID char(4) REFERENCES A1_Prof(PID) ); CREATE TABLE A1_Curriculum( SubjectID char(10) PRIMARY KEY, SubjectName char(20) not null ); CREATE TABLE A1_Score( ID char(9), SubjectID char(10), Score number(5) Default 0 not null, PRIMARY KEY (ID, SubjectID), FOREIGN KEY (ID) REFERENCES A1_Student(ID), FOREIGN KEY (SubjectID) REFERENCES A1_Curriculum(SubjectID) ); CREATE TABLE A1_Customer_Info( CID char(6) PRIMARY KEY, Name char(10) not null, Address char(20) , Tel char(15) , Bday date not null, SID char(14)not null, Job char(10) , Sex char(1) not null, Married number(1) ); CREATE TABLE A1_Customer_OnlineInfo( CID char(6) , LID char(20) not null, LPW char(15) not null, Email char(20) , Jday date not null, PRIMARY KEY (CID), FOREIGN KEY (CID) REFERENCES A1_Customer_Info(CID) ); CREATE TABLE A1_Product( PID int PRIMARY KEY, Name char(15) not null, Cor char(20) not null, UnitPrice int not null, Holding int not null, Photo char(20) ); CREATE TABLE A1_Region( RID number(5) PRIMARY KEY, LRegion char(10) not null, SRegion char(10) not null ); CREATE TABLE A1_Store( SID number(5) PRIMARY KEY, Name char(20) not null, RID number(5) REFERENCES A1_Region(RID) ); CREATE TABLE A1_Sales( SaleID number(5) PRIMARY KEY, PID number(5)REFERENCES A1_Product(PID), SID number(5)REFERENCES A1_Store(SID), CID char(6)REFERENCES A1_Customer_Info(CID), SDay date not null ); CREATE TABLE A1_sales_return( returnday date not null, returnreason char(30) not null, saleid number(5) REFERENCES A1_store(sid) ); CREATE TABLE A1_customer_score( cid char(6) REFERENCES A1_customer_info(cid), score number(6) default 0 not null ); |
by 나비:D
공지사항
카테고리
|
최근에 올라온 글
최근에 달린 댓글
최근에 받은 트랙백
태그목록
procedure 내장함수 Excel visual studio 2005 MSsql Bluelab Oracle mysql NSIS flex Eclipse Visual Basic 6.0 C Java HashTable hooking xml Android delphi DOM datagrid C# function 문자열 Delphi Excel DbUtils ADO 형변환 jsp svn글 보관함
달력
링크
Total :
Today : Yesterday :
Today : Yesterday :