🗊Презентация Database Design and Administration

Категория: Информатика
Нажмите для полного просмотра!
Database Design and Administration, слайд №1Database Design and Administration, слайд №2Database Design and Administration, слайд №3Database Design and Administration, слайд №4Database Design and Administration, слайд №5Database Design and Administration, слайд №6Database Design and Administration, слайд №7Database Design and Administration, слайд №8Database Design and Administration, слайд №9Database Design and Administration, слайд №10Database Design and Administration, слайд №11Database Design and Administration, слайд №12Database Design and Administration, слайд №13Database Design and Administration, слайд №14Database Design and Administration, слайд №15Database Design and Administration, слайд №16Database Design and Administration, слайд №17Database Design and Administration, слайд №18Database Design and Administration, слайд №19Database Design and Administration, слайд №20Database Design and Administration, слайд №21Database Design and Administration, слайд №22Database Design and Administration, слайд №23Database Design and Administration, слайд №24Database Design and Administration, слайд №25Database Design and Administration, слайд №26Database Design and Administration, слайд №27Database Design and Administration, слайд №28Database Design and Administration, слайд №29Database Design and Administration, слайд №30Database Design and Administration, слайд №31Database Design and Administration, слайд №32Database Design and Administration, слайд №33Database Design and Administration, слайд №34Database Design and Administration, слайд №35Database Design and Administration, слайд №36Database Design and Administration, слайд №37Database Design and Administration, слайд №38Database Design and Administration, слайд №39

Содержание

Вы можете ознакомиться и скачать презентацию на тему Database Design and Administration. Доклад-сообщение содержит 39 слайдов. Презентации для любого класса можно скачать бесплатно. Если материал и наш сайт презентаций Mypresentation Вам понравились – поделитесь им с друзьями с помощью социальных кнопок и добавьте в закладки в своем браузере.

Слайды и текст этой презентации


Слайд 1






The 4th Normal Form (4NF) 
The 5th Normal Form (5NF)  and the Domain-Key Normal Form (DKNF) 
Converting a Table with Partial Dependencies 
into DKNF Tables
Converting a Table with Transitive Dependencies into 
DKNF Tables

Converting into DKNF a Table in Which Not Every Determinant Is a Candidate Key

Converting a Table with Multivalued Dependencies into DKNF
Single-Theme Tables and the DKNF

  
Описание слайда:
The 4th Normal Form (4NF) The 5th Normal Form (5NF) and the Domain-Key Normal Form (DKNF) Converting a Table with Partial Dependencies into DKNF Tables Converting a Table with Transitive Dependencies into DKNF Tables Converting into DKNF a Table in Which Not Every Determinant Is a Candidate Key Converting a Table with Multivalued Dependencies into DKNF Single-Theme Tables and the DKNF   

Слайд 2






The 4th Normal Form is concerned with the anomalies that can occur when a table fails to have the property of containing no multivalued dependencies (i.e., the anomalies that can occur when a table does have such dependencies). 
We develop below a table that has these undesirable multivalued dependencies.
Описание слайда:
The 4th Normal Form is concerned with the anomalies that can occur when a table fails to have the property of containing no multivalued dependencies (i.e., the anomalies that can occur when a table does have such dependencies). We develop below a table that has these undesirable multivalued dependencies.

Слайд 3





Suppose we have some information about the hobbies of some students at Enormous State University and want to put this information into a database. Suppose, in particular, that Jack Jones's hobbies are surfing the Internet and playing chess; 
Suppose we have some information about the hobbies of some students at Enormous State University and want to put this information into a database. Suppose, in particular, that Jack Jones's hobbies are surfing the Internet and playing chess; 
Lynn Lee's, photography and stamp collecting; Mary Ruiz's, surfing the Internet and photography; and Lynn Smith's, playing poker.
Описание слайда:
Suppose we have some information about the hobbies of some students at Enormous State University and want to put this information into a database. Suppose, in particular, that Jack Jones's hobbies are surfing the Internet and playing chess; Suppose we have some information about the hobbies of some students at Enormous State University and want to put this information into a database. Suppose, in particular, that Jack Jones's hobbies are surfing the Internet and playing chess; Lynn Lee's, photography and stamp collecting; Mary Ruiz's, surfing the Internet and photography; and Lynn Smith's, playing poker.

Слайд 4


