1. Steps for designing a database:
(1). Demand analysis stage
(2). Outline Design Stage: Drawing E-R model Diagram
(3). Detailed design stage: E-R model diagram to database table
(4 ).CodeWriting Stage
(5). Test phase
(6). Deployment and Installation
2. outline design phase:
(1). Collect information
(2). Identify the object
(3) Identify the details to be stored for each object
(4). Identify the relationship between objects
For example, the first step is to read the requirement analysis document, the second step is to find out the object. The third step is to set the corresponding object class attributes. The last step is to set the relationships between entities (such as the relationship between the primary and Foreign keys or one-to-many, one-to-many, and many-to-many)
3. Drawing E-R Diagram
(1). Entity
(2). Attributes
(3). Relationship
(4). ing Base
(5). Object relationship diagram
- Rectangle indicates entity set
- Elliptic representation of attributes
- Diamond represents a link set
- A straight line is used to connect an attribute and an object set. It is also used to link an object set. A straight line can have a direction (arrow) to indicate the ing base of a link set: 1: 1, 1: n, m: N.
4. Three major paradigms
First paradigm: Ensure the atomicity of each column;
Second paradigm: On the basis of the first paradigm, is there a partially dependent relationship (for composite primary keys) to describe only one thing;
Third paradigm: On the basis of the second paradigm, there is no transfer dependency relationship.