《 Principle and application of database 》 Review summary

Database technology is mainly about how to organize and store data scientifically , Efficient data acquisition and processing , And can meet the various information needs of users , Because the demand for database technology is very large , So it is very necessary to learn the knowledge and technology of this course , It should be understood skillfully , Master the data , data management , database , The connotation of professional terms such as data model and conceptual model .

The first 1 chapter introduction

1. Master database , Database management system , database system ( form ) The concept of

2. Understand the three stages of database technology development

3. Master the concept of three-level mode and secondary image

4. Understand the main functions of database management system

Knowledge points :

data : The object of database system research and processing , A symbolic record of things in the world , There are four characteristics :

1: The data are “ value ” and “ type " The division of

” value “ It refers to the specific value of the data ,” type “ It refers to the structure of the data .

2: Data is constrained by value range and type .

3: There are qualitative expression and quantitative expression .

4: It has carrier and various forms of expression .

database : Long term storage in computer , organized , Shareable , Data collection under unified management , It is a computer software system that stores data according to data structure .

1: Data warehouse , New methods and technologies of data management , Better organization of data , More convenient and reasonable maintenance , control , Using data .

The characteristics of a set of data :

1: Minimum redundancy .

2: Application sharing of data resources .

3: High data independence .

4: Unified management and control .

Database management system (DBMS): Software that provides data management between the user and the computer operating system .

Unified management and control of database , To ensure the security and integrity of the database , Users can use the DBMS Accessing the contents of the database , Database administrators can use the DBMS Maintenance data .

major function :

1: Data definition capability : Language defined by database (DLL), Implement definition function .

2: Data manipulation capability :DBMS Provide data manipulation language <http://baike.baidu.com/view/3426309.htm>DML(Data
Manipulation Language), For users to add data , delete , to update , Query and other operations .

3: Organization of database <http://baike.baidu.com/view/46944.htm>, Storage and management :DBMS To organize by category , storage
<http://baike.baidu.com/view/87682.htm> And manage all kinds of data , Including data dictionary
<http://baike.baidu.com/view/70173.htm>, user data , Access path, etc .

4: Establishment and maintenance of database : Database recovery , Concurrency control of database <http://baike.baidu.com/view/1672732.htm>, Database
Integrity control <http://baike.baidu.com/view/3253924.htm>, Database security control , Data loading of database , transformation , dump , database
<http://baike.baidu.com/view/1088.htm> Reconfiguration, performance monitoring and other functions ,

database system :

Including computer hardware , database , Database management system , Application system and database administrator , A computer system with database and database technology for database management .

Compared with file system, database system has the following characteristics :

1: Data structure .

2: The data redundancy of database system is small , High degree of data sharing .

3: There is a high independence between data and program in database system .

4: The smallest access unit of data in database is data item .

5: Unified data management and control .

6: Provide database protection .

The first 2 chapter Data modeling

1. Master entity connection model (E-R chart ) Representation of , Include entities , attribute , Contact and contact type .

2. Understanding the three elements of data model

3. Understanding levels , Characteristics of mesh data model

Knowledge points :

Common database models :1, hierarchical model :

2, Mesh model ,3, relational model ,4 Object oriented model .

 1. entity (Entity)

   An entity is an objective existence in the real world . It can be a concrete thing , Like a house , One element , One person, etc , It can also be abstract , Like an idea , A plan , Or a project, etc . Entities are characterized by their own attribute values . Entity is divided into strong entity and weak entity .

 2. Entity set :
   The set of entities with the same structure and characteristics is called entity set . for example , Student entity set , Class entity set, etc .

3. Entity type :
   Describes the information structure of entity set , Typically includes a collection of type names and entity property names . for example , student ( Student number , full name , Gender , Age , class ).
  4. attribute :
   Describe the characteristics of an entity or connection . Each property of an entity is called an attribute . Property has property name , Property type , The distinction between attribute definition domain and attribute value .
  5. Entity identification ( Code or key ):
   The attribute set whose value can uniquely identify each entity is called the entity ID . In a relational database, the identity of an entity is called a code or key , Its identification code is the value of a single attribute or subset of attributes of an entity .
   for example , Student number , It is not only the attribute of students, but also the identification code of students , The identification of the Institute can be the name or number of the Institute .
  6. contact :

   In the real world , The relationship between things is objective , Connection reflects the relationship between entities . This connection must be described in the information world . and , In addition to being used as an attribute , The connection itself can also have attribute values .
   for example , Each teacher belongs to a research institute , There is a subordinate relationship between each teacher and a research institute to which he belongs . 
  7. Contact set :
   The same type of connection between entities also forms the connection set . for example , A set of affiliations is formed between teachers and their research institutes .
  8. Contact type :
   Describes the information structure of connection sets between entities with common characteristics , Usually includes the type name of the connection , Attribute of connection, etc .

   for example , Between each teacher and a research institute to which he belongs " belong to " contact ; Between each teacher and the students he teaches " Teaching and learning " The connection of ; Between the parts suppliers and the parts they supply " supply " contact ," supply " The attributes of connection include supply quantity, etc .



· data (Data):

