diff --git "a/02 \351\231\210\346\230\216\345\207\275/9.5\347\254\224\350\256\2602.md" "b/02 \351\231\210\346\230\216\345\207\275/9.5\347\254\224\350\256\2602.md" new file mode 100644 index 0000000000000000000000000000000000000000..5e700fa7521ab29bf2cb297d0c7c118454c4ffd7 --- /dev/null +++ "b/02 \351\231\210\346\230\216\345\207\275/9.5\347\254\224\350\256\2602.md" @@ -0,0 +1,10 @@ + + +1. 学业规划:大二是大学生活的关键一年,要注重学习。制定一个合理的课程表,合理安排每天的学习和复习时间。积极参与课堂讨论和实践活动,提高自己的学习成绩。 +2. 提升技能:除了学业,可以考虑培养一些实用的技能。例如,参加一些与专业相关的实习或工作,参加一些职业培训课程,提升自己的就业竞争力。 +3. 社会实践:参加社团或学生组织,积极参与校园活动。这有助于培养团队合作能力和领导才能。也可以考虑参加志愿者活动,为社区服务,锻炼社会责任感。 +4. 健康管理:保持良好的健康习惯,定期锻炼身体,保证充足的睡眠和良好的饮食。这有助于提高身体和精神的健康状况,提高学习和生活质量。 +5. 拓展人际关系:大二是广交朋友的好时机。多参加校园活动,结识不同背景的人,扩大自己的人际圈子。与同学和老师建立良好的关系,这对未来的学习和职业发展都有好处。 +6. 实习或实践机会:大二可以找一些与专业相关的实习或实践机会,锻炼实际操作能力,增加实践经验。这对提升职业竞争力和将来找工作非常有帮助。 +7. 目标设定:大二开学是一个可以反思和设定目标的时刻。回顾过去一年的学习和生活,思考自己的优势和不足,并设定明确的目标。制定长期和短期目标,并制定计划和行动步骤,以实现这些目标。 + diff --git "a/02 \351\231\210\346\230\216\345\207\275/9.7\347\254\224\350\256\260.md" "b/02 \351\231\210\346\230\216\345\207\275/9.7\347\254\224\350\256\260.md" new file mode 100644 index 0000000000000000000000000000000000000000..47fb3e0a3959717862b5214cd75ed50ea752f848 --- /dev/null +++ "b/02 \351\231\210\346\230\216\345\207\275/9.7\347\254\224\350\256\260.md" @@ -0,0 +1,7 @@ +数据库的范式 + +1第一范式:要求字段范围的内容不可再分隔,为的是数据的原子性 + +2第二范式:要求在满足第一范式的基础上,非主键字段要完全主键 + +3第三范式:满足第二范式的前提下,非主键属性要依赖主键 \ No newline at end of file diff --git "a/02 \351\231\210\346\230\216\345\207\275/9.8\347\254\224\350\256\260.md" "b/02 \351\231\210\346\230\216\345\207\275/9.8\347\254\224\350\256\260.md" new file mode 100644 index 0000000000000000000000000000000000000000..aeca3e619f2112747d947b4769be52bdd52179b4 --- /dev/null +++ "b/02 \351\231\210\346\230\216\345\207\275/9.8\347\254\224\350\256\260.md" @@ -0,0 +1,9 @@ +power designer + +第一步:创建概念模型(类似E-R图)CDM + +第二步:转换成逻辑模型 LDM + +第三步:转换成物理模型 PDM + +第四步:生成DDL \ No newline at end of file diff --git "a/02 \351\231\210\346\230\216\345\207\275/\345\233\276\344\271\246\347\256\241\347\220\206\347\263\273\347\273\237.md" "b/02 \351\231\210\346\230\216\345\207\275/\345\233\276\344\271\246\347\256\241\347\220\206\347\263\273\347\273\237.md" new file mode 100644 index 0000000000000000000000000000000000000000..f622b752ea75125d456d4740d1a11f5123117b67 --- /dev/null +++ "b/02 \351\231\210\346\230\216\345\207\275/\345\233\276\344\271\246\347\256\241\347\220\206\347\263\273\347\273\237.md" @@ -0,0 +1,262 @@ +```mysql +if exists(select 1 from sys.sysforeignkey where role='FK_BORROW2_BORROW_LIBRARY') then + alter table Borrow2 + delete foreign key FK_BORROW2_BORROW_LIBRARY +end if; + +if exists(select 1 from sys.sysforeignkey where role='FK_BORROW2_BORROW2_BORROW') then + alter table Borrow2 + delete foreign key FK_BORROW2_BORROW2_BORROW +end if; + +if exists(select 1 from sys.sysforeignkey where role='FK_MANAGE_MANAGE_LIBRARY') then + alter table manage + delete foreign key FK_MANAGE_MANAGE_LIBRARY +end if; + +if exists(select 1 from sys.sysforeignkey where role='FK_MANAGE_MANAGE2_WORKING') then + alter table manage + delete foreign key FK_MANAGE_MANAGE2_WORKING +end if; + +if exists(select 1 from sys.sysforeignkey where role='FK_SERVE_SERVE_WORKING') then + alter table serve + delete foreign key FK_SERVE_SERVE_WORKING +end if; + +if exists(select 1 from sys.sysforeignkey where role='FK_SERVE_SERVE2_BORROW') then + alter table serve + delete foreign key FK_SERVE_SERVE2_BORROW +end if; + +drop index if exists Borrow.Borrow_PK; + +drop table if exists Borrow; + +drop index if exists Borrow2.Borrow2_FK; + +drop index if exists Borrow2.Borrow_FK; + +drop index if exists Borrow2.Borrow2_PK; + +drop table if exists Borrow2; + +drop index if exists library.library_PK; + +drop table if exists library; + +drop index if exists manage.manage2_FK; + +drop index if exists manage.manage_FK; + +drop index if exists manage.manage_PK; + +drop table if exists manage; + +drop index if exists serve.serve_FK; + +drop index if exists serve.serve2_FK; + +drop index if exists serve.serve_PK; + +drop table if exists serve; + +drop index if exists "working personnel"."working personnel_PK"; + +drop table if exists "working personnel"; + +/*==============================================================*/ +/* Table: Borrow */ +/*==============================================================*/ +create table Borrow +( + Bor_id integer not null, + Bor_name varchar(10) not null, + Bor_level integer not null, + Bor_blacklist varchar(10) not null, + constraint PK_BORROW primary key (Bor_id) +); + +/*==============================================================*/ +/* Index: Borrow_PK */ +/*==============================================================*/ +create unique index Borrow_PK on Borrow ( +Bor_id ASC +); + +/*==============================================================*/ +/* Table: Borrow2 */ +/*==============================================================*/ +create table Borrow2 +( + lib_id integer not null, + Bor_id integer not null, + situation char(4) not null, + constraint PK_BORROW2 primary key (lib_id, Bor_id) +); + +/*==============================================================*/ +/* Index: Borrow2_PK */ +/*==============================================================*/ +create unique index Borrow2_PK on Borrow2 ( +lib_id ASC, +Bor_id ASC +); + +/*==============================================================*/ +/* Index: Borrow_FK */ +/*==============================================================*/ +create index Borrow_FK on Borrow2 ( +lib_id ASC +); + +/*==============================================================*/ +/* Index: Borrow2_FK */ +/*==============================================================*/ +create index Borrow2_FK on Borrow2 ( +Bor_id ASC +); + +/*==============================================================*/ +/* Table: library */ +/*==============================================================*/ +create table library +( + lib_id integer not null, + lib_name varchar(20) not null, + lib_state varchar(3) not null, + lib_author varchar(10) not null, + lib_publish varchar(20) not null, + lib_classes integer not null, + constraint PK_LIBRARY primary key (lib_id) +); + +/*==============================================================*/ +/* Index: library_PK */ +/*==============================================================*/ +create unique index library_PK on library ( +lib_id ASC +); + +/*==============================================================*/ +/* Table: manage */ +/*==============================================================*/ +create table manage +( + lib_id integer not null, + wor_id integer not null, + lib_state varchar(2) not null, + constraint PK_MANAGE primary key (lib_id, wor_id) +); + +/*==============================================================*/ +/* Index: manage_PK */ +/*==============================================================*/ +create unique index manage_PK on manage ( +lib_id ASC, +wor_id ASC +); + +/*==============================================================*/ +/* Index: manage_FK */ +/*==============================================================*/ +create index manage_FK on manage ( +lib_id ASC +); + +/*==============================================================*/ +/* Index: manage2_FK */ +/*==============================================================*/ +create index manage2_FK on manage ( +wor_id ASC +); + +/*==============================================================*/ +/* Table: serve */ +/*==============================================================*/ +create table serve +( + wor_id integer not null, + Bor_id integer not null, + constraint PK_SERVE primary key (wor_id, Bor_id) +); + +/*==============================================================*/ +/* Index: serve_PK */ +/*==============================================================*/ +create unique index serve_PK on serve ( +wor_id ASC, +Bor_id ASC +); + +/*==============================================================*/ +/* Index: serve2_FK */ +/*==============================================================*/ +create index serve2_FK on serve ( +Bor_id ASC +); + +/*==============================================================*/ +/* Index: serve_FK */ +/*==============================================================*/ +create index serve_FK on serve ( +wor_id ASC +); + +/*==============================================================*/ +/* Table: "working personnel" */ +/*==============================================================*/ +create table "working personnel" +( + wor_id integer not null, + wor_name varchar(4) not null, + wor_position varchar(10) not null, + wor_range varchar(20) not null, + wor_state varchar(4) not null, + constraint "PK_WORKING PERSONNEL" primary key (wor_id) +); + +/*==============================================================*/ +/* Index: "working personnel_PK" */ +/*==============================================================*/ +create unique index "working personnel_PK" on "working personnel" ( +wor_id ASC +); + +alter table Borrow2 + add constraint FK_BORROW2_BORROW_LIBRARY foreign key (lib_id) + references library (lib_id) + on update restrict + on delete restrict; + +alter table Borrow2 + add constraint FK_BORROW2_BORROW2_BORROW foreign key (Bor_id) + references Borrow (Bor_id) + on update restrict + on delete restrict; + +alter table manage + add constraint FK_MANAGE_MANAGE_LIBRARY foreign key (lib_id) + references library (lib_id) + on update restrict + on delete restrict; + +alter table manage + add constraint FK_MANAGE_MANAGE2_WORKING foreign key (wor_id) + references "working personnel" (wor_id) + on update restrict + on delete restrict; + +alter table serve + add constraint FK_SERVE_SERVE_WORKING foreign key (wor_id) + references "working personnel" (wor_id) + on update restrict + on delete restrict; + +alter table serve + add constraint FK_SERVE_SERVE2_BORROW foreign key (Bor_id) + references Borrow (Bor_id) + on update restrict + on delete restrict; +``` +