<!--p.MsoNormal{ mso-style-name: 正文; mso-style-parent: ""; margin: 0pt; margin-bottom: .0001pt; mso-pagination: none; text-justify: inter-ideograph; mso-font-kerning: 1.0000pt; } p.paragraph{ mso-style-noshow: yes; margin-top: 5.0000pt; margin-right: 0.0000pt; margin-bottom: 5.0000pt; margin-left: 0.0000pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; text-align: left; font-family: 等线; mso-bidi-font-family: 'Times New Roman'; font-size: 12.0000pt; } @list l0:level1{ mso-level-number-format:undefined; mso-level-text:"%1、"; mso-level-number-position:left; font-family:Times New Roman; } @list l0:level2{ mso-level-number-format:lower-alpha; mso-level-text:"%2)"; mso-level-number-position:left; font-family:Times New Roman; } @list l0:level3{ mso-level-number-format:lower-roman; mso-level-text:"%3."; mso-level-number-position:left; font-family:Times New Roman; } @list l0:level4{ mso-level-number-format:decimal; mso-level-text:"%4."; mso-level-number-position:left; font-family:Times New Roman; } @list l0:level5{ mso-level-number-format:lower-alpha; mso-level-text:"%5)"; mso-level-number-position:left; font-family:Times New Roman; } @list l0:level6{ mso-level-number-format:lower-roman; mso-level-text:"%6."; mso-level-number-position:left; font-family:Times New Roman; } @list l0:level7{ mso-level-number-format:decimal; mso-level-text:"%7."; mso-level-number-position:left; font-family:Times New Roman; } @list l0:level8{ mso-level-number-format:lower-alpha; mso-level-text:"%8)"; mso-level-number-position:left; font-family:Times New Roman; } @list l0:level9{ mso-level-number-format:lower-roman; mso-level-text:"%9."; mso-level-number-position:left; font-family:Times New Roman; } @list l1:level1{ mso-level-number-format:decimal; mso-level-text:"%1."; mso-level-number-position:left; font-family:Times New Roman; } @list l1:level2{ mso-level-number-format:lower-alpha; mso-level-text:"%2)"; mso-level-number-position:left; font-family:Times New Roman; } @list l1:level3{ mso-level-number-format:lower-roman; mso-level-text:"%3."; mso-level-number-position:left; font-family:Times New Roman; } @list l1:level4{ mso-level-number-format:decimal; mso-level-text:"%4."; mso-level-number-position:left; font-family:Times New Roman; } @list l1:level5{ mso-level-number-format:lower-alpha; mso-level-text:"%5)"; mso-level-number-position:left; font-family:Times New Roman; } @list l1:level6{ mso-level-number-format:lower-roman; mso-level-text:"%6."; mso-level-number-position:left; font-family:Times New Roman; } @list l1:level7{ mso-level-number-format:decimal; mso-level-text:"%7."; mso-level-number-position:left; font-family:Times New Roman; } @list l1:level8{ mso-level-number-format:lower-alpha; mso-level-text:"%8)"; mso-level-number-position:left; font-family:Times New Roman; } @list l1:level9{ mso-level-number-format:lower-roman; mso-level-text:"%9."; mso-level-number-position:left; font-family:Times New Roman; } @list l2:level1{ mso-level-number-format:decimal; mso-level-text:"(%1)"; mso-level-number-position:left; font-family:Times New Roman; } @list l2:level2{ mso-level-number-format:lower-alpha; mso-level-text:"%2)"; mso-level-number-position:left; font-family:Times New Roman; } @list l2:level3{ mso-level-number-format:lower-roman; mso-level-text:"%3."; mso-level-number-position:left; font-family:Times New Roman; } @list l2:level4{ mso-level-number-format:decimal; mso-level-text:"%4."; mso-level-number-position:left; font-family:Times New Roman; } @list l2:level5{ mso-level-number-format:lower-alpha; mso-level-text:"%5)"; mso-level-number-position:left; font-family:Times New Roman; } @list l2:level6{ mso-level-number-format:lower-roman; mso-level-text:"%6."; mso-level-number-position:left; font-family:Times New Roman; } @list l2:level7{ mso-level-number-format:decimal; mso-level-text:"%7."; mso-level-number-position:left; font-family:Times New Roman; } @list l2:level8{ mso-level-number-format:lower-alpha; mso-level-text:"%8)"; mso-level-number-position:left; font-family:Times New Roman; } @list l2:level9{ mso-level-number-format:lower-roman; mso-level-text:"%9."; mso-level-number-position:left; font-family:Times New Roman; } @list l3:level1{ mso-level-number-format:decimal; mso-level-text:"(%1)"; mso-level-number-position:left; font-family:Times New Roman; } @list l3:level2{ mso-level-number-format:lower-alpha; mso-level-text:"%2)"; mso-level-number-position:left; font-family:Times New Roman; } @list l3:level3{ mso-level-number-format:lower-roman; mso-level-text:"%3."; mso-level-number-position:left; font-family:Times New Roman; } @list l3:level4{ mso-level-number-format:decimal; mso-level-text:"%4."; mso-level-number-position:left; font-family:Times New Roman; } @list l3:level5{ mso-level-number-format:lower-alpha; mso-level-text:"%5)"; mso-level-number-position:left; font-family:Times New Roman; } @list l3:level6{ mso-level-number-format:lower-roman; mso-level-text:"%6."; mso-level-number-position:left; font-family:Times New Roman; } @list l3:level7{ mso-level-number-format:decimal; mso-level-text:"%7."; mso-level-number-position:left; font-family:Times New Roman; } @list l3:level8{ mso-level-number-format:lower-alpha; mso-level-text:"%8)"; mso-level-number-position:left; font-family:Times New Roman; } @list l3:level9{ mso-level-number-format:lower-roman; mso-level-text:"%9."; mso-level-number-position:left; font-family:Times New Roman; } @list l4:level1{ mso-level-number-format:decimal; mso-level-text:"%1."; mso-level-number-position:left; font-family:Times New Roman; } @list l4:level2{ mso-level-number-format:lower-alpha; mso-level-text:"%2)"; mso-level-number-position:left; font-family:Times New Roman; } @list l4:level3{ mso-level-number-format:lower-roman; mso-level-text:"%3."; mso-level-number-position:left; font-family:Times New Roman; } @list l4:level4{ mso-level-number-format:decimal; mso-level-text:"%4."; mso-level-number-position:left; font-family:Times New Roman; } @list l4:level5{ mso-level-number-format:lower-alpha; mso-level-text:"%5)"; mso-level-number-position:left; font-family:Times New Roman; } @list l4:level6{ mso-level-number-format:lower-roman; mso-level-text:"%6."; mso-level-number-position:left; font-family:Times New Roman; } @list l4:level7{ mso-level-number-format:decimal; mso-level-text:"%7."; mso-level-number-position:left; font-family:Times New Roman; } @list l4:level8{ mso-level-number-format:lower-alpha; mso-level-text:"%8)"; mso-level-number-position:left; font-family:Times New Roman; } @list l4:level9{ mso-level-number-format:lower-roman; mso-level-text:"%9."; mso-level-number-position:left; font-family:Times New Roman; } -->
一、 几个概念
1. 数据(data):计算机能够处理的信息,都是数据,比如字符、音频、图像、视频等。
2. 数据库(database--DB):是用来存放数据的,数据是由特点的:
(1) 有组织的(比如:二维表)
(2) 可以共享的
(3) 完整的:语义是正确的,比如性别
(4) 安全的:
3. 数据库管理系统(database management system--DBMS)
介于操作系统和用户之间的软件
功能:
(1) 数据定义
(2) 数据操作
(3) 数据库运行管理
(4) 数据库的建立和维护
4. 数据库系统(database system--DBS)
数据库管理系统能够正常运行所涉及的硬件、软件和人。
软件:操作系统、数据库管理系统、应用开发工具、应用系统
人:管理员(database administer -- DBA)和普通用户
二、 数据模型
三个要素(MySQL)
1. 数据结构:二维表
2. 数据操作:增insert 删 delete 改 update 查select
3. 数据的约束:完整性 比如primarykey
三、 关系模型
关系:二维表
元组:行或记录
属性:列或字段
域:字段的取值范围,比如char(11)
主码:唯一标识某个元组的属性
关系模式:student(sno,sname,sage……)
四、 数据库系统的组成和结构
1.数据库系统的体系结构
(1)内模式(存储模式)
(2)模式(概念模式或逻辑模式)
(3)外模式(用户模式)