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, unify the database and program system overall description, display the database
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 Sheet Category: Business Data Sheet, Basic Coded Table, Auxiliary Coding Table, System Information Table, Cumulative Data Sheet, Settlement Data Sheet, Decision Data Sheet. Program module classification: initialization, business processing, integrity detection and correction, settlement processing, statistical processing. 3.1.1 Data Table Category Description Business Data Sheet: Record the processes 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, user configuration information, cost accounting mode. Cumulative Data Sheet: Store the current value of the business and the accumulated value. For example, current stock, current deposit, accumulated sales, accumulated spending, accounts receivable. Settlement Data Table: Store the number of monoliths at the end of each period. Such as, month-end stocks, month-end bank deposits, accounts receivable. Decision Data Sheet: Statistics that occur during each period of time. Such as, month sales statistics, monthly fund statistics, and enterprising 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 check and recalculation of current inventories, current deposits, cumulative sales. 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, statistical access library.
3.2 Relationship between data tables
Business Data Table <-> Basic Coded Table Lord - Foreign Key Relationship. Such as, contract <-> customer coding table; business data table <-> Auxiliary coding table master - foreign key relationship. Such as, contract table <-> payment method; business data sheet, cumulative data sheet, settlement data table: Cumulative data table = settlement data table (last end) service data table (in this period). Such as current stock = number of stocks at the end of last month (number of reservoirs this month - this month); Decision Data Sheet <-> Business Data Sheet Data Sheet data is derived from the data sheet (statistics) ;
3.3 The 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 using the system, the initialization module pairs (cumulative data sheet) and the number of inventories last month ( The docking data table is initialized; when there is a library service, the warehousing module (business processing) will be incorporated and saved in the warehousing document (business data sheet), and the retention number is accumulated In the stock count (cumulative data sheet);. Regular or irregular, inventory count account module (check integrity detection and correction), according to the number of inventories (deposited data sheet), this month, this month (business data sheet) Check if the current inventory number (cumulative data sheet) is in line with, it is not conform to correctly, can be made manually or automatically (current inventory number = number of stocks at the end of last month number of reservoirs in this month - the number of outlines this month); Each month, the monthly process is performed last month. Month Module (Settlement Processing) Based on the number of inventories (dictation data table) at the beginning of last month (business data table), the number of inventories (cumulative data sheet) is calculated on the last month. The formula is: the number of inventories in the last month = number of inventories in the last month number of wares in the last month - the number of wares in the last month;. After each month, the inventory business month statistics module (statistical processing) statistics last month's various stock products The warehousing and the number of warents, facilitates query and generating reports, as well as the data foundation for decision support. 3.4 Treatment of Data Sheets when named
Business Data Sheet: T_D_