SQL Server sample Database Northwind (i)--Entity Relationship

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.