Database Design and Administration, слайд №4
Описание слайда:

Слайд 5





The problem is that Jack Jones, for example, has two majors and two hobbies. 
The problem is that Jack Jones, for example, has two majors and two hobbies. 
If we coupled each of his majors with just one of his hobbies (e.g., LIS with chess, or Public Affairs with surfing the Internet), we would imply that Jack plays chess only as an LIS major and surfs the Internet only as a Public Affairs major. 
This would not make sense. (Note that in this relatively small and simple example, it is obvious that such restrictive pairing does not make sense.
Описание слайда:
The problem is that Jack Jones, for example, has two majors and two hobbies. The problem is that Jack Jones, for example, has two majors and two hobbies. If we coupled each of his majors with just one of his hobbies (e.g., LIS with chess, or Public Affairs with surfing the Internet), we would imply that Jack plays chess only as an LIS major and surfs the Internet only as a Public Affairs major. This would not make sense. (Note that in this relatively small and simple example, it is obvious that such restrictive pairing does not make sense.

Слайд 6





In practice, however, the problems arise in connection with much larger tables, where it may be very difficult to detect that restrictive pairing has occurred.) 
In practice, however, the problems arise in connection with much larger tables, where it may be very difficult to detect that restrictive pairing has occurred.) 
To avoid such false implications, we enter all pairings of majors and hobbies for all the students. Obviously, however, this approach has the problem of redundant information. 
Equally obviously, updating this table presents anomalies; for example, you can work out for yourself what would have to be added to Table7 if Jones took up tennis as a third hobby.
Описание слайда:
In practice, however, the problems arise in connection with much larger tables, where it may be very difficult to detect that restrictive pairing has occurred.) In practice, however, the problems arise in connection with much larger tables, where it may be very difficult to detect that restrictive pairing has occurred.) To avoid such false implications, we enter all pairings of majors and hobbies for all the students. Obviously, however, this approach has the problem of redundant information. Equally obviously, updating this table presents anomalies; for example, you can work out for yourself what would have to be added to Table7 if Jones took up tennis as a third hobby.

Слайд 7





This situation is an example of the effects of multivalued dependencies. 
This situation is an example of the effects of multivalued dependencies. 
A multivalued dependency occurs when 
(a) a table has at least three attributes, 
(b) two of the attributes are multivalued, and 
(c) the values of the multivalued attributes depend on only one of the remaining attributes. 
Table7 fits these specifications for the following reasons: 
The LastName attribute determines multiple values of the attributes Major and Hobby, but neither of these latter attributes depends on the other; they are independent.
Описание слайда:
This situation is an example of the effects of multivalued dependencies. This situation is an example of the effects of multivalued dependencies. A multivalued dependency occurs when (a) a table has at least three attributes, (b) two of the attributes are multivalued, and (c) the values of the multivalued attributes depend on only one of the remaining attributes. Table7 fits these specifications for the following reasons: The LastName attribute determines multiple values of the attributes Major and Hobby, but neither of these latter attributes depends on the other; they are independent.

Слайд 8


Database Design and Administration, слайд №8
Описание слайда:

Слайд 9





Tables 8 and 9 display, separately, the various students' majors and hobbies; and while doing so, these tables correctly avoid suggesting any connections between particular majors and particular hobbies.
Tables 8 and 9 display, separately, the various students' majors and hobbies; and while doing so, these tables correctly avoid suggesting any connections between particular majors and particular hobbies.
Описание слайда:
Tables 8 and 9 display, separately, the various students' majors and hobbies; and while doing so, these tables correctly avoid suggesting any connections between particular majors and particular hobbies. Tables 8 and 9 display, separately, the various students' majors and hobbies; and while doing so, these tables correctly avoid suggesting any connections between particular majors and particular hobbies.

Слайд 10


Database Design and Administration, слайд №10
Описание слайда:

Слайд 11


Database Design and Administration, слайд №11
Описание слайда:

Слайд 12





   The 5th Normal Form is difficult to illustrate in terms of relatively simple examples. 
   The 5th Normal Form is difficult to illustrate in terms of relatively simple examples. 
   
   Hence, we will not attempt to illustrate the 5NF property of having every join dependency in the table be a consequence of the candidate keys of the table. 
   
   This omission is a minor one, for at least two reasons: First, in practice the 4NF is often regarded as sufficient; and second, the Domain-Key Normal Form (DKNF) subsumes the 5NF.
