日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

DataBase project physical design

發布時間:2025/6/17 61 豆豆
生活随笔 收集整理的這篇文章主要介紹了 DataBase project physical design 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

DataBase physical design

//Table: /*student*/ create table student(id int not null primary key, /*學號*/name varchar(20) not null, /*姓名*/college varchar(20) not null, /*學院*/grade int not null, /*年級*/gender varchar(6) not null, /*性別*/age int not null /*年齡*/ );

Table student(學生信息)

idnamecollegegradegenderage
14001pualCSjuniormale20
14002aliceADjunjorfemele21

可按上述表格形式插入

/*study*/ create table curriculum(s_id int not null, /*學號*/c_id int not null /*課程號*/constraint c_id_fk foreign key (c_id) references course(c_id) );

Table curriculum(課表)

s_idc_id
140019001
140019002
140029001
140029003
140039004
/*study*/ create table course(c_id int not null constraint primary key, /*課程號*/teacher varchar(20) not null, /*老師*/credit int not null, /*學分*/signed int not null, /*簽到率*/c_difficulty int not null /*課程難度*/ );

Table course

c_idc_nameteachersigned(10)c_difficulty(10)
9001DataBaseDr.Guan JiHong108
9002Computer GraphicDr.Zhao Junqiao09
9003Computer ArchitectureDr.Qin Guofeng98
9004Operate SystemDr.Fang Yu08.5
/*do*/ create table task(t_id varchar(7) not null constraint primary key,/*作業號(任務創立日期+編號)*//* 格式: Year+M + D + numbere.g 7 + 12 + 16 + 02 */t_course int constraint t_c_fk foreign key references course(c_id), /*作業所屬課程*/t_deadline datetime, /*20161210 最后期限*/t_detail varchar(20), /*詳情*/t_amount int not null, /*1.2.3.4.5 作業數量*/t_difficulty int not null /*1.2.3.4.5 作業難度*/ );

Table task

t_idt_courset_deadlinet_detailt_amount(10)t_difficulty(10)
612160190012016-12-20 23:59:59P232,2/3/537
290022017-01-09 23:59:59Assignment329
create table message(m_id int not null constraint primary key,/*信息號(任務創立日期+編號)格式: Year+M + D + numbere.g 7 + 12 + 16 + 02 */type varchar(10) not null, /*信息類型:娛樂(entertainment)興趣(interest)工作(job)學習(study)信仰(faith)*/details varchar(30), /*詳情*/m_deadline datetime, /*最后期限*/duration datetime, /*持續時間*/Emergency_index int not null /*1.2.3.4.5 緊急程度*/ );

Table message

m_idtypedetailsStartEndEmergency_index(10)
6120201interestplay piano2016-12-12 17:30:002016-12-12-17:59:599
6120201faithgo to the YangPu church2016-12-12 17:30:002016-12-12-17:59:599
/*live*/ create table birthday(f_name varchar(20) not null constraint primary key, /*姓名*/relation varchar(10) not null, /*關系*/current_age int not null, /*當前年齡*/f_gender varchar(6) not null, /*性別*/f_birthdat datetime not null, /*生日*/gift varchar(1) not null /*是否需要禮物*/ ); f_namerelationcurrent_agef_genderf_birthdaygift(Y/N)
BobFaother34male2017-09-17 00:00:00Y
Alicesister23female2017-02-13 00:00:00Y
Judyfriend20female2017-02-22 00:00:00Y

以學號建立索引
生日表以姓名建立索引

轉載于:https://www.cnblogs.com/pualus/p/6188319.html

總結

以上是生活随笔為你收集整理的DataBase project physical design的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。