数据库E-R图(Database e-r diagram).doc
文本预览下载声明
数据库E-R图(Database e-r diagram)
The e-r method is used to design the database concept.
Answer: the e-r method for database concept design, can be divided into three steps: first of all local e-r model design, and then to the local e-r model integrated into a global E - R model, finally optimize the overall e-r model, get the final e-r model, namely the concept model.
1. The student may select courses according to his own circumstances. Each student may take several courses at the same time, and each course may be taught by a number of teachers. Each teacher can teach several courses. Its incomplete e-r diagram is shown in figure 1.
Point out the type of contact between students and courses.
Point out the type of contact between the course and the teacher.
If each student has a teacher, and each teacher directs many students, how is the student connected to the teacher?
In the original e-r diagram, the teacher and the student are connected, and the e-r diagram is improved.
A:
The type of contact between students and courses is multi-contact.
The type of contact between a class and a teacher is more than one.
The type of contact between a student and a teacher is a one-to-many relationship.
The results of the e-r diagram are shown in figure 2.
2. Transform the e-r diagram shown in figure 3 into relational mode, and the properties in the diamond frame are determined.
Answer: the e-r diagram of this topic is converted into the following relational model:
Unit (unit number, address, telephone)
Employee (employee number, name, gender, age, unit number)
Suppose a departments database contains the following information:
Employees information: employee number, name, address and department.
Information of the department: all employees, department names, managers and sales products of the department.
Product information: product name, manufacturer, price, model and product internal number.
Manufacturers information: manufacturer name, address, product name and price of productio
显示全部