Описание слайда:
The 5th Normal Form is difficult to illustrate in terms of relatively simple examples. The 5th Normal Form is difficult to illustrate in terms of relatively simple examples. Hence, we will not attempt to illustrate the 5NF property of having every join dependency in the table be a consequence of the candidate keys of the table. This omission is a minor one, for at least two reasons: First, in practice the 4NF is often regarded as sufficient; and second, the Domain-Key Normal Form (DKNF) subsumes the 5NF.

Слайд 13





The DKNF is important because it offers a complete solution to the problem of avoiding anomalies: 
The DKNF is important because it offers a complete solution to the problem of avoiding anomalies: 
A set of tables (relations) that is in DKNF is known, as a consequence of a theorem proved by Ronald Fagin in 1981, to be free of anomalies. 
We do not attempt here to reproduce the proof of Fagin's theorem but merely to illustrate how the theorem can be applied in practice.
Описание слайда:
The DKNF is important because it offers a complete solution to the problem of avoiding anomalies: The DKNF is important because it offers a complete solution to the problem of avoiding anomalies: A set of tables (relations) that is in DKNF is known, as a consequence of a theorem proved by Ronald Fagin in 1981, to be free of anomalies. We do not attempt here to reproduce the proof of Fagin's theorem but merely to illustrate how the theorem can be applied in practice.

Слайд 14





The DKNF definition is this: A relation is in DKNF if every constraint on the relation is a logical consequence of the definitions of keys and domains. 
The DKNF definition is this: A relation is in DKNF if every constraint on the relation is a logical consequence of the definitions of keys and domains. 
To understand what this definition means, we begin by noting that the central ideas are embodied in the words "constraint," "key," and "domain." 
By "key" Fagin means both primary keys and candidate keys.
Описание слайда:
The DKNF definition is this: A relation is in DKNF if every constraint on the relation is a logical consequence of the definitions of keys and domains. The DKNF definition is this: A relation is in DKNF if every constraint on the relation is a logical consequence of the definitions of keys and domains. To understand what this definition means, we begin by noting that the central ideas are embodied in the words "constraint," "key," and "domain." By "key" Fagin means both primary keys and candidate keys.

Слайд 15





By "domain" Fagin means the set of definitions of the contents of attributes (columns) and any limitations on the kind of data to be stored in the columns, such as a limitation to only numeric data or only logical data; in addition, domain limitations may include such matters as the format (e.g., a limitation on numeric data to being expressed to exactly two decimal digits). 
By "domain" Fagin means the set of definitions of the contents of attributes (columns) and any limitations on the kind of data to be stored in the columns, such as a limitation to only numeric data or only logical data; in addition, domain limitations may include such matters as the format (e.g., a limitation on numeric data to being expressed to exactly two decimal digits). 
By "constraint" Fagin means any rule dealing with attributes that is clear enough so that one can decide whether the rule is upheld or broken by any set of the data with which one is dealing.
Описание слайда:
By "domain" Fagin means the set of definitions of the contents of attributes (columns) and any limitations on the kind of data to be stored in the columns, such as a limitation to only numeric data or only logical data; in addition, domain limitations may include such matters as the format (e.g., a limitation on numeric data to being expressed to exactly two decimal digits). By "domain" Fagin means the set of definitions of the contents of attributes (columns) and any limitations on the kind of data to be stored in the columns, such as a limitation to only numeric data or only logical data; in addition, domain limitations may include such matters as the format (e.g., a limitation on numeric data to being expressed to exactly two decimal digits). By "constraint" Fagin means any rule dealing with attributes that is clear enough so that one can decide whether the rule is upheld or broken by any set of the data with which one is dealing.

Слайд 16





There is an important qualification to be attached to the DKNF definition as presented in the preceding paragraph. Fagin excludes constraints that are time-dependent or relate to changes made in data values. 
There is an important qualification to be attached to the DKNF definition as presented in the preceding paragraph. Fagin excludes constraints that are time-dependent or relate to changes made in data values. 
That means that a time-dependent constraint (or other constraint on changes in value) may exist in a table and may fail to be a logical consequence of the definitions of keys and domains, yet the table may nevertheless be in DKNF.
Описание слайда:
There is an important qualification to be attached to the DKNF definition as presented in the preceding paragraph. Fagin excludes constraints that are time-dependent or relate to changes made in data values. There is an important qualification to be attached to the DKNF definition as presented in the preceding paragraph. Fagin excludes constraints that are time-dependent or relate to changes made in data values. That means that a time-dependent constraint (or other constraint on changes in value) may exist in a table and may fail to be a logical consequence of the definitions of keys and domains, yet the table may nevertheless be in DKNF.

