Database Principles FAQ

Source: Internet
Author: User

Frequently Asked Questions

1. What are the characteristics of the database system (especially relative to the file system)?

① data sharing, especially for data field sharing. ② High data independence. ③-oriented data structure model of the whole. ④ controllable redundancy. Unified management and control of ⑤ data.

2. Describe the nature of the relationship?

① any of the two tuples cannot be fully identical. ② tuples are non-ordered. The ③ property is non-ordered. The ④ property must have a different name, and different properties can come from a single domain. ⑤ the attribute values (the same column) at the same property name are the same type of data and must be from the same domain.

3. What are the major phases of the database design process? Which phases are independent of the database management system?

Which phases depend on the database management system.

4 main phases: Requirements analysis, conceptual design, logical design and physical design; requirements analysis and conceptual design are independent of database management systems, logical design and physical design depend on database management system.

4. What is the meaning and function of the data dictionary?

A data dictionary is also often referred to as a data directory or system directory , which is a database of database-related information for the object, the data dictionary always contains a database of the various levels of the definition and description of the model, the system State of the table of contents, the role of It helps users, database administrators, and the database system itself to use and manage the database system.

5. Describe your understanding of the data model.

A data Model is a set of strictly defined sets of concepts. These concepts accurately describe the static, dynamic, and integrity constraints of the system.

The data model is used for modeling the information world, it is the first abstraction of the real world to the information world, is a useful tool for database designers to design database, and also the language of communication between database designers and users. It has a strong semantic expression ability, and simple, clear, easy to understand the user.

6. What are the basic components of a database application system?

The basic composition of database application system includes three parts: Database (db), Database management System (DBMS) and database application.

7. What is the function of the SQL language?

SQL features include: data definition, data manipulation and data control.

8. The main steps of database conceptual design are briefly introduced.

(1) to abstract the data, design the local conceptual model, (2) synthesize the local conceptual model into a global conceptual model, (3) review.

9. What are the stages of the development of the database application system?

p142,7 a stage

10. Briefly describe the relationship between domain, Cartesian product and tuple.

Given a set of domain,,...,, these fields can have the same. ,,..., Cartesian product is: xx...x={(,,...) |,i=1,2,..., n} Each of these elements (,,...) It is called an n-tuple or simply a tuple.

The Cartesian product can be expressed as a two-dimensional table. Each row in the table corresponds to a tuple, and each column in the table corresponds to a field.

11. What is the E-r diagram, and what are the basic elements of the E-r diagram?

E-r diagram is an information modeling tool that provides a way to represent entity types, attributes, and relationships. The basic elements are

Solid type: represented by a rectangle.

Properties: Represented by an ellipse and joined with the corresponding entity (attribute) with no edges.

Contact: With a diamond, and with the non-edge of the relevant entities connected to each other, and in the non-edge of the contact type.

12. What are the main tasks of the database implementation phase?

The main tasks of the database implementation phase are

⑴ establish the structure of the database. ⑵ data is loaded. ⑶ Application writing debugging. ⑷ database trial run.

13. What are the components of the client/server system structure?

The client/server system structure consists of three parts: server platform, client platform, network connection support.

14. What is the OO model and what are the core concepts of the OO model?

An OO model is a model that describes the logical organization of real-world entities (objects), the constraints between objects, and the relationships between object-oriented viewpoints. Its core concepts are:

Object and object identification any entity in the real world is uniformly modeled as an object, with each object having a unique identity, called an object identity.

Encapsulating each object is an encapsulation of its state and behavior.

Class shares all objects of the same property and method set constitute an object class (the abbreviation Class), and an object is an instance of a class.

Class hierarchy a set of classes that object-oriented database schemas form a finite hierarchy.

Message objects communicate externally with the message that is typically passed through the display.

15. Briefly describe the contents and meanings of the two-stage lock protocol.

A two-phase lock association means that all transactions must be locked in two stages on a data item.

⑴ before reading or writing any data, the first thing to do is to apply for and obtain a blockade of that data item.

⑵ after releasing a blockade, the transaction no longer applies for and obtains any blockade.

The meaning of the two-segment lock is that a transaction is divided into two stages. The first stage is to obtain a blockade, at which point the transaction can request any type of lock on any data item, but cannot release He Yi; the second stage is to release the blockade and also become the contraction phase at which the transaction can release any type of lock on any data item.

16. What are the characteristics of the conceptual model?

The main features of the conceptual structure are:

⑴ can truly and fully reflect the real world. ⑵ easy to understand. ⑶ easy to change and expand. ⑷ is easy to convert to a variety of different data models. ⑸ is independent of the machine and is more stable than the data model.

The process of conceptual design is based on the bottom-up method, usually divided into two steps, the first step is to abstract the data and design the partial view, the second step integrates the global view to get the global conceptual structure.

17. The meaning and process of correlated subqueries in SQL language is briefly described.

The inner query of the correlated subquery is related to the outer query, and the query condition in the subquery depends on the property value of the outer parent query.

。 The process of its query is: First take the outer query in the first tuple of the S table, based on its property values related to the inner query processing the inner query, if the WHERE clause return value is true, then take this tuple into the result table, and then check the next tuple of the S table, repeat the process until the S table is fully checked.

18. Which parts of the application can be decomposed in C/s environment?

The application of C/s environment can be decomposed into four parts: interface display logic, application logic, thing logic and data management.

19. The basic idea of database application system of client/server architecture is briefly introduced.

