Title: Database Design Specification
Version: v2.0
Revision Document History:
--- Date - | --- Version - | - Description ----
2003.6.5 v1.0 Document first
2003.6.17 V2.0 is reinited for 1.0 content
Database design specification
1. Purpose
Standardized database design.
2 outline
Designing Documents from the Design Principle of Database Documents to Database Design Specific Thoughts and Name Rules.
3 database application structure
According to the analysis of the general business system, the database and program system are unified, and the database is displayed.
The table between the tables and the relationship between the program module.
3.1 Classification of data sheets and program modules
According to the "Processing Features", the data sheets and program modules are classified as follows:
Data table classification: business data sheet, basic coding table, auxiliary code table, system information table, cumulative data sheet, knot
Counting data sheets, decision data tables.
Program module classification: initialization, business processing, integrity detection and correction, settlement processing, statistical processing.
3.1.1 Data State Classification Description
Business Data Sheet: Record the process and results of the business. Such as, contract, warehouse, application form, voucher.
Basic Coding Table: Describe basic information and encoding of business entities. Such as products, customers, suppliers, employees.
Auxiliary Code: Describe the list of properties. For example, the contract type, title, nation, payment method.
System Information Table: Store parameters related to system operations, business control. For example, user information, permissions, users
Set information, cost accounting mode.
Cumulative Data Sheet: Store the current value of the business and the accumulated value. Such as, current stock, current deposit, accumulated sales, tired
Expenditure, accounts receivable.
Settlement Data Table: Store the number of monoliths at the end of each period. Such as, month-end stock, month-end bank deposit, accounts receivable
.
Decision Data Sheet: Statistics that occur during each period of time. Such as, month sales statistics, monthly fund statistics, access library
statistics.
3.1.2 Program module Classification Description
Initialization: The system is initialized to the system before the system runs. For example, inventory initialization.
Business handling: Control and results record of business processes. For example, the contract is entry, the cost is approved, and the entry is library.
Integrity Detection and Correction: Check and automatically correct the accumulated data sheet. Such as the current stock, current deposit,
Cumulative sales check and recalculation.
Settlement processing: calculate and record the number of monoliths at the end of each period. Inventory month, payment accounts.
Statistical processing: calculate and record the statistics that occur during each period. For example, statistics month sales, statistical monthly return,
The deposit is based.
3.2 Relationship between data tables
Business Data Table <-> Basic Coded Table Lord - Foreign Key Relationship. Such as, the contract table <-> customer coding table;
Business Data Sheet <-> Auxiliary Code Table Main - Foreign Key Relationship. Such as the contract <-> Payment method;
Business data sheet, cumulative data sheet, settlement data table: cumulative data sheet = settlement data table (last at the end) business number
According to the table (the occurrence of this issue). Such as current stock = number of stocks at the end of last month (number of reservoirs this month - number of warehouses this month);
Decision Data Sheet <-> The data of the business data sheet decision data table is derived from the data sheet (statistics);
3.3 Relationship between data sheets and program modules
The relationship between the data sheet and the program module is described by an example (warehouse management):
Before the system use, the initialization module is in stock (cumulative data sheet) and the number of inventories (deposit data sheet)
Row initialization;
When there is a warehouse service, the library module (business processing) will be subjected to the warehouse and saved to the library single file (
Business Data Sheets), at the same time, the number of warents is accumulated to the inventive number (cumulative data sheet);
Regular or irregular, inventory counting module (check integrity detection and correction) according to the number of inventories (survive)
Data table), this month has occurred (Business Data Sheet) Check if the current inventory number (cumulative data sheet) is in line with it, does not match
Then give a tip, can be corrected manually or automatically (the current stock number = number of inventories in the last month number of reservoirs this month - the number of outline this month);
Each month, the monthly process is performed last month. Men's module (settlement process) According to the count number of inventories (deposit data)
Table), the number of years (business data sheet) is calculated from the last month (accumulated data sheet). The formula is: last month
Save count = number of inventories in the last month number of logs in the last month - the number of warehouses last month;
After each month, the inventory business month statistics module (statistical processing) statistics on various stock products in the previous month and
The number of warents is easy to query and generate reports, as well as data foundations for decision support.
3.4 Treatment of Data Sheets when named
Business Data Sheet: T_D_