数据库系统 Database System
Overview
In this course we mainly learned about:
-
Relational Database based on Relational Model
-
Database Normalization
-
Database Conceptual Structure Design
一、Relational Database
1. Relational Model
Relational Database supports relational model.
Simply put, a relation is a table.
Row is Tuple. And a column of data is domain.
Normally a relation has a primary key, which can determine a single tuple.
2. Relational Integrity
In relational model, there is a thing called relational integrity, which means the relation has some constraints.
There are there types of integrities:
- Entity Integrity
- Referential Integrity
- User-Defined Integrity
1) Entity Integrity
The value of the primary key cannot be null.
For example, in relation Student:
Student(ID, name, major_id)
ID is the primary key, it can't be null.
2) Referential Integrity
It means:
- If attribute F is the foreign key of relation R1,
- and F is the primary key of relation R2,
- then for each row of R1, the value of F should be null or exist in relation R2.
For example:
Student(ID, name, major_id)
Major(major_id, major_name)
major_id in Student should be null or exist in Major.
3) User-Defined Integrity
It means, user can define the requirements that the data needs to meet.
Like grade: 0~100.
二、Database Normalization
Database Normalization is used to reduce data redundancy.
In relational model, relation has to meet certain requirements. We call it normal form.
Each normal form has its own requirements.
1. 1NF
When no table column has table as values, then the relation is in 1NF.
1NF is the minimum requirement.
2. 2NF
If \(R\in 1NF\),and each non-primary attribute fully functionally depends on any candidate code, then \(R\in2NF\).
3. 3NF
if \(R\in 2NF\),and each non-key attribute of R is a non-transitive dependency of each candidate key of R.
Modern database design meets 3NF at most.
三、Database Conceptual Design
Conceptual design is the key to the entire database design.
Its main task is to establish an independent conceptual model, which reflects the relationships between things in the real world.
Of that we learned about E-R model. E stands for entity, R stands for relation.
We draw E-R diagram to represent the model.
In E-R diagram, rectangle represents entity, ellipse represents attributes of entity, rhombus represents relation.
四、课程设计
The task assigned to me is to make a campus plant management system
For this I need to design a database and at the same time make a user interface.
-
I probably spent two or three days establishing the database.
-
About UI, my initial idea was to build a website.
-
But I can’t learn HTML, CSS and JavaScript in seven days
-
So I decided to learn java in advance, because Java is in the 7th semester.
-
I built a simple user interface using Java Swing, At the same time use JDBC technology to establish a database connection.
But I spend too much time on the UI, so the design of the database is a little simple.
原文地址:https://www.cnblogs.com/danielwong2021/p/15271281.html
- 【视频】自然框架之分页控件的使用方法(二) 下载、DLL说明和web.config的设置
- Jsp开发中遇到的中文乱码问题及解决方法
- 开发中最常见的Java字符串问题总结
- .net异步性能测试(包括ASP.NET MVC WebAPI异步方法)
- Java 8的函数式编程学习
- 在C++中反射调用.NET(一) 反射调用第一个.NET类的方法
- QuickPager分页控件,最简单的设置代码
- Java中有关Null的9问题
- 在C++中反射调用.NET(二) 定义数据接口 绑定委托方法 使用SOD DTO 对象 将.NET对象转换到C++结构体为何不使用序列化的问题
- Java阻塞队列线程集控制的实现方法
- 【自然框架】QuickPager分页控件,新增一种分页方式——伪URL分页(Postback版)
- 我们的漏洞Webug 3.0中级进阶攻略(上)
- 【自然框架】QuickPager分页控件的总体介绍和在线演示
- 在C++中反射调用.NET(三) 使用非泛型集合的委托方法C++中的列表对象list C++传递集合数据给.NET创建泛型List实例反射静态方法反射调用索引器当委托遇到协变和逆变C++/CLI
- JavaScript 教程
- JavaScript 编辑工具
- JavaScript 与HTML
- JavaScript 与Java
- JavaScript 数据结构
- JavaScript 基本数据类型
- JavaScript 特殊数据类型
- JavaScript 运算符
- JavaScript typeof 运算符
- JavaScript 表达式
- JavaScript 类型转换
- JavaScript 基本语法
- JavaScript 注释
- Javascript 基本处理流程
- Javascript 选择结构
- Javascript if 语句
- Javascript if 语句的嵌套
- Javascript switch 语句
- Javascript 循环结构
- Javascript 循环结构实例
- Javascript 跳转语句
- Javascript 控制语句总结
- Javascript 函数介绍
- Javascript 函数的定义
- Javascript 函数调用
- Javascript 几种特殊的函数
- JavaScript 内置函数简介
- Javascript eval() 函数
- Javascript isFinite() 函数
- Javascript isNaN() 函数
- parseInt() 与 parseFloat()
- escape() 与 unescape()
- Javascript 字符串介绍
- Javascript length属性
- javascript 字符串函数
- Javascript 日期对象简介
- Javascript 日期对象用途
- Date 对象属性和方法
- Javascript 数组是什么
- Javascript 创建数组
- Javascript 数组赋值与取值
- Javascript 数组属性和方法
- TypeScript里的类型为any和泛型的区别
- 乐观锁、悲观锁,这一篇就够了!
- 面向切片编程(AOP)应用的一些实际例子
- 计数计量单位KMGTPEZY【计算机】【天文】
- 不用临时的变量 优雅、高效的交换两个数方法
- SAP offline OData插件的JavaScript代码是如何调用到Android平台的Java代码的
- 一个占据SAP BSP应用占据存储空间的小工具
- 基于Golang的逃逸分析(Language Mechanics On Escape Analysis)
- SAP数据库表DDLOG的设计原理
- SAP UI5框架Component.js里extend函数的实现原理
- 冒泡排序的终极改进优化
- alpine安装sshd/ssh server
- 使用jstack检测Java应用的死锁(deadlock)状态
- 使用xdebug对php做性能分析调优
- 使用SAP Analytics Path Framework通过图表和表格方式展示CDS view数据