当前位置:网站首页>Tutorial on principles and applications of database system (010) -- exercises of conceptual model and data model

Tutorial on principles and applications of database system (010) -- exercises of conceptual model and data model

2022-07-07 12:15:00 Rsda DBA_ WGX

Database system principle and Application Tutorial (010)—— Conceptual model and data model exercises

One 、 Short answer

1、 Explain the following terms

Entity , Entity set , attribute , code , Physical contact diagram (E-R chart ), Data model .

answer :

(1) Entity : Things or concepts that can be distinguished from each other in the real world are called entities . for example : One of the students , A machine , An employee of the company, etc .

(2) Entity set : The set of similar entities is called entity set . for example : A student is an entity , Then all the students managed are entity sets .

(3) attribute : An attribute is an abstract representation of a feature of an entity . for example : Student's name 、 Gender 、 Date of birth 、 nation 、 Political outlook, etc .

(4) code : Attributes or attribute groups that can uniquely identify an entity are called codes . for example : Student ID can uniquely identify a student , Then the student number is the code of the student entity .

(5) Physical contact diagram (E-R chart ):E-R Figure provides a representation of the entity set 、 Properties and contact methods . stay E-R In the figure , Use rectangle to represent entity set , Use ellipses to represent attributes , Use diamonds to represent the relationship between entity sets .

(6) Data model : Data model is the abstraction of data features , The data model is used to represent the record structure and the relationship of records . The most common data includes hierarchical models 、 Mesh model and relational model . Hierarchical models and mesh models are called non relational models .

2、 Detail the three elements of the data model .

answer : The three elements of the data model are : data structure 、 Data manipulation and integrity constraints .

(1) data structure : What kind of structure is the data stored in the database . hierarchy 、 Reticular structures and relationships ( surface ) The data model of the structure is named hierarchical model 、 Mesh model and relational model .

(2) Data manipulation : The data operations that can be carried out in the database mainly include data query and data update ( Insert 、 Delete and modify ), Abbreviation: increase 、 Delete 、 Change 、 check .

(3) Data constraints : Data constraints are a set of data integrity rules . Data integrity rules are the constraints and dependency rules of data and its connections in the data model . for example : Entity integrity in relational data model 、 Referential integrity and user-defined integrity . Data constraints are used to ensure the correctness of data in the database 、 Effective and compatible .

3、 Give three actual departments E-R chart , It requires one-to-one between entities 、 One to many 、 Many to many contact .

answer :

 Insert picture description here

4、 There are several departments in the school , Each department has several classes and teaching and research sections , There are several teachers in each teaching and research room , Some professors and associate professors each bring several graduate students . There are several students in each class , Each student takes several courses , Each course is selected by several students . Please use E-R Draw a conceptual model of the school .

answer :

 Insert picture description here

5、 A factory produces several kinds of products , Each product consists of different parts , Some parts can be used in different products . These parts are made of different raw materials , The materials used for different parts can be the same . These parts are placed in the warehouse according to their different products , Raw materials are stored in several warehouses by category . Please use E-R Picture the products of this factory 、 Spare parts 、 material 、 Conceptual model of warehouse .

answer :

 Insert picture description here

6、 Why are currently used database management systems mostly relational ?

answer : Relational database takes relational model as the organization form of data . The relational model is based on strict mathematics , The main advantage of relational database is the single concept , Access path is transparent to users , Users do not need to understand complex access paths . Users only need to explain what to do , There is no need to explain how to do it , Simple and easy to use . Relational model has gradually replaced hierarchical model and mesh model , It is called the mainstream of database management system .

Two 、 choice question

1、 Which of the following is not the nature of the conceptual model ?(D)

(A) Have rich semantic expression ability (B) Easy to communicate and understand (C) Easy to change (D) The efficiency realized in the computer is high

2、 The data model using two-dimensional tables to represent entities and the relationships between entities is (C).

(A) Mesh model (B) hierarchical model (C) relational model (D) Object oriented model

3、 One machine can process many kinds of parts , Each part can be processed on multiple machines , There is (C) contact .

(A) one-on-one (B) One to many (C) Many to many (D) For one more

4、 The hierarchical model cannot directly represent (C).

(A) One to one contact (B) One to many connection (C) Many to many (D) One to one and one to many contact

5、(B) A model belonging to the information world , It is actually an intermediate level from the real world to the data world .

(A) Data model (B) conceptual model (C)E-R chart (D) relational model

6、 The wrong description of the relational model is (D).

(A) Based on strict data (B)DBMS Most of them use relational data model
(C) One of its characteristics is to use two-dimensional tables to represent relational models (D) Without connection operation DBMS It can also be a relational database system

7、 Candidate code in relation model (C).

(A) It can be composed of any attribute (B) It consists of at most one attribute
(C) It can be composed of one or more attributes whose values can uniquely identify tuples (D) None of the above

原网站

版权声明
本文为[Rsda DBA_ WGX]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/188/202207071009028136.html