response.getWriter (). The difference between write () and out.print ()

2023-01-23   ES  

First understand a few concepts:

1) The process of decomposing a relationship pattern into several relationship modes is called

The decomposition of theRelationship mode.

2) The method of decomposing a low -level relationship mode into several high -level relationship patterns is not unique.

3) Only the equivalent of the relationship mode that can ensure the decomposition mode is equivalent to the original relationship mode, and the decomposition method is meaningful.

For the first sentence, why do you need to decompose the relationship mode?Because the original relationship mode may cause data redundancy or

Bring potential inconsistency to the database.For the second sentence, according to different semantics, the principle of decomposition is not exhausted

Same, so the method is definitely not unique, such as u = {a, b, c}, according to different principles (you set it yourself),

may be divided into (a, b) (a, c) or it may be divided into (b, c) (a, c). For the third sentence, this article is required

Speaking of content.

To ensureThe relationship between the relationship mode after decomposition is equivalent to the original relationship mode, we must determine 1) The row of the line after decomposition

Whether it is a non -destructive connection 2) Whether to keep the function dependencies

1. Decision of non -destructive connection:

1)If the relationship mode after decomposition is shape such as {U1, U2}, there are only two inside, that’s very easy to do, judge

      orWhether it is established, if it is established, it must be

non -destructive connection.

2)If it is two or more{U1, U2, U3 ….} This is more troublesome,For example, there is a collection of attributes,

abcdef, there is such a function dependency set {a-> BC, CD-> E, B-> D, be-> F, EF-> A}, and then there is

This decomposition {abc, bd, bef}.

For example:

U1 = ABC, U2 = BD, U3 = BEF, according to the function dependency set provided, we can get U1 existing

function dependencies

The function on theA->BC,U2 dependence is B->D,U3’s function dependencies areBE->F。

1) So construct such tables.

BE->F           d

2) Determine whether A, B, C, D, E, F each has a function dependencies in the G column.

is recorded as BJI, indicating the first line I column i

Such as:

A->BC A1 (A is in the function dependencies, the first line of this behavior)          
BE->F B31 (A does not, this column is the first column)        

This way we can get the picture

A->BC a1 a2 a3 b14 b15 b16
B->D b21 a2 b23 a4 b25 b26
BE->F b31 a2 b33 b34 a5 a5

 3) The next is the key,If we get a series of transformations, there is a line that is like this

{A1, A2, A3, A4, A5, A6 …}, that is, there is no BJI,Then me

Thes believe that the decomposition is a non -destructive connection.

4) The transformation process: For convenience, we can pressA->BC, B->D,BE-> f this order (like you


first, according toA->BC,We know that the main health can identify a group group, that is, if

A exists in two attribute values the same, there is no doubt that the value of the BC they launched must be the same. From

We traversed column A in Form

, and did not find the same attribute group, then skipped.

Second times, according toB-> D, because the attribute value of column B is the same, then we modify the column D.When modifying, follow such one

rule,If there is a value like AI in D, it is announced to be modified to AI. If not, modify it to the first line of the column

The first value.From the table we can find that there is A4 in D, so after modification, it becomes:

A->BC a1 a2 a3 a4 b15 b16
B->D b21 a2 b23 a4 b25 b26
BE->F b31 a2 b33 a4 a5 a5

third pass, according toBE-> F, find a set of BE the same value, find that it does not exist, that is, there is no similar

{A1, A2, A3, A4, A5, A6} such a sequence, that is, the decomposition is not a non -destructive connection decomposition.

2. Does it maintain function dependencies?

This method of judgment is relatively simple, or this question,There is a collection of attributes,abcdef, existing this

function dependency set {a-> bc, CD->E , B->D , BE->F , EF->A}, then there isThis decomposition

{ABC , BD , BEF}。

set U1 = ABC, A->BC,U2=BD,B->D ,U3=BEF,BE-> F, that is, we cannot launchCD->E 

EF->A,So there is no characteristics that maintain function dependence



Related Posts

201909-3 Character drawing CCF CCSP

liunx file directory operation command

CSS space processing

c# word Find the replacement operation jane

response.getWriter (). The difference between write () and out.print ()

Random Posts

Javaweb Note — HTML/CSS Basic Learning 2 (Writing Specification of HTML File)

2020 school recruitment written test Xinhua Sanhanmo

SOJ 4454 (matrix fast power)

Android learning notes (1) Rayfong

Set up DVWA penetration test target