How many stages are there in Database Design? Strictly speaking, there are more than three stages. Today we will only discuss three of them. Concept Design, logical design, and physical design. First, we need to clarify a few questions. Why should we design the database in stages? What are the links between the three phases? To clarify these issues, we can only clarify the theory.
How many stages are there in Database Design? Strictly speaking, there are more than three stages. Today we will only discuss three of them. Concept Design, logical design, and physical design. First, we need to clarify a few questions. Why should we design the database in stages? What are the links between the three phases? To clarify these issues, we can only clarify the theory.
How many stages are there in Database Design? Strictly speaking, there are more than three stages. Today we will only discuss three of them. Concept Design, logical design, and physical design.
First, we need to clarify a few questions. Why should we design the database in stages? What are the links between the three phases? To clarify these issues, we can only clarify the theory. Let's give an example.
There is a library that needs to create a database for reader information, book information, and borrowing information. The reader information includes the name, student ID, gender, Card Date, home address, contact number, and category, the book information includes the number, author, publication information, page number, and registration date. The borrowing information includes the borrow certificate number, book number, book name, and borrow and return date, it is unrealistic to design a database before analysis. Therefore, we must first classify and organize the data (Conceptual Model), then draw charts or tables, and finally draw the relational structure (Logical Model) of the data information ), even the database storage record format, storage record arrangement, and access method (physical model) are developed to allow users to easily access data. Therefore, the database design must go through these three stages. We will discuss these three stages in detail below.
1. From the above example, we can conclude the characteristics of the three stages (models:
1. Conceptual Model: firstly, a conceptual model is a tool that serves as a platform for database designers to communicate with customers. It is independent of hardware and software. Conceptual Models express the overall logical structure of data, it is a comprehensive description of the data designed for the entire application project by the System user. the conceptual model is based on the user's point of view and Modeling of data.
2. Logical Model: A logical model is also a tool. It is a platform for database designers to communicate with application programmers. The logical model is independent of hardware, but dependent on software (Database System ); the logical model expresses the overall logical structure of the database, but it is a full description of the entire project database by the designer. The logical model is based on the database implementation point of view and Modeling of data.
3. Physical Model: The physical model (internal model) is the underlying abstraction of the database. It describes the storage mode (file structure) of data on disks or tapes), access device (external storage space allocation) and access method (primary index and secondary index ).
The conceptual and logical models are different. Use a table to compare them.
Features |
Function |
Starting Point |
Independence |
User |
Conceptual Model |
Expresses the overall logical structure of data |
User Requirements |
Independent from hardware and software |
Designers and users |
Logical Model |
Expresses the overall logical structure of the database |
Database implementation |
Independent from hardware but dependent on software (Database System) |
Designers and application programmers |
Second, let's discuss their differences from data descriptions.
1. the conceptual design of a database is to design the conceptual structure of a database based on the user's needs. It expresses the understanding of the things involved in the user's needs in a standard form. This stage uses four terms:
Entity: objective existence. objects that can be differentiated from each other are entities. They can be specific objects, a person, a house, and so on. They can also be abstract objects, such as Marxism and Mao Zedong Thought;
Entity set: In simple terms, it is a set of similar entities. We have all learned a set, so this concept will not be further explored. attribute: the feature of an object is property. This concept can be learned by comparing with vb controls, each attribute has a value field, and its type is also various.
Entity identifier: a property or attribute set that uniquely identifies an object, also known as a key ).
2. The logical design of the database is to design the logical structure, expression and implementation methods of the database based on the results of the conceptual design. There are many methods for logical design. Each method has a set of terms. The most common terms are listed below:
Field: it indicates the name unit of an object attribute. It is the smallest entity unit that can be named, also known as a data element or an elementary item. It has the same name as the property name.
Record: an ordered set of fields becomes a record. A record is generally used to describe an object.
File: a collection of the same type of records.
Key code: uniquely identifies the field or field set of each record in the file.
Use a table to compare the relationship between concepts and data in logical design:
Concept Design |
Entity |
Attribute |
Entity set |
Entity identifier |
|
...... |
...... |
...... |
...... |
Logic Design |
Record |
Field |
File |
Key code |
3. The physical design of the database involves hardware knowledge. We will only introduce it here and will not discuss it. High-speed buffer memory (Cache): The Fastest access speed, the most expensive storage; Primary memory: memory; fast co-operation memory: A memory between memory and hard disk; disk memory: commonly known as hard disk, optical memory: optical disc, tape, etc. The following uses a diagram to describe their storage hierarchy:
The three theoretical things are not intuitive. Based on the above examples of libraries, we will continue to discuss the characteristics and links of the three design stages.
First, we should analyze the data information and draw out their relationships. Below is a simple diagram of the relationship between the reader and the book (ERTU)
This simple ERTU intuitively expresses the relationship between the reader and the book. Based on this diagram, we can list five forms of mutual association: <喎?http: www.2cto.com kf ware vc " target="_blank" class="keylink"> VcD4KPHA + ICAgICA8aW1nIHNyYz0 = "" alt = "\">
These five tables are the contents of the table designed for database logic. The specific database table will not be painted.