Слайд 17





As an illustration, some states have a property-tax rule specifying that the assessed value of the primary-residence property owned by a citizen over 65 cannot be increased above the value that was assessed in the year in which the property owner turned 65. 
As an illustration, some states have a property-tax rule specifying that the assessed value of the primary-residence property owned by a citizen over 65 cannot be increased above the value that was assessed in the year in which the property owner turned 65. 
The existence of such a rule would not, in itself, prevent a table of properties and their assessed values from being in DKNF.
Описание слайда:
As an illustration, some states have a property-tax rule specifying that the assessed value of the primary-residence property owned by a citizen over 65 cannot be increased above the value that was assessed in the year in which the property owner turned 65. As an illustration, some states have a property-tax rule specifying that the assessed value of the primary-residence property owned by a citizen over 65 cannot be increased above the value that was assessed in the year in which the property owner turned 65. The existence of such a rule would not, in itself, prevent a table of properties and their assessed values from being in DKNF.

Слайд 18





Achieving DKNF amounts to establishing a set of tables in each of which the constraints follow logically from (i.e., are logical consequences of) the keys and the domain definitions. 
Achieving DKNF amounts to establishing a set of tables in each of which the constraints follow logically from (i.e., are logical consequences of) the keys and the domain definitions. 
Although there is no direct procedure for converting an arbitrary table into one or more tables each of which is in DKNF, in practice the effort to replace an arbitrary table by a set of single-theme tables achieves the goal. 
To show this, we consider some of the previous examples from the DKNF point of view.
Описание слайда:
Achieving DKNF amounts to establishing a set of tables in each of which the constraints follow logically from (i.e., are logical consequences of) the keys and the domain definitions. Achieving DKNF amounts to establishing a set of tables in each of which the constraints follow logically from (i.e., are logical consequences of) the keys and the domain definitions. Although there is no direct procedure for converting an arbitrary table into one or more tables each of which is in DKNF, in practice the effort to replace an arbitrary table by a set of single-theme tables achieves the goal. To show this, we consider some of the previous examples from the DKNF point of view.

Слайд 19





Here once again is the table, Table3, that we used in our discussion of the problem of partial dependencies.  Since we going to use it here, we name this copy of it Table 10.
Here once again is the table, Table3, that we used in our discussion of the problem of partial dependencies.  Since we going to use it here, we name this copy of it Table 10.
Описание слайда:
Here once again is the table, Table3, that we used in our discussion of the problem of partial dependencies.  Since we going to use it here, we name this copy of it Table 10. Here once again is the table, Table3, that we used in our discussion of the problem of partial dependencies.  Since we going to use it here, we name this copy of it Table 10.

Слайд 20





Let us consider Table 10 from the DKNF point of view. First, we see that the key is composite, consisting of the LastName-FirstName pair of attributes. 
Let us consider Table 10 from the DKNF point of view. First, we see that the key is composite, consisting of the LastName-FirstName pair of attributes. 
We see also that all other attributes in the table are dependent on this key. 
But there is another significant aspect to this table: the Level attribute is dependent on the LastName attribute, i.e., Level is dependent on just part of the key. (As noted earlier, this partial dependency is contrived, but nevertheless it illustrates the problem of partial dependency.) 
Because Level is dependent on just LastName, the table fails to be one in which all constraints are logical consequences of the key; hence, Table 10 is not in DKNF.
Описание слайда:
Let us consider Table 10 from the DKNF point of view. First, we see that the key is composite, consisting of the LastName-FirstName pair of attributes. Let us consider Table 10 from the DKNF point of view. First, we see that the key is composite, consisting of the LastName-FirstName pair of attributes. We see also that all other attributes in the table are dependent on this key. But there is another significant aspect to this table: the Level attribute is dependent on the LastName attribute, i.e., Level is dependent on just part of the key. (As noted earlier, this partial dependency is contrived, but nevertheless it illustrates the problem of partial dependency.) Because Level is dependent on just LastName, the table fails to be one in which all constraints are logical consequences of the key; hence, Table 10 is not in DKNF.

