Database: If the function relying on the set F satisfaction: (1) each function dependent on each function is single attribute; (2) any of the functions depend on x → A, its f- {x → A} and F Not equivalent; (3) any function depend on X → A, Z is x subset. (F- {x → a}) ∪ {z → a} and F inequality. It is called F to a minimum function.
1, there is a relationship model R (A, B, C, D, E), f is the function of the function established on R, f = {ABC → DE, BC → D, D → E}, trial R reaches the first few Paradigm and explain the reason. A: R is 1NF. Since the candidate key is ABC. The non-primary attribute D and E part functions depend on the candidate key ABC, so R is not 2NF, which can only be 1NF. 2, analysis, relational model R (u, f) u = abcdeg, f = {ad → E, AC → E, CB → G, BCD → AG, BD → A, AB → G, A → C} (1) Ask the minimum function of this model to rely on. (2) Candle code for the relationship mode. (3) This relationship model is the highest level of paradigm. (4) Decompose this model according to the requirements of pattern decomposition to 3nF. According to the question, it is obtained: (1) Classifying the right part by the minimum summary: Right, f = {ad → e, ac → e, bc → g, bcd → A, BCD → G, BD → A, AB → g, a → c} eliminate the redundant attributes on the left: f = {ad → e, a → e, bc → g, bd → A, BC → G, BD → A, AB → G, A → C} elimination The redundant function is dependent: fm = {A → E, BC → G, BD → A, A → C} can also be: fm = {A → E, AB → G, BD → A, A → C} (2 Candidate: BD (3) R Each non-main property full function depends on the candidate key BD of R; but both C, G, E pass the candidate key BD dependent on R, that is, R satisfies 2NF requirements. Not satisfying 3NF requirements. This relationship model is up to 2NF. (4) Based on algorithm 4.4 (5) R1: U1 = ABD F1 = {BD = BCG F2 = {BC =} R3: U3 = ACE F3 = {A → C, A → E}
Mode Decomposition Trial Analysis The following decomposition has the characteristics of lossless coupling and retention function: set R (ABC), F1 = {A → B} is established on R, ρ1 = {ab, ac}. First, check if there is a loss of lossless coupling: 1st solution - Algorithm 4.2: A b CAB A1 A2 B13AC A1 B22 A3A B CA1 A2 B13A1 A2 A3
(1) Table (2) Processing according to A → B
As a result, the second line is all A line, so the decomposition is non-destructive joint decomposition. 2nd solution: (theorem 4.8) R1 (ab) r2 (AC) = Ar2- R1 = B∵A → B, ∴ This decomposition is a lossless connection decomposition. Then, check if the decomposition keeps the function dependent πr1 (f1) = {A → b, and some of the function depends on some of the anti-rate launched} πr2 (f1) = {Some functions launched according to the anti-rate dependent} F1 πr1 (F1) This is implicit, and the decomposition holds the function dependence.
[Example] Set T1, T2, T3 is the following three transactions, where R is a data item in the database, and the initial value of R is 0. T1: R: = R 5 T2: R: = R * 3 T3: R: = 2 If three transactions are allowed in parallel, the probable result is listed. What means can I solve the inconsistency of parallel schedule? A: There are 6 possible situations (1) T1-T2-T3: r = 2 (2) T1-T3-T2: R = 6 (3) T2-T1-T3: R = 2 (4) T2-T3 -T1: r = 7 (5) T3-T1-T2: R = 21 (6) T3-T2-T1: R = 11 The blockade can solve the inconsistencies of the parallel schedule. Test DBMS's maintenance feature of the database. A: There are four utilities in DBMS to use to use the database administrator to run the database system, play the function of database maintenance: (1) Data Loader (2) Backup program (3) File Organizational Program (4) Performance Monitoring. What is the content and role of the data dictionary? A: The content of the data dictionary generally includes data items, data structures, data streams, data storage, and processing processes. Its role is to make a detailed description of data in the system, providing centralized management of database data. 60. The four properties of testicai, and explain what benefits have each nature to DBS? A: The four properties of the transaction are: atomic, consistency, isolation and persistence. Atomic: It is the basis for ensuring database system (DBS) integrity. All the operations of the database in a transaction are an indiscrowable operation sequence. Consistency: The result of a business independent implementation will guarantee the consistency of the database, that is, data does not suffer from the implementation of the transaction. Isolation: When the isolation requirement is performed in concurrent affairs, the system should ensure that the results are performed with these transactions separately, so that the transaction is as performed in a single user environment. Persistence: Requirements to all updates to the database should be reflected in the database for all updates of the database. 91 What are the advantages and disadvantages of the distributed database system? A: Advantages of distributed database systems are: (1) Having flexible architecture (2) Adapt to distributed management and control mechanisms (3) Superior economic performance (4) system High reliability, good availability (5) Square response speed (6) is well scalable, easy to integrate existing systems. Disadvantages of distributed database system: (1) The system is overhead, which is mainly spent on the complex access structure in the communication section (2). It is the technology that effectively access data in a centralized system, and it is no longer applicable in the divided system. (3) The safety students and confidentiality of the data are difficult to handle. 92 Distributed Database What strategies? "Data Split"? What strategies? Data fragmentation? A: The data allocation strategy mainly: centralized: All data is arranged in the same venue on. Split: Only one data is placed in several venues, respectively. Full replication: Data Repeats in each site. Hybrid: Database is divided into several intersecting subsets, each subset is placed on one or more sites, but each site may not save all data.
The data fragmentation has the following three types: Horizontal fragmentation: divide all of the metabits of global relationships into a number of non-intersecting subsets, each subset of which is a fragment of each subset. Vertical Split: Spread a global relationship attribute set into a number of subset and do projection operations on these subsets, each spoosal for vertical fragmentation. Hybrid Split: Integrated the horizontal fragmentation with a vertical fractionation method is a mixed slice. The criteria that the data slice should follow: (1) Equity: All data must be mapped into individual segments, never allowing a certain data that belongs to a global relationship is not to be any piece. (2) Reconstruction conditions: The method used by division must ensure that the global relationship can be reconstructed by each fragment. (3) Do not intend to: requesting a global relationship to be divided into each data fragment does not overlap each other. 102 In a typical distributed DBMS, which level is divided into which level is divided into three levels: (1) Server-level software: Local data management (2) Client software: responsible for distributed management, from data The information distributed in the dictionary is dealt with and handles global queries involving multiple sites. (3) Communication software: responsible for providing data transmission between each site. Multi-value dependencies: Multi-value dependencies: R (u) is a relationship mode in the property set U, X, Y, Z is a subset of u, and z = uxy, represents the attribute set X, respectively, respectively The value of Y, Z, as long as R is the relationship between R, and the group (X, Y1, Z1) and (X, Y2, Z2) are present, and there is also a group (X, Y1, Z2) and ( X, Y2, Z1), which is called MultiValued Dependency MVDs X → → y in the relational mode R. Multi-value dependencies: Setting R (u) is a relationship mode on the property set U. X, Y, Z is the subset of u, and z = u-x-y. The multi-value dependencies of the relational mode R (U) are established, and when and only the relationship between R (u) R, a given pair of (x, z) values have a set of Y, this group The value is only determined in the X value and is independent of the z value.
Multi-value dependence has the following properties: Multi-value dependence has symmetry. That is, if x → → y, then x →→ z, where z = u-x-y is. Multi-value dependence. That is, if x → → y, y → z, then x → → z-y. The function reliance can be regarded as a special case of multi-value dependencies. That is, if x → y, x → → y. This is because when X → Y, each of the X, Y has a determined value y and the corresponding value Y, so X →→ y. If x → → y, x → → z, then x →→ yz. If x → → y, x → → z, then x →→ y∩z. If X → → y, x → → z, then x → → y-z, x → → z-y.
Multi-valued dependence is compared with the function dependencies, with the following two basic distins: multi-value dependence validity is related to the range of attribute sets. If X → → y is established on the u, it is set on W (XY W u); it is not necessary, ie → → y is established on W (W u), and it is not necessarily established on the U. This is because in the definition of multi-value dependencies involve attribute groups x and y, but also involves the remaining attribute Z in the U. In general, if X → → y is established on the W (W u), the embedded multi-value dependence of x → → y is R (u) is referred to. However, the validity of the function dependent X → Y is only determined in the value of the X, Y. As long as in any of R (u), the ing group is satisfied with the value of X and Y satisfies the definition 5.L, the function depends on the X → Y is established on any attribute set W (XY W u).
If the function is dependent on X → Y, it is established for any Y 'Y'. Multi-value dependencies, if we set up on R (u), we can't assert that any Y 'Y has X → → Y' is established. Non-flability dependence: For the function dependent x → y, if Y X, then X → Y is a "non-flat function dependency". The fourth paradiglass (4nF) relational mode R ∈1nf, if each non-thermal multi-value dependency of R . 4nf is a multi-value dependence between the attributes that limit the relationship mode. Because of the definition, for each non-flavible multi-value dependency x → → y (y x), x includes a candidate code, and is otherwise x → y, the non-thermal multi-value dependence of 4NF is actually dependent on the function. Obviously, if a relationship is 4nf, it will be BCNF. Function-dependent and multi-value dependence is two most important data dependencies. If only the function is dependent, the relationship model that belongs to BCNF is very perfect. If you consider multi-value dependence, it is already perfect. In fact, there is a connection dependence in addition to function dependent and multi-value dependence. Function dependence is a special case of multi-value dependencies, and multi-value dependence is actually a special case of connection dependence. However, connection-dependent is unlike functional dependent and multi-value dependence, it can be derived from semantics, but reflects when the connection is connected. There may still be issues such as data redundancy and insertion, modification, and delete anomalies. If the connection dependence existing in the relationship pattern belonging to 4nf is eliminated, it can be further projected to decompose a relationship mode of 5nf. So far, 5nf is the final paradigm. The fifth paradigm (5nf) We improve the paradigm of the paradigm is to decompose, replaced a relationship with projections, which generally can receive the original relationship. However, there is a relationship that cannot be decomposed into two projections, and can be broken down into more than three projections. As in Figure 1, the relationship ABC can be broken down into two projection ABs (or AC and BC). AB and BC are connected to ABC2; ABC2 and AC are connected to ABC3. Obviously, the ABC2 is more than a group (A2, B1, C2) than the relationship ABC (A2, B1, C2), referred to as a parasitic tuple. The ABC2 is connected to the AC, which has the same relationship ABC3, and the original relationship. Therefore, the relationship ABC has a connection dependent JD * (A, B, C).
Figure 1 defines: If each of the relational mode R is dependent, it is contained by the candidate key of R, and R is the fifth paradigm, which is recorded: r∈5nf.