Basic practice of E-R graph, basic practice of E-R Graph
Question 1st:
There are two entities: store and customer. "Store" has attributes: store ID, store name, address, and phone number. "customer" has attributes: Customer ID, name, address, age, and gender. Assume that a store has multiple customers who can shop in multiple stores. Each time a customer goes to the store for shopping, there is a consumption amount and a date, in addition, each customer is required to consume a maximum of once a day in each store.
① Draw an erdiagram and specify the attributes and contact type. (5 points)
Question 2nd:
Assume that each student takes several courses, and each student has only one score for each course. Each teacher teaches only one course, and each course is taught by several teachers. "Student" has attributes: Student ID, name, address, age, and gender. "Teacher" has attributes: employee number, teacher name, and title. "Course" has attributes: course number and Course name.
① Draw an erdiagram and specify the attributes and contact type. (5 points)
Question 3rd:
There are three entity sets in the database of a commercial company. One is the entity set of the company. The attributes include the company number, company name, and address. The other is the entity set of the warehouse, the attributes include the warehouse ID, warehouse name, and address. The third is the "employee" entity set. The attributes include the employee ID, name, and gender. Each company has several warehouses, and each warehouse can belong to only one company. Each Warehouse can employ several employees. Each employee can only work in one warehouse, and the employees of the warehouse can have employment periods and salaries.
1. Draw a E-R diagram (5 points)
Question 4th:
All multiple researchers in a study, each of which belongs to only one research institute, study all multiple scientific research projects, and each research project has multiple scientific research personnel, each scientific research personnel can participate in multiple scientific research projects. The workload of scientific research personnel participating in the project should be counted. The "Institute" has the following attributes: ID, name, address, and "scientific research personnel": employee ID, name, gender, age, and title. "Scientific Research Project" has attributes: project number, project name, and fund.
① Draw an erdiagram and specify the attributes and contact type. (5 points)
Question 5th:
The existing student registration system has the following attributes: Admission Ticket number, name, age, and gender. The entity "Course" has the attributes: course number, name, and nature. One candidate can apply for multiple courses. Candidates can also apply for information such as the date and score.
① Draw an erdiagram and specify the attributes and contact types. (5 points)
Question 6th:
In a factory sales management system, the entity "product" has attributes: product number, product name, specification, and unit price. The entity "customer" has attributes: Customer ID, name, and address. Assume that the customer can purchase multiple products at most once a day. The customer can also purchase information such as the date and quantity of purchase at the time of purchase.
① Draw an erdiagram and specify the attributes and contact type. (5 points)
Question 7th:
There are two entities: athlete and Competition Project. "athlete" has attributes: athlete ID, name, unit, gender, and age. "Competition Project" has attributes: project number, name, and best score. One athlete can participate in multiple projects, and one project is attended by multiple athletes. The contestant also includes information such as the competition time and score.
① Draw an erdiagram and specify the attributes and contact type. (5 points)
Question 8th:
A factory produces several products, each of which consists of different parts. Some parts are used on different products. These parts are made from different raw materials. The materials used for different parts can be the same. These parts are placed in warehouses according to their respective products, and raw materials are placed in several warehouses by type.
Product attributes: ID and name
Part attributes include: number and name
Material attributes include: number, name, and material type.
Repository attributes include: number, name, and location
(1) Please use E-R drawing factory products, parts, materials, warehouse concept model, and indicate properties and contact type. (5 points)
Question 9th:
A computer company specializes in selling computer devices, peripheral devices, and parts. The company has three departments: marketing department, Technical Department and Finance Department. There are 18 sales personnel in the marketing department, responsible for procurement and sales; 14 engineers in the technical department, responsible for after-sales service, warranty and other technical work; the finance department has 12 employees, one accountant and one cashier in charge of financial business. The company needs to store the customer, sales, maintenance (Service, warranty), and employee information of all computer equipment in the database.
According to the company's situation design database E-R diagram, and note the contact type. (5 points)
Question 10th:
There are several departments in the school. Each department has several classes and teaching and research sections. Each Teaching and Research Section has several instructors, some professors and associate professors each carry several graduate students, and each class has several students, each student takes several courses, and each course can have several students.
According to the company's situation design database E-R diagram, and note the contact type. (5 points)
Question 11th:
The factory (including the factory name and the factory director name) needs to establish a management database to store the following information: (1) a factory has multiple workshops, each of which has a workshop number, workshop director name, address, and phone number. (2) There are multiple workers in a workshop. Each worker has a employee ID, name, age, gender, and type of work. 3) A workshop produces a variety of products with product numbers and prices. 4) One workshop produces multiple parts, and one part may also be manufactured in multiple workshops. Parts include part numbers, weights, and prices. (5) A product consists of multiple parts, and one part can be assembled into multiple products. 6) products and parts are stored in the warehouse. 7) There are multiple warehouses in the factory. The warehouses include the Warehouse number, the name of the warehouse director, and the telephone number.
(1) drawing the conceptual model with E-R according to the factory situation, and note the contact type. (10 points)