oracle SQL数据库实训报告(3)
/*==============================================================*/ /* Index: BanJi_PK */
/*==============================================================*/ create unique index BanJi_PK on BanJi ( BJ_ID ASC );
/*==============================================================*/ /* Index: Relationship_2_FK */
/*==============================================================*/ create index Relationship_2_FK on BanJi ( ZhuanYe_ID ASC );
/*==============================================================*/ /* Index: Relationship_4_FK */
/*==============================================================*/
create index Relationship_4_FK on BanJi ( NianJi_ID ASC );
alter table BanJi
add constraint FK_BANJI_RELATIONS_ZHUANYE foreign key (ZhuanYe_ID) references ZhuanYe (ZhuanYe_ID) on update restrict on delete restrict;
alter table BanJi
add constraint FK_BANJI_RELATIONS_NIANJI foreign key (NianJi_ID) references NianJi (NianJi_ID) on update restrict on delete restrict;
(7)Table 职务表
/*==============================================================*/ /* Table: ZhiWu */
/*==============================================================*/ create table ZhiWu (
ZW_ID numeric(4) not null, ZW_Name char(20) null, ZW_XZ char(20) null, ZW_DJ char(20) null, constraint PK_ZHIWU primary key (ZW_ID) );
/*==============================================================*/ /* Index: 职务表_PK */ /*==============================================================*/ create unique index 职务表_PK on ZhiWu ( ZW_ID ASC );
(8)Table 表现表
/*==============================================================*/ /* Table: BiaoXian */
/*==============================================================*/ create table BiaoXian (
JC_ID numeric(4) not null, S_ID numeric(4) not null, BX_Date date null, BX_Date_End date null, BX_NR char(100) null, constraint PK_BIAOXIAN primary key clustered (JC_ID, S_ID) );
/*==============================================================*/ /* Index: BiaoXian_PK */
/*==============================================================*/ create unique clustered index BiaoXian_PK on BiaoXian ( JC_ID ASC, S_ID ASC );
/*==============================================================*/ /* Index: BiaoXian_FK */
/*==============================================================*/ create index BiaoXian_FK on BiaoXian ( JC_ID ASC );
/*==============================================================*/ /* Index: BiaoXian2_FK */
/*==============================================================*/ create index BiaoXian2_FK on BiaoXian ( S_ID ASC );
alter table BiaoXian
add constraint FK_BIAOXIAN_BIAOXIAN_JIANGCHE foreign key (JC_ID) references JiangCheng (JC_ID) on update restrict on delete restrict;
alter table BiaoXian
add constraint FK_BIAOXIAN_BIAOXIAN2_STU_INFO foreign key (S_ID) references Stu_Info (S_ID) on update restrict on delete restrict;
(9)Table 课程表
/*==============================================================*/ /* Table: KeCheng */
/*==============================================================*/ create table KeCheng (
KC_ID numeric(4) not null, KC_Name char(10) null, KC_XZ numeric(1) null, KC_Type numeric(1) null, KC_XF numeric(1) null, KC_SJ numeric(1) null );
2. 视图的建立
(1)视图专业视图的代码预览
/*==============================================================*/ /* View: "view_zy" */
/*==============================================================*/ create or replace view "view_zy" as select
"ZhuanYe"."ZhuanYe_ID", "ZhuanYe"."ZhuanYe_Name", "ZhuanYe".ZY_CC from "ZhuanYe"
(2)视图专业视图的代码预览
/*==============================================================*/ /* View: "view_zy" */
/*==============================================================*/ create or replace view "view_zy" as select
"ZhuanYe"."ZhuanYe_ID", "ZhuanYe"."ZhuanYe_Name", "ZhuanYe".ZY_CC from "ZhuanYe"
(3)视图学生视图的代码预览
/*==============================================================*/ /* View: "view_stu" */
/*==============================================================*/ create or replace view "view_stu" as select
"Stu_Info".S_ID, "Stu_Info".BJ_ID,
"Stu_Info".ZW_ID, "Stu_Info"."S_Name", "Stu_Info"."S_Sex", "Stu_Info"."S_BanJi", "Stu_Info&q …… 此处隐藏:2951字,全部文档内容请下载后查看。喜欢就下载吧 ……
相关推荐:
- [求职职场]加法运算定律的运用练习题
- [求职职场]大型石油化工工业过程节能新技术
- [求职职场]2015-2020年中国箱纸板行业分析与投资
- [求职职场]NADEX-IWC5A点焊机故障代码
- [求职职场]英语阅读 非常有用
- [求职职场]鲁卫疾控发〔2012〕2号(联合,印发山东
- [求职职场]2014年莆田公务员行测技巧:数字推理的
- [求职职场]基于最近发展区理论的高中数学课堂有效
- [求职职场]与贸易有关的知识产权协议
- [求职职场]【王风范】微演说·职场演说三
- [求职职场]新时代国珍健康大课堂
- [求职职场]群论期末考试复习题
- [求职职场]施工现场消防安全专项施工方案(范本)-
- [求职职场]初中物理光学知识点归纳完美版
- [求职职场]毕业设计总结与体会范文
- [求职职场]江南大学2018年上半年展示设计第1阶段
- [求职职场]景尚乡民兵参战支前保障方案
- [求职职场]【优质】2019年工会职工之家建设工作总
- [求职职场]数据库技术与应用—SQL Server 2008(第
- [求职职场]汽车变速箱构造与工作原理
- 首钢工业区工业遗产资源保护与再利用研
- 第4课 《大学》节选
- 2016程序文件——检验检测结果发布程序
- 2011年高考试题文言文阅读全解释__2011
- 化学是一门基础的自然科学
- 海外做市商制度的借鉴意义
- 外国建筑史复习资料(
- 七年级下思想品德期末综合测试(二)
- 思政课部2013年上学期教学工作总结
- 电大国际公法任务3 0004
- 《圆的认识》教学设计
- 中国轨道交通牵引变流器行业市场发展调
- 中泰证券#定期报告:坚守时代硬科技和
- 浅论企业财务管理与企业经营投资风险的
- 大功率半导体激光器光纤耦合技术调研报
- 中国传统家具的现状与发展探讨
- Broadcom数字电视芯片助海尔扩展高清电
- 新HSK4词汇练习 超全(五)
- 2013届高考数学单元考点复习12
- 雨霖铃精品课件




