2015 second half of Software designer Test Center, difficulty 3

Source: Internet
Author: User

Database Level Three mode

Includes: external mode, mode, and internal mode. User-level corresponding external mode, concept-level correspondence mode, physical-level corresponding internal mode

  

In a database system, only a unique database, so as to define, describe the database storage structure within the schema and definition, description of the database logical structure of the pattern is also unique, but the database system based on the application is very broad and diverse, so the corresponding external mode is not unique, and can not be unique.

Application view according to the external mode of data manipulation, through the external mode of a pattern mapping, define and establish an external mode and the corresponding relationship between the pattern, the external mode and mode, when the pattern changes, as long as the change of its mapping, you can make the external mode remains unchanged, the corresponding application can remain unchanged ; (logical)

Through the pattern mapping, we define the correspondence between the logical structure (pattern) of the data and the storage structure (inner mode), and when the storage structure of the data changes, we can keep the pattern unchanged by changing the pattern mapping in the mode one, so the application can remain unchanged. (Physical nature)

Database normalization:

1. First paradigm (1NF): Minimum requirements. Not satisfied, it cannot be called a relational database

attribute is not divided. is an atomic constraint on a property that requires an attribute to be atomic and non-biodegradable

2. Second normal form (2NF): Conforms to 1NF, and the non-primary attribute is completely dependent on the code (a property or group of attributes that can uniquely determine a tuple). Unique constraints on records require that records have unique identities, that is, the uniqueness of the entity, more generally speaking there is a primary key ID

3. The third paradigm (3NF): Conforms to 2NF, and eliminates transitive dependencies. is a constraint on the redundancy of the field, that is, any field cannot be derived from another field, it requires no redundancy in the field.

No data redundancy database is not necessarily the best database, so there is no redundant design, to be integrated to consider.

4.BC paradigm (BCNF): Conforms to 3NF, and the primary attribute is not dependent on the primary attribute. If the relationship pattern is in the third paradigm, and each attribute is not passed by a key code, then r belongs to the BC paradigm.

The left side of each non-trivial dependency must contain a key code, and each determinant must contain a key code.

Checks both the non-primary property and the primary property. When only the non-primary attribute is checked, it becomes the third paradigm. The relationship of the BC paradigm must satisfy the third paradigm.

If a relationship reaches the third paradigm, and it has only one candidate code, or if each candidate is a single attribute, the relationship naturally reaches the BC paradigm.

Generally, a database design conforms to 3NF or BCNF.

5. The IV Paradigm (4NF): Requires the deletion of many-to-many relationships within the same table.

Add some logic to the BCNF to ensure that every a multi-valued dependency is dependent on the super-key (superkey)

6. Model V (5NF): Re-establishing the original structure from the final structure.

  On the basis of 4NF, each connection of the table dependency is the result of a candidate key

Summarize:

  

The architecture of the database system

1. Centralized Database system:

Data set, data management set. All functions of the database system, from the form of the user interface to the DBMS core, are concentrated on the computer where the DBMS resides.

2. Client/server architecture

The responsibilities between client and server CPU are clear, the client is mainly responsible for data representation service, and the server is mainly responsible for database service. Includes: Transactional server (query server), data server

3. Parallel database system

Multiple CPUs that are physically connected together. Includes: Shared-memory multi-processor, no-shared parallel architecture

  

4. Distributed Database system: ddbms,distributed Management System

Multiple geographically separate CPUs. Includes: physical distribution, logically centralized distributed structure, physical distribution, logical distribution of distributed database structure

Data transparency: For users, there is no need to know the storage of data, fragmentation, location situation

(1) Shard transparency: is the highest level of distribution transparency, fully distributed and transparent . logical shards regardless of data (global view, shard view)

The global relationship can be manipulated without considering how the relationship is fragmented and the specific shard situation

operate on global relationships only, regardless of the fragmentation of the data. When the Shard mode changes, the global schema to the Shard mode image (Image 2 in Figure 11-1) is changed, without affecting the global schema and the application. The global schema is the same, the application does not have to be rewritten, which is shard transparency

In the distributed database, the global database is composed of the logical combination of each local database, whereas the local database is separated by some logic of the global database.

(2) Position transparency: Intermediate distribution transparent . Regardless of the specific location in which the logical fragment is stored. The user cannot discriminate the physical location of the resource in the system, which is achieved by naming it; (Shard view, distribution view)

After the global relationship is partitioned into shards, the shards are positioned on each node so that each shard has at least one node address. If the application does not have to include the node address of the data, known as the system's location transparency, the application only provides the relationship name or shard name to be accessed, and the node address is isolated from the data dictionary by the system. A system with positional transparency, where shards are moved between nodes, as long as the login data in the data dictionary is changed, the availability of the application is not affected.

(3) Local transparency (local data Model transparency): Low-level distribution transparent . Only the specific database storage and management of this site are blocked to the user. (Assign view, local concept view)

In heterogeneous situations, this transparency avoids the user's implementation of different data model transformations

    do not care about the specific organization of data . 3 the lowest in the transparent way

  

(4) Replication transparency: Regardless of where the copy of the data is stored and how many specific nodes

(5) Access to transparency: the different data representation and the way to access the resources to hide;

(6) Migration transparency: the movement of resources does not affect the way that resources are accessed;

(7) Reposition transparency: resources are relocated while receiving access, without attracting user and application attention;

(8) Concurrency transparency: access to shared resources, so that no one user will feel that others are also using the resources they are using;

(9) Failure transparency: The user will not notice that a resource is not working properly, and the system then recovers from the failure process.

2015 second half of Software designer Test Center, difficulty 3

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.