Union query and database design er map

Joint inquiry:

 

Keyword union query is: of Union

 

The basic meaning of

Two union query is to select query results statement "stacked" together to become a "great result."

Query results can be two of the "coalition" of pre-conditions are: the result is equal to the number of fields.

 

It is recklessly up two tables, there is no relationship without any condition is put together

According to the first row of the default field name.

 

 

Plus the conditions of the query:

er diagram :

MySQL database modeling process:

The requirements analysis phase: analysis of the customer's business and data processing needs
Outline design stage: ER model diagram design of the database, verify that the correct and complete information needs
Detailed design stage: Three Forms application auditing database structure
Coding stage: the physical implementation of the database, application coding to achieve
Software testing phase: ......
Installation Deployment: ......
 
Database design steps of:
1. understand the needs of
the system-related personnel exchanges, seminars, and fully understand the needs of users, the database needs to be done to understand the task
2. Identify the entity (Entity)
identifies the database to manage key object or entity (noun)
3. Identify each entity attribute (the attribute) (noun)
relationships between entities 4. identification (relationship) (verb)

Tips: ER diagram, an entity is represented by a rectangle, an ellipse represents a property, the relationship represented by diamonds.
 
ER-design (base map):
1.一对一:X中的一个实体最对与Y中的一个实体关联,
 并且Y中的一个实体最多与X中的一个实体关联.
 Eg:一个人只有一张身份证.
2.一对多:X中的一个实体可以与Y中的任意数量的实体关联;
 Y中的一个实体最多与X中的一个实体关联.
 Eg:一个班级有多名学生.
3.多对多:X中的一个实体可以与Y中的任意数量的实体关联,反之亦然.
 Eg:学生和课程之间的关系,一个学生可以有多门课程,一门课程可以对应多名学生.
 
 
 
 

 

 

 

 

 

 

 

 

 

 

 

Guess you like

Origin www.cnblogs.com/www1842564021/p/11984493.html