Get the App
SLTechnology News&Howtos  ›  Database  › 

Principle and Application of Database (Learning Notes)

Shulou Source: shulou.com Published: 2022-06-01 10:47:35 10月01日 Update

Static structural design of the database: the structural characteristics of the database are static and generally will not be changed easily.

Database behavior structure design: determine the behavior and actions of database users, design the system hierarchy, functional structure and data flow chart of the database application system. The popular understanding of user behavior and action is the access operation to the database, that is, user query data and report statistics.

Database behavior characteristics design steps: 1) survey the data we may operate, analyze the operation frequency and real-time requirements; 2) determine the hierarchical structure (presentation layer-service layer-business layer-data access layer). Then determine the functional module structure, and finally determine the sub-model of the database.

Simplify the rules followed by the Emurr diagram: things in the real world can be treated as attributes (fields), as far as possible as attributes (fields).

1) the property must be an undivisible data item

2) attributes cannot be related to other entities, and all connections must be between entities, and there must be no connections between attributes and entities.

For example: the first case: employee table: employee number, name, professional title. If the field of job title is not linked to salary and benefits, there is no need for further description, but can be expressed as a field in the employee table.

The second situation: if there are two kinds of professional titles, professor and expert, professor 10,000 yuan / month, expert 20,000 yuan / month

1) employee form: employee number, name. Title table: professional title ID, professional title. Professional title-wage scale: professional title ID, salary.

2) employee form: employee number, name. Title table: professional title ID, professional title. Payroll: salary ID, salary.

Professional title-payroll: professional title ID, salary id.

Personal comparison: the second way is more in line with the rules, the fields can no longer be divided, which is more conducive to the expansion of the system to meet the needs.

Tags: Data title salary database structure employee field attribute behavior contact design name entity user system expert function action hierarchy situation Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Linux Shulou Information Huawei Xiaomi