1. Introduction
1.1 Database and flat files
The storage of data is traditionally using files that are not associated with each other, sometimes referred to as flat files.
A database is some flat file that is combined into one entity.
1.2 What is a database?
A database is a collection of related data within an organization that is consistent with the logic used by the application.
1.3 Advantages of the database
1 Less redundancy
2 Avoiding inconsistencies
3 efficiency
4 Data integrity
5 confidentiality
2. Database management System (DBMS)
2.1 Definitions
A DBMS is a tool for defining, creating, and maintaining databases. The DBMS also allows the user to control the data storage in the database.
2.2 Constituent Parts
① Hardware
② Software
③ data
④ Users (end users and applications)
⑤ procedures
2.3 Architecture
① inner Layer
② concept Layer
③ outer
3. Database model
① Hierarchy Model
② Mesh Model
③ relational model: In relational models, data is organized into two-dimensional tables called relationships.
----Distributed database and object-oriented model
4. Relational Database model
1 Basic knowledge
In a relational database management system (RDBMS), data is represented by a collection of relationships.
Characteristics of relationships in an RDBMS: name, attribute, tuple
2 operation of the relationship
(1) Structured Query Language (SQL): A descriptive (not procedural) language
(2) 9 Kinds of operation
① Insertion
② Delete
③ Update
④ selection
⑤ Photography
⑥ Connection
⑦ and
⑧ Sex
⑨ Poor
(3) Combination of statements
The SQL language allows us to combine the statements described earlier to extract more complex information from the database.
5, the design of the database
Steps:
1 typically involves interviews with potential users of a database, gathering information that needs to be stored and access requirements for each department
2 establishing the Entity Relationship Model (ERM)
3 (in a relational database) establish an ERM-based relationship and normalize these relationships
① from E-r diagrams to relationships (relationships on entity sets and relationships on set of relationships)
② Normalization
Normalization is a process by which a set of relationships given by this process are transformed into a new set of relationships with stronger structures.
The normalization process defines a set of hierarchical paradigms: 1NF 2NF 3NF BCNF 4NF pjnf 5NF
The discussion of these paradigms (except 1NF) involves the discussion of function dependencies.
First Normal (1NF): attributes are no longer divided
Second paradigm (2NF): In each relationship, we need to have a keyword (called the primary key) or compound keyword, all other attributes depend on it.
Other paradigms.
6. Other Database Models
In addition to relational databases, there are two current generic models based on relational models: distributed databases and object-oriented databases.
1 Distributed Database
Incomplete distributed database
Replication-Distributed Database
2 Object-oriented database
---the query language that is commonly used as an object-oriented database is that xml,xml can represent data in nested structures.
"Database Foundation" of computer soft test notes