Слайд 21





From the DKNF point of view, therefore, we see that we should take the Level attribute out of Table 10 and put it in some other table, or tables, where it will be a logical consequence of the keys and domains. Clearly, a table that associates just the attributes Major and Level will achieve this. 
From the DKNF point of view, therefore, we see that we should take the Level attribute out of Table 10 and put it in some other table, or tables, where it will be a logical consequence of the keys and domains. Clearly, a table that associates just the attributes Major and Level will achieve this. 
We will also need a table that provides the necessary link between the paired attributes, FirstName and LastName, and the attribute Major. In such a table, the attribute Major will be a logical consequence of the keys and domains.
Описание слайда:
From the DKNF point of view, therefore, we see that we should take the Level attribute out of Table 10 and put it in some other table, or tables, where it will be a logical consequence of the keys and domains. Clearly, a table that associates just the attributes Major and Level will achieve this. From the DKNF point of view, therefore, we see that we should take the Level attribute out of Table 10 and put it in some other table, or tables, where it will be a logical consequence of the keys and domains. Clearly, a table that associates just the attributes Major and Level will achieve this. We will also need a table that provides the necessary link between the paired attributes, FirstName and LastName, and the attribute Major. In such a table, the attribute Major will be a logical consequence of the keys and domains.

Слайд 22


Database Design and Administration, слайд №22
Описание слайда:

Слайд 23





Here once again is the table, Table4, that we used in our discussion of transitive dependencies. Since we going to use it here, we name this copy of it Table 11.
Here once again is the table, Table4, that we used in our discussion of transitive dependencies. Since we going to use it here, we name this copy of it Table 11.
Описание слайда:
Here once again is the table, Table4, that we used in our discussion of transitive dependencies. Since we going to use it here, we name this copy of it Table 11. Here once again is the table, Table4, that we used in our discussion of transitive dependencies. Since we going to use it here, we name this copy of it Table 11.

Слайд 24





You will recall from the discussion of this table as Table4 that it exhibits the following transitive dependencies: 
You will recall from the discussion of this table as Table4 that it exhibits the following transitive dependencies: 
Book Title → Subject, 
Subject → Collection-Library, 
Collection-Library → Building. 
From the DKNF point of view, this means that the primary key, Book Title, is not the only thing that determines the Collection-Library attribute and the Building attribute. In turn, this means that there are constraints that are not logical consequences of the key and, hence, that the table is not in DKNF.
Описание слайда:
You will recall from the discussion of this table as Table4 that it exhibits the following transitive dependencies: You will recall from the discussion of this table as Table4 that it exhibits the following transitive dependencies: Book Title → Subject, Subject → Collection-Library, Collection-Library → Building. From the DKNF point of view, this means that the primary key, Book Title, is not the only thing that determines the Collection-Library attribute and the Building attribute. In turn, this means that there are constraints that are not logical consequences of the key and, hence, that the table is not in DKNF.

Слайд 25





Reasoning from the DKNF point of view, we would like to have a table in which the Building attribute is a logical consequence of the key; constructing a table containing the Collection-Library and Building attributes, with Collection-Library as key, will accomplish that. 
Reasoning from the DKNF point of view, we would like to have a table in which the Building attribute is a logical consequence of the key; constructing a table containing the Collection-Library and Building attributes, with Collection-Library as key, will accomplish that. 
Again from the DKNF point of view, we would like to have a table in which the Collection-Library attribute is a logical consequence of the key; clearly, a table containing Subject (as key) and Collection-Library suffices.
Описание слайда:
Reasoning from the DKNF point of view, we would like to have a table in which the Building attribute is a logical consequence of the key; constructing a table containing the Collection-Library and Building attributes, with Collection-Library as key, will accomplish that. Reasoning from the DKNF point of view, we would like to have a table in which the Building attribute is a logical consequence of the key; constructing a table containing the Collection-Library and Building attributes, with Collection-Library as key, will accomplish that. Again from the DKNF point of view, we would like to have a table in which the Collection-Library attribute is a logical consequence of the key; clearly, a table containing Subject (as key) and Collection-Library suffices.

Слайд 26