In the database application system with the client/server architecture, the database management system is usually installed on the server side to complete the transaction processing and data access control, and the user application is installed on the client side to implement the user interface and front-end application processing.

20. What are the characteristics of distributed database system?

Distributed databases have the following characteristics:

⑴ data Independence, the distribution transparency is introduced.

⑵ centralized control structure combined with autonomy, site autonomy, and a centralized control mechanism.

⑶ data redundancy improves system reliability and facilitates retrieval.

⑷ global consistency, serializable, and recoverability.

21. Describe the main features of SQL language?

SQL is a universal, highly functional relational database language, which has the following characteristics.

Integrated unified, set DDL, DML, DCL function in one, language style unified, can complete various operations on the database.

Highly non-procedural, the system automatically completes the access path, SQL statement operation process.

Set-oriented operation mode;

Provide two ways of using the same grammatical structure;

Simple language, easy to learn and easy to use.

22. What is the third paradigm (3NF), BC Paradigm (BCNF) in the normalization theory of the database?

P115

23. This paper briefly describes the ways in which the database management system protects the database.

This is achieved through four aspects, respectively:

Data security control, data integrity control, data concurrency control, database recovery.

24. What does the composition of the database system contain?

Computer hardware, computer software, database, database administrator

25. What is the difference between an equivalent connection and a natural connection?

In the Cartesian product of two relations, we select the tuple which satisfies certain conditions, called the connection, also called the connection. The join operation for "=" is called an equivalent connection. That is, from the generalized Cartesian product of the relationship R and S, select the tuple with the equal value of the B attribute.

A natural connection is a special equivalence connection that requires that the components in the two relationships be compared in the same set of attributes, and that the duplicate attribute columns are removed from the result.

General connection operations are performed from the point of view of a row, while natural joins are performed at the same time from both the row and column angles.

26. This paper describes the transformation rules of conversion from E-R graph to relational model.

Conversion rules for E-R diagrams to relational models are

⑴ an entity type into a relational pattern.

⑵ a 1:1 link, add one of the code to another master, also can be regarded as a special case of m:n processing.

⑶ a 1:n contact, add 1 of the code to the N-side, can also be regarded as a special case of m:n processing.

⑷ a m:n connection, converted to a relational schema, with the code of the related entity as the attribute.

⑸ three entities and more than the multi-link, converted to a relational pattern, with the code of the relevant entity as a property.

⑹ a relational pattern with the same code can be merged.

27. In the combination of OO technology and DB technology, which two different approaches have been taken?

P278

28. What are the stages of database design? In each stage of database design, which two links should be treated emphatically, why?

A: The two most important aspects of database design are requirements analysis and conceptual design .

Demand analysis is the basis of the whole database design, which determines the quality and speed of database design and the success of the whole project.

Conceptual design is the key link, and the conceptual model has a far-reaching impact on the whole database design.

29. What does the SQL view do?

A: The function of the view includes: (1) The view simplifies the operation of the user, and (2) The view enables the user to view the same data in a variety of ways; (3) The view provides a degree of logical independence to the refactoring database, and (4) The view can provide security protection for confidential data.

30. A brief introduction to the relationship between DB, DBMS, and DBS?

A: The database (DB) is the warehouse where the data is stored, that is, the data is stored in a certain format on the computer storage device. A database management system (DBMS) is a layer of data management software that is located between the user and the operating system.

A database system (DBS) is a system that introduces a database into a computer system, typically consisting of a database (db), a database management system (DBMS) and its development tools, application Systems, database Administrators (DBAs), and users.

31. What is the concept of contact? How many different types of contacts are there? Some examples of the two-yuan relationship are given.

A: Contact is the correlation between entities; There are 3 types of cases: one-yuan contact, two-yuan contact (two different entity sets of links), multiple linkages. The relationship between the workshop and the product, the department and the staff, the students and the curriculum, is a typical two-yuan connection;

32. Try to write the definition of 2NF. What happens when a relational pattern is not 3NF?

A: The definition of 2NF: When the relationship mode R is 1NF, and each non-primary attribute full function depends on the candidate key. When a relational pattern is not 3NF, each non-primary property may pass a candidate key that relies on R. The candidate keys for R may also be partially dependent. can result in data redundancy and operation exceptions.

33. What are the new problems with concurrency control for databases, and what are the main reasons? What is the method mechanism used?

A: There are three types of data inconsistencies caused by concurrent operations:

①, ② non-repeatable read problem, ③ read dirty data problem.

The main reason for the problem of three types of data inconsistency is that the concurrency of the transaction destroys the isolation of the transaction. The main technique of concurrency control is blocking.

34. What are the three types of integrity rules that a relational model must follow? Explain the meaning of these rules and how to implement them respectively.

A: The relational model must follow entity integrity, referential integrity, and custom integrity rules. Entity integrity guarantees that each tuple is distinguishable by defining (candidate key) primary key implementation; Referential integrity assurance (inter-table) attribute data consistency by defining primary and foreign keys, foreign keys and primary keys; custom integrity rules are limited by user-defined data consistency.

35. Briefly describe the basic idea and purpose of the normalization of the relationship model.

A: The basic idea of normalization is to gradually eliminate inappropriate parts of the data dependency, so that the pattern of the relationship pattern to a certain degree of separation, let a relationship to describe a concept, an entity or a connection between entities. The purpose of normalization is to study how to eliminate the drawbacks of relational patterns, including inserting exceptions, deleting exceptions, modifying exceptions, and data redundancy.

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.