Facts reflecting the objective world , And can distinguish the characteristics of the symbol : character , number , text , voice , graphical , image , Chart , Pictures, etc , They exist objectively in the real world , Can be input into the computer for storage and management .
· information (Information):
Processed and refined from raw data , Used to determine behavior , Plan or data with certain semantics is called information .
· database DB(Data Base):
It is the collection of a large number of interrelated data and data relations in the real world .
· Database management system DBMS(Data Base Management System):
It is a software system to store and manage the data in the database . Including storage , Administration , Various languages and tools for retrieving and controlling data in databases , It's a set of system software . 
· database system DBS(Data Base System):
Is the general name of database and database management system . It refers to the collection of interrelated data and software tools for manipulating data .DBS = DB+DBMS
· Database application program interface API(Application Programming Interface):
By DBMS The interface function of manipulating and accessing data in database provided for developing application program , Process or language .
· Database application AP(Application Program):
A program for manipulating and accessing a database that meets the requirements of a certain class of users .
· data warehouse (Data Warehouse)
A data warehouse is a business application system with its own database . Using existing data resources , Transforming data into information , Dig out knowledge from it , Refine into wisdom , Create benefits . 
· Data mining (Data Mining)
Data mining can help business users deal with large amounts of existing data , In order to discover some " Unexpected relationship ", In order to increase market share and profit .
· Information mining (Information Mining):
Information mining refers to document mining , Map , Photo , Sound and image: finding relevant information in the vast ocean , That is, content-oriented retrieval .
· Data mode (Data Model):
In the database , On the data ( entity ) A description of is called a database schema . It is described by the corresponding schema definition language .
· data model (Data Model):
It is the digital simulation and abstraction of real world characteristics .
· field ( Field):
The smallest unit of data in hierarchical data model , Describes the properties of an entity .
· fragment (Segment):
yes IMS The unit that describes an entity in a hierarchical data model , A record consisting of a collection of fields . It is also the unit where applications access database data .
· data item (Data Item):
yes DBTG The smallest unit of data in a named mesh data model , Represents an attribute of an entity .
· record (Record ):
yes DBTG A unit that describes entities in a named mesh data model , Is an ordered collection of data items .

· field (Domain):
A field is a collection of values , That is, the value range of the value .
· relationship (Relation):
A relationship is a two-dimensional table , Each table has a table name .
· tuple (Tuple):
A row in a relational table is called a tuple . Tuples can represent an entity or a relationship between entities .
· attribute ( Attribute):
A column in a relational table is called a relationship An attribute of , A data item of a tuple . Property has property name , Property type , The difference between attribute value domain and attribute value . Property names are unique in the table .


· keyword ( Primary Key ):
A property or combination of attributes in a table , Its value can uniquely identify a tuple in a relationship . Keyword property cannot take null value .
· External keywords (Forgien Key):
The attribute group corresponding to the keyword of another relationship contained in one relationship is called the external key of the relationship . The external key is null or the corresponding key value in the external table .
· Network Library (Net-Library):
A communication software package , Package database requests and results , Transmitted by network protocol . Also known as Net-Library, Install on both client and server .
The first 3 chapter relational database


2. Understanding relational 6 Nature

3. Grasp the concept : code , Primary attribute and non primary attribute , Full code and external code , Representation of relational schema .

4. Three kinds of integrity constraints of master relation ( Entity integrity , Referential integrity and user-defined integrity )

5. Skillfully use relational algebra to express all kinds of queries ( Set operation , choice , Projection , connect , except ) ; According to the data table structure , Using relational algebra to express query requirements .

Knowledge points :

Six characteristics of relationship :

(1) The data of the same attribute has homogeneity .

(2) Attribute names of the same relationship are not repeatable .

(3) Column positions in relationships can be swapped .

(4) Tuples in the same relationship cannot be exactly the same .

(5) Tuple order can be exchanged .

(6) Each component must be an indivisible data item .

The code of relation :

Candidate code : A property or set of attributes that uniquely identifies a tuple in a relationship .

such as :“ Student relations ” The middle school number can uniquely identify each student . If there are multiple candidate codes , You can choose one as the main code ,

Primary attribute : Any attribute contained in the candidate code is called the primary attribute .

Non primary attribute : Attributes not included in any candidate code , such as : In student relations “ Student number ”, Classroom relations “ Classroom number ”.

Data conceptual model :

E-R chart :

For example :

  UML Model :                           

There are usually four :

1: hierarchical model .

2: Mesh model .

3: relational model .

4: Object oriented model .

Formal representation of relational schema :


R: Relation name .

U: The domain from which the attributes that make up the relationship come from .

DOM: Property to the domain .

F: The collection of data dependencies between attributes .

Entity integrity rules :

attribute A It's the basic relationship R The primary attribute of the , Then attribute A The value of cannot be null .

Referential integrity ;(F Each property of is null , Or equal to the main code value of a tuple ). For example :

User defined integrity .

Operators of relational algebra :


The first 4 chapter Normalization theory

1. Grasp the concept : Functional dependency , Partial functional dependence , Complete functional dependence and transfer function dependence .

4. Master the concept of paradigm :1NF,2NF,3NF

5. Master the decomposition method and steps of pattern ; Can be based on a given relational schema , Judge the type of its normal form , And decompose according to the requirements , Achieve the required paradigm level .

 6. Understanding the principles of relational schema decomposition

Knowledge points :

Basic requirements of relational model :

(1) Each component of a tuple must be an indivisible data item .

(2) Data redundancy in the database should be minimized .

(3) When updating data , No update exception will be generated .

(4) Insert , No insert exception will be generated .

(5) Delete , No delete exception will be generated .

The main package of normalization theory in relational database 含三个方面的内容:




2NF:  消除非主属性对键的传递函数依赖关系,变为3NF.



第5章 数据库设计




































5: 实施和维护阶段:























第6章 SQL语言


2. 索引,视图的概念

能够根据给出的表结构和查询要求,写出相应的SQL 语句

 第7章 数据库安全保护(非重点章节)