In the study of SPSS statistical analysis, EA Drawing entity Relationship diagram, PowerDesigner drawing Database Model diagram, and so on, have been unable to find a good example. Because the structure of the project used in the actual work belongs to the company's commercial confidential content, and its structure is not familiar to everyone when it is exchanged with others, it is also a troublesome matter to use the data model of teacher, Student, class and so on. Using SQL Server's sample database is just right, everyone is familiar with it, and it's ready.
A lot of books, tutorials are using the Northwind database as a model, but I have been not very familiar with it, today specially downloaded to understand a bit, now simply record notes, followed by SPSS and other learning.
Entity Relationship (E-R) Description:
The model for this instance includes the Enterprise employee (employee), customer (custom), product, and order four parts, which roughly order the product for the customer to the enterprise employee.
(1) Staff employee:
Including region (East four regions) and territory (region, city), and employee (employee), territory belong to regions, but the relationship between employee and territory is associated rather than belonging, That is, an employee can be associated with more than one area, as Zhang San is in the finance Department and in the administrative department.
1 Eastern
2Western
3Northern
4Southern
(2) Customer custom
(3) Product
Products are classified, all categories, in addition to the same name of the product, there may be multiple suppliers supplier, different suppliers have different price and other information.
(4) Order
There are multiple products under one order, and then the distribution is carried out using one of the logistics.
corresponding to the entity relationship, the database is designed with the following structure:
There is an association in the employee table, Reportto is the direct leader of the employee, the Association EmployeeID field (the leader is also the company employee).
The data structure is cleared, and then it can be analyzed and processed.