The same point of view leads us to desire a table in which the Author First Name and Author Last Name attributes will be a logical consequence of the key; such a table is one that contains Book Title (as key), Author First Name, and Author Last Name. 
The same point of view leads us to desire a table in which the Author First Name and Author Last Name attributes will be a logical consequence of the key; such a table is one that contains Book Title (as key), Author First Name, and Author Last Name. 
Finally, a table that contains Book Title (as key) and Subject will be 
(1) a table in which the attribute Subject will be a logical consequence of the key and 
(2) a table that provides the necessary connection between Title and Subject.
Описание слайда:
The same point of view leads us to desire a table in which the Author First Name and Author Last Name attributes will be a logical consequence of the key; such a table is one that contains Book Title (as key), Author First Name, and Author Last Name. The same point of view leads us to desire a table in which the Author First Name and Author Last Name attributes will be a logical consequence of the key; such a table is one that contains Book Title (as key), Author First Name, and Author Last Name. Finally, a table that contains Book Title (as key) and Subject will be (1) a table in which the attribute Subject will be a logical consequence of the key and (2) a table that provides the necessary connection between Title and Subject.

Слайд 27


Database Design and Administration, слайд №27
Описание слайда:

Слайд 28


Database Design and Administration, слайд №28
Описание слайда:

Слайд 29


Database Design and Administration, слайд №29
Описание слайда:

Слайд 30





You will recall from the discussion of this table as Table 6  that one determinant is the pair of attributes, SSN and Major, which determines Adviser; another determinant is the pair, SSN and Adviser, which determines Major; and still another is Adviser alone, which also determines Major. And you will recall that the candidate keys are the pairs, SSN-Major and SSN-Adviser. The third determinant, Adviser, is not a candidate key. 
You will recall from the discussion of this table as Table 6  that one determinant is the pair of attributes, SSN and Major, which determines Adviser; another determinant is the pair, SSN and Adviser, which determines Major; and still another is Adviser alone, which also determines Major. And you will recall that the candidate keys are the pairs, SSN-Major and SSN-Adviser. The third determinant, Adviser, is not a candidate key. 
From the DKNF point of view, we reason as follows: If we choose SSN-Adviser as the key, then Major is determined by, and hence is a logical consequence of, this key, If, instead, we choose SSN-Major as the key, then Adviser is determined by, and hence is a logical consequence of, this alternative key. But in either case, the third constraint, viz., that Adviser determines Major, is not a logical consequence of the key. Hence, the table is not in DKNF.
Описание слайда:
You will recall from the discussion of this table as Table 6 that one determinant is the pair of attributes, SSN and Major, which determines Adviser; another determinant is the pair, SSN and Adviser, which determines Major; and still another is Adviser alone, which also determines Major. And you will recall that the candidate keys are the pairs, SSN-Major and SSN-Adviser. The third determinant, Adviser, is not a candidate key. You will recall from the discussion of this table as Table 6 that one determinant is the pair of attributes, SSN and Major, which determines Adviser; another determinant is the pair, SSN and Adviser, which determines Major; and still another is Adviser alone, which also determines Major. And you will recall that the candidate keys are the pairs, SSN-Major and SSN-Adviser. The third determinant, Adviser, is not a candidate key. From the DKNF point of view, we reason as follows: If we choose SSN-Adviser as the key, then Major is determined by, and hence is a logical consequence of, this key, If, instead, we choose SSN-Major as the key, then Adviser is determined by, and hence is a logical consequence of, this alternative key. But in either case, the third constraint, viz., that Adviser determines Major, is not a logical consequence of the key. Hence, the table is not in DKNF.

Слайд 31





In order to move from this table to a set of tables in DKNF, we can argue. from the DKNF point of view, that we need to move Major into a table in which it will be a logical consequence of the key. 
In order to move from this table to a set of tables in DKNF, we can argue. from the DKNF point of view, that we need to move Major into a table in which it will be a logical consequence of the key. 
Such a table would obviously need to have Adviser as the key. 
If we put Adviser and Major into such a table, then we will need at least one other table, viz., a table that provides the necessary link between SSN and Adviser, so that we will know who each student's adviser is.
Once we have put SSN and Adviser into such a table, there is nothing further that needs to be done.
Описание слайда:
In order to move from this table to a set of tables in DKNF, we can argue. from the DKNF point of view, that we need to move Major into a table in which it will be a logical consequence of the key. In order to move from this table to a set of tables in DKNF, we can argue. from the DKNF point of view, that we need to move Major into a table in which it will be a logical consequence of the key. Such a table would obviously need to have Adviser as the key. If we put Adviser and Major into such a table, then we will need at least one other table, viz., a table that provides the necessary link between SSN and Adviser, so that we will know who each student's adviser is. Once we have put SSN and Adviser into such a table, there is nothing further that needs to be done.

