Introduction to Database Systems Chapter 7 After-Class Exercises (Part)

Introduction to Database Systems (5th Edition) Wang Shan Sa Shixuan Chapter 7 After-Class Exercises

Chapter 7 Database Design

1. Describe the database design process.

Answer:
(l) Requirements analysis: Accurately understand and analyze user needs (including data and processing).
(2) Conceptual structure design: By synthesizing, summarizing and abstracting user needs, a conceptual model is formed that is independent of the specific DBMS.
(3) Logical structure design: Convert the conceptual structure into a data model supported by a certain DBMS and optimize it.
(4) Database physical design: Select a physical structure (including storage structure and access method) that is most suitable for the application environment for the logical data model.
(5) Database implementation: Designers use the data language, tools and host language provided by DBMS to establish a database based on the results of logical design and physical design, compile and debug applications, and organize data into the database , and conduct a trial run.
(6) Database operation and maintenance: evaluate, adjust and modify the database system during its operation.
   This is a complete design process of the actual database and its application system. This includes not only designing the database itself, but also implementing, operating, and maintaining the database.
   Designing a complete database application system is often the iteration of the above six stages.

2 . Describe the database schema formed during the database design process.

Answer:
Different stages of database structure design form the database schema at all levels, namely:
(l) In the conceptual design stage, it forms an independent Machine characteristics are independent of the conceptual model of each DBMS product. In this article, it is the E-R diagram;
(2) In the logical design stage, the E-R diagram is converted into data supported by specific database products. Models, such as relational models, form the logical model of the database, and then establish the necessary views on the basis of the basic tables to form the external model of the data;
(3) In the physical design stage, According to the characteristics of DBMS and processing needs, physical storage arrangements are made, indexes are established, and the in-database schema is formed.

7. There are several departments in the school, and each department has several classes and teaching and research sections. Each teaching and research section has a number of teachers, including professors and associate professors, each of whom leads a number of graduate students. Each class has a number of students, and each student takes a number of elective courses. A course can be taken by several students. Please use an E-R diagram to draw a conceptual model of this school.

Answer:
The attributes of each entity are:
Department: department number, department name
Class: class number , class name
Teaching and Research Office: Teaching and Research Office Number, Teaching and Research Office
Student: Student ID, Name, Educational Qualification
Course: Course Number, Course Name
Teacher: employee number, name, professional title
Related attributes: The attribute of "elective" is "grade"
Conversion The relationship model is as follows:
Department (department number, department name, school name)
Class (class number, class name, department number) < a i=12> Teaching and Research Section (Teaching and Research Section Number, Teaching and Research Section, Department Number) Student (Student ID, Name, Educational Qualification, Class Number, Tutor and Staff Number) Course ( Course number, course name) Faculty (employee number, name, professional title, teaching and research department number) Elective (student number, course number, grades)




8 . A factory produces several products, each product is composed of different parts, and some parts can be used in different products. These parts are made from different raw materials, and the materials used in different parts can be the same. These parts are placed in warehouses according to the different products they belong to, and the raw materials are placed in several warehouses according to categories. Please use E-R drawings to draw a conceptual model of the factory's products, parts, materials, and warehouses.

Answer:
The attributes of each entity are:
Product: product number, product name
Part: part number , part name
Raw materials: raw material number, raw material name, category
Warehouse: warehouse number, warehouse name
Attributes of each relationship For:
Product composition: Amount of parts used
Parts manufacturing: Amount of raw materials used
Parts storage: Amount of storage
Material storage: storage amount
is converted into a relational model as follows:
Product (product number, product name, warehouse number)< a i=13> Parts: part number, part name Raw materials: raw material number, raw material name, category, warehouse number, storage quantity) Warehouse (warehouse number, Warehouse name) Product composition (product number, part number, quantity of parts used) Parts composition (part number, raw material number, quantity of raw materials used) Parts storage (part number, warehouse number, storage amount)





Guess you like

Origin blog.csdn.net/MrKingloveyou/article/details/125575162