Слайд 32


Database Design and Administration, слайд №32
Описание слайда:

Слайд 33


Database Design and Administration, слайд №33
Описание слайда:

Слайд 34





If we analyze Table 14 from the DKNF point of view, the first thing we see is that the key in the table is composite. 
If we analyze Table 14 from the DKNF point of view, the first thing we see is that the key in the table is composite. 
It is the triple, LastName-Major-Hobby. 
But in an intuitive sense, the natural key would be just LastName, since we know that there are just four students involved and that we are trying to present data about their majors and their hobbies. 
The complications arise because some of the students have more than one major and/or more than one hobby. 
Another way of putting it is that the complications of the table arise from the fact that we are trying to display, in just one table, more information than it is practicable to display in a single table.
Описание слайда:
If we analyze Table 14 from the DKNF point of view, the first thing we see is that the key in the table is composite. If we analyze Table 14 from the DKNF point of view, the first thing we see is that the key in the table is composite. It is the triple, LastName-Major-Hobby. But in an intuitive sense, the natural key would be just LastName, since we know that there are just four students involved and that we are trying to present data about their majors and their hobbies. The complications arise because some of the students have more than one major and/or more than one hobby. Another way of putting it is that the complications of the table arise from the fact that we are trying to display, in just one table, more information than it is practicable to display in a single table.

Слайд 35





From the DKNF point of view, we have two constraints. 
From the DKNF point of view, we have two constraints. 
One constraint concerns the natural key, LastName, and the attribute, Major. 
If we set up one table that houses these attributes, then the constraint on Major will be a logical consequence of the key, LastName. 
The other constraint concerns the natural key, LastName, and the attribute, Hobby. 
If we set up a second table that houses these attributes, then the constraint on Hobby will be a logical consequence of the key, LastName. 
Having set up these two tables, we will find that there is nothing further to be done.
Описание слайда:
From the DKNF point of view, we have two constraints. From the DKNF point of view, we have two constraints. One constraint concerns the natural key, LastName, and the attribute, Major. If we set up one table that houses these attributes, then the constraint on Major will be a logical consequence of the key, LastName. The other constraint concerns the natural key, LastName, and the attribute, Hobby. If we set up a second table that houses these attributes, then the constraint on Hobby will be a logical consequence of the key, LastName. Having set up these two tables, we will find that there is nothing further to be done.

Слайд 36


Database Design and Administration, слайд №36
Описание слайда:

Слайд 37


Database Design and Administration, слайд №37
Описание слайда:

Слайд 38


Database Design and Administration, слайд №38
Описание слайда:

Слайд 39





What has the preceding discussion shown us? 
What has the preceding discussion shown us? 
We have seen that when we analyze, from the DKNF point of view, tables with various kinds of problems, we find--again and again--that the solutions to the problems consist in turning a complicated, multi-theme table into sets of single-theme tables, tables which satisfy the requirements of the DKNF. If on the other hand, we analyze a complicated, problem-laden table from the point of view of turning it into a set of single-theme tables, we thereby achieve--again and again--a set of tables that satisfy the requirements of the DKNF. 
In short, sets of single-theme tables will almost always be sets of tables in DKNF and, as such, will be sets of tables that avoid the various kinds of anomalies that we want to avoid.
Описание слайда:
What has the preceding discussion shown us? What has the preceding discussion shown us? We have seen that when we analyze, from the DKNF point of view, tables with various kinds of problems, we find--again and again--that the solutions to the problems consist in turning a complicated, multi-theme table into sets of single-theme tables, tables which satisfy the requirements of the DKNF. If on the other hand, we analyze a complicated, problem-laden table from the point of view of turning it into a set of single-theme tables, we thereby achieve--again and again--a set of tables that satisfy the requirements of the DKNF. In short, sets of single-theme tables will almost always be sets of tables in DKNF and, as such, will be sets of tables that avoid the various kinds of anomalies that we want to avoid.



Похожие презентации
Mypresentation.ru
Загрузить презентацию