Soundness and Completeness of Inference Rules for New Vague Functional Dependencies

Total Page:16

File Type:pdf, Size:1020Kb

Soundness and Completeness of Inference Rules for New Vague Functional Dependencies 292 MATEC Web of Conferences , 01001 (2019) https://doi.org/10.1051/matecconf/201929201001 CSCC 2019 Soundness and Completeness of Inference Rules for New Vague Func- tional Dependencies Dženan Gušic´1;∗ 1University of Sarajevo, Faculty of Sciences and Mathematics, Department of Mathematics, Zmaja od Bosne 33-35, 71000 Sarajevo, Bosnia and Herzegovina Abstract. In this paper we introduce a new definition of vague functional dependency based on application of appropriately chosen similarity measures. The definition is adjusted in order to be applicable to both, the imprecise and precise vague functional dependencies. Ultimately, the set of inference rules for new vague functional dependencies is given, and is proven to be sound and complete. 1 Introduction A tuple t of r is then of the form Let U be the universe of discourse. (t [A1] ; t [A2] ; :::; t [An]) ; Suppose that V is a vague set in U. where t [A ] is a vague set in U , i 2 I. Now, there exist functions tV : U ! [0; 1], fV : U ! i i Note that we may (more freely speaking) consider [0; 1], such that tV (u) + fV (u) ≤ 1 for u 2 U. We shall write t [Ai] the value of the attribute Ai on t. A vague relation r on R (A ; A ; :::; A ) can be visibly 1 2 n V = hu; tV (u) ; 1 − fV (u) i : u 2 U ; represented as a two-dimensional table with n columns and the table headings A1, A2,..., An, where each horizontal where tV (u) ; 1 − fV (u) ⊆ [0; 1] is the vague value joined row of the table is a tuple of r, and each column of the 2 table contains the attribute values under the corresponding to u U. Recall that the vague value tV (u) ; 1 − fV (u) reduces heading. ; ; to the fuzzy value tV (u) = 1 − fV (u) 2 [0; 1] if it happens Let R (Name Int S ucc) be a relation scheme on do- = that tV (u) = 1 − fV (u) in (0; 1). mains U1 f y; ; ; ; ; ; ; g = If it happens that tV (u) = 1 − fV (u) = 1, then the Em Ted Jim Katie S ara Tina Joe John , U2 f ; ; g = f ; g vague value tV (u) ; 1 − fV (u) reduces to the ordinary 115 130 145 , U3 5 10 , where Int (as intelligence) value tV (u) = 1 − fV (u) = 1 2 [0; 1]. and S ucc (as success) are vague attributes on universes U2 and U , respectively, and Name as ordinary attribute on The ordinary case tV (u) = 1 − fV (u) = 0, we read as: 3 the element u does not belong to the vague set V. In such the universe of discourse U1. scenario, we write Let r be the vague relation instance on R (Name; Int; S ucc) given by Table 1. V = fhu1; [0:2; 0:7]i; hu2; [1; 1]ig Table 1. instead of Name Int S ucc f g fh ; ; ig fh ; ; ig = fh ; : ; : i; h ; ; i; h ; ; ig ; t1 Ted 115 [1 1] 10 [1 1] V u1 [0 2 0 7] u2 [1 1] u3 [0 0] f g h ; : ; : i; h ; : ; : i; t2 S ara 115 [0 7 0 9] 5 [0 6 0 9] h130; [0:9; 0:95]i h10; [0:8; 0:95]i where U = fu ; u ; u g is some universe of discourse, and 1 2 3 t fJimg h130; [0:8; 0:9]i; fh10; [1; 1]ig V is some vague set in U. 3 h145; [0:85; 0:95]i Let R (A1; A2; :::; An) be a relation scheme on domains t4 fKatieg fh145; [1; 1]ig fh5; [0:9; 0:95]ig U1, U2,..., Un, where Ai is an attribute on the universe of discourse Ui, i 2 f1; 2; :::; ng = I. The vague sets fh115; [1; 1]ig and fh10; [1; 1]ig, given in Suppose that V (Ui) is the family of all vague sets in the first row of the Table 1, mean that the knowledge about Ui, i 2 I. Ted’s intelligence and success is very accurate. More pre- A vague relation r on R (A1; A2; :::; An) is a subset of cisely, one knows that his intelligence and success are ex- the cross product V (U1) × V (U2) × ... × V (Un). actly 115 and 10, respectively. Having in mind that the ∗ e-mail: [email protected] ranges of person’s intelligence and success are determined © The Authors, published by EDP Sciences. This is an open access article distributed under the terms of the Creative Commons Attribution License 4.0 (http://creativecommons.org/licenses/by/4.0/). 292 MATEC Web of Conferences , 01001 (2019) https://doi.org/10.1051/matecconf/201929201001 CSCC 2019 by the sets f115; 130; 145g and f5; 10g, we may say that Table 5. Ted is very successful person with regard to his intelli- Name Int S ucc gence. Sara’s intelligence is determined by the vague set 00 f g fh ; ; g fh ; ; g t1 Joe 130 [1 1] 5 [1 1] fh115; [0:7; 0:9]i; h130; [0:9; 0:95]ig. Since the truth value 00 t fTinag fh145; [1; 1]g fh10; [1; 1]g 0:7 is quite high, the false value 0:1 = 1 − 0:9 is pretty 2 small, and the difference 0:9 − 0:7 = 0:2 is also very small, we conclude that Sara’s intelligence must be close to 115. The aforementioned examples show clearly that the However, 0:9 > 0:7, 0:05 = 1 − 0:95 < 0:1, and 0:95 − 0:9 vague relation concept represents a natural generalization = 0:05 < 0:2 = 0:9 − 0:7, so Sara’s intelligence is defini- of the ordinary relation concept and the fuzzy relation con- tively closer to 130 (from bellow) than to 115 (note that cept. While the relation theory is not able to handle im- 115 < fh115; [0:7; 0:9]i; h130; [0:9; 0:95]ig). Reasoning in precise data almost at all, and the knowledge about fuzzy the same way, we conclude that Sara’s success is between data has its own limitations, the quality of the information 5 and 10, and it is closer to 10 than to 5. The data about about vague data is obviously much more refined. = ; − ⊆ ; = Katie are quite precise. As opposed to Ted, however, she Let a1 tV1 (u1) 1 fV1 (u1) [0 1] and a2 ; − ⊆ ; is a very intelligent person who is not so successful. Com- tV2 (u2) 1 fV2 (u2) [0 1] be the vague values joined pared to Ted and Katie, Sara is a relatively intelligent per- to u1 2 U1 and u2 2 U2, respectively, where son who is relatively successful. Finally, Jim is a pretty V = hu ; t (u ) ; 1 − f (u ) i : u 2 U intelligent person who is also very successful. i i Vi i Vi i i i For the basic relational concepts, see, e.g., [10]. is a vague set in the universe of discourse Ui, i 2 f1; 2g. Let r1 be the fuzzy relation instance on We define the similarity measure SE (a1; a2) between R (Name; Int; S ucc) given by Table 2 (now, we assume that the vague values a1 and a2 following Lu-Ng [12]. Int and S ucc are fuzzy attributes on U and U , respec- 2 3 SE (a ; a ) tively). 1 2 = SE t (u ) ; 1 − f (u ) ; t (u ) ; 1 − f (u ) s V1 1 V1 1 V2 2 V2 2 Table 2. − − − tV1 (u1) tV2 (u2) fV1 (u1) fV2 (u2) Name Int S ucc = 1 − · 0 2 t fEmyg h ; a i; h ; a i; q 1 130 1 5 3 h ; i h ; i − − + − : 145 a2 10 a4 1 tV1 (u1) tV2 (u2) fV1 (u1) fV2 (u2) 0 f g fh ; ig fh ; ig t2 John 115 a5 5 1 Note that SE (a1; a2) 2 [0; 1]. Moreover, SE (a ; a ) = SE (a ; a ), SE (a ; a ) = 1 if 2 ; 1 2 2 1 1 2 In Table 2, a1 (0 1) denotes the membership value of and only if a = a , and SE (a ; a ) = 0 if and only if a = 2 fh ; i; h ; ig 1 2 1 2 1 the element 130 U2 to the fuzzy set 130 a1 145 a2 , [0; 0], a = [1; 1] or a = [0; 1], a = [a; a], a 2 [0; 1] (a = 2 ; 2 1 2 1 etc., a5 (0 1) denotes the membership value of the ele- [1; 1], a = [0; 0] or a = [a; a], a = [0; 1], a 2 [0; 1]). 2 fh ; ig 2 1 2 ment 115 U2 to the fuzzy set 115 a2 . Note that several authors, including Chen [5], [6], The authors in [8] and [1], for example, apply fuzzy Hong-Kim [7], Li-Xu [11], Szmidt-Kacprzyk [15], Grze- membership values to incorporate fuzzy data into rela- gorzewski [9], proposed various definitions of similarity tional database theory. measures between vague sets and distances between intu- Note that the fuzzy relation instance r1 may be repre- itionistic fuzzy sets. According to Lu-Ng [12], however, sented as the vague relation instance given by Table 3. the similarity measure given above, reflects reality in a more appropriate manner when it comes to more general Table 3. cases. Name Int S ucc Let 0 t fEmyg h130; [a1; a1]i; h5; [a3; a3]i; 1 A = hu; tA (u) ; 1 − fA (u) i : u 2 U h145; [a2; a2]i h10; [a4; a4]i 0 t fJohng fh115; [a ; a ]ig fh5; [1; 1]ig and 2 5 5 B = hu; tB (u) ; 1 − fB (u) i : u 2 U Similarly, the relation instance r2 on R (Name; Int; S ucc) given by Table 4 (now, we assume that be two vague sets in some universe of discourse U.
Recommended publications
  • Functional Dependencies
    Basics of FDs Manipulating FDs Closures and Keys Minimal Bases Functional Dependencies T. M. Murali October 19, 21 2009 T. M. Murali October 19, 21 2009 CS 4604: Functional Dependencies Students(Id, Name) Advisors(Id, Name) Advises(StudentId, AdvisorId) Favourite(StudentId, AdvisorId) I Suppose we perversely decide to convert Students, Advises, and Favourite into one relation. Students(Id, Name, AdvisorId, AdvisorName, FavouriteAdvisorId) Basics of FDs Manipulating FDs Closures and Keys Minimal Bases Example Name Id Name Id Students Advises Advisors Favourite I Convert to relations: T. M. Murali October 19, 21 2009 CS 4604: Functional Dependencies I Suppose we perversely decide to convert Students, Advises, and Favourite into one relation. Students(Id, Name, AdvisorId, AdvisorName, FavouriteAdvisorId) Basics of FDs Manipulating FDs Closures and Keys Minimal Bases Example Name Id Name Id Students Advises Advisors Favourite I Convert to relations: Students(Id, Name) Advisors(Id, Name) Advises(StudentId, AdvisorId) Favourite(StudentId, AdvisorId) T. M. Murali October 19, 21 2009 CS 4604: Functional Dependencies Basics of FDs Manipulating FDs Closures and Keys Minimal Bases Example Name Id Name Id Students Advises Advisors Favourite I Convert to relations: Students(Id, Name) Advisors(Id, Name) Advises(StudentId, AdvisorId) Favourite(StudentId, AdvisorId) I Suppose we perversely decide to convert Students, Advises, and Favourite into one relation. Students(Id, Name, AdvisorId, AdvisorName, FavouriteAdvisorId) T. M. Murali October 19, 21 2009 CS 4604: Functional Dependencies Name and FavouriteAdvisorId. Id ! Name Id ! FavouriteAdvisorId AdvisorId ! AdvisorName I Can we say Id ! AdvisorId? NO! Id is not a key for the Students relation. I What is the key for the Students? fId, AdvisorIdg.
    [Show full text]
  • Relational Database Design Chapter 7
    Chapter 7: Relational Database Design Chapter 7: Relational Database Design First Normal Form Pitfalls in Relational Database Design Functional Dependencies Decomposition Boyce-Codd Normal Form Third Normal Form Multivalued Dependencies and Fourth Normal Form Overall Database Design Process Database System Concepts 7.2 ©Silberschatz, Korth and Sudarshan 1 First Normal Form Domain is atomic if its elements are considered to be indivisible units + Examples of non-atomic domains: Set of names, composite attributes Identification numbers like CS101 that can be broken up into parts A relational schema R is in first normal form if the domains of all attributes of R are atomic Non-atomic values complicate storage and encourage redundant (repeated) storage of data + E.g. Set of accounts stored with each customer, and set of owners stored with each account + We assume all relations are in first normal form (revisit this in Chapter 9 on Object Relational Databases) Database System Concepts 7.3 ©Silberschatz, Korth and Sudarshan First Normal Form (Contd.) Atomicity is actually a property of how the elements of the domain are used. + E.g. Strings would normally be considered indivisible + Suppose that students are given roll numbers which are strings of the form CS0012 or EE1127 + If the first two characters are extracted to find the department, the domain of roll numbers is not atomic. + Doing so is a bad idea: leads to encoding of information in application program rather than in the database. Database System Concepts 7.4 ©Silberschatz, Korth and Sudarshan 2 Pitfalls in Relational Database Design Relational database design requires that we find a “good” collection of relation schemas.
    [Show full text]
  • Fundamentals of Database Systems [Normalization – II]
    Outline First Normal Form Second Normal Form Third Normal Form Boyce-Codd Normal Form Fundamentals of Database Systems [Normalization { II] Malay Bhattacharyya Assistant Professor Machine Intelligence Unit Indian Statistical Institute, Kolkata October, 2019 Outline First Normal Form Second Normal Form Third Normal Form Boyce-Codd Normal Form 1 First Normal Form 2 Second Normal Form 3 Third Normal Form 4 Boyce-Codd Normal Form Outline First Normal Form Second Normal Form Third Normal Form Boyce-Codd Normal Form First normal form The domain (or value set) of an attribute defines the set of values it might contain. A domain is atomic if elements of the domain are considered to be indivisible units. Company Make Company Make Maruti WagonR, Ertiga Maruti WagonR, Ertiga Honda City Honda City Tesla RAV4 Tesla, Toyota RAV4 Toyota RAV4 BMW X1 BMW X1 Only Company has atomic domain None of the attributes have atomic domains Outline First Normal Form Second Normal Form Third Normal Form Boyce-Codd Normal Form First normal form Definition (First normal form (1NF)) A relational schema R is in 1NF iff the domains of all attributes in R are atomic. The advantages of 1NF are as follows: It eliminates redundancy It eliminates repeating groups. Note: In practice, 1NF includes a few more practical constraints like each attribute must be unique, no tuples are duplicated, and no columns are duplicated. Outline First Normal Form Second Normal Form Third Normal Form Boyce-Codd Normal Form First normal form The following relation is not in 1NF because the attribute Model is not atomic. Company Country Make Model Distributor Maruti India WagonR LXI, VXI Carwala Maruti India WagonR LXI Bhalla Maruti India Ertiga VXI Bhalla Honda Japan City SV Bhalla Tesla USA RAV4 EV CarTrade Toyota Japan RAV4 EV CarTrade BMW Germany X1 Expedition CarTrade We can convert this relation into 1NF in two ways!!! Outline First Normal Form Second Normal Form Third Normal Form Boyce-Codd Normal Form First normal form Approach 1: Break the tuples containing non-atomic values into multiple tuples.
    [Show full text]
  • A Hybrid Approach to Functional Dependency Discovery
    A Hybrid Approach to Functional Dependency Discovery Thorsten Papenbrock Felix Naumann Hasso Plattner Institute (HPI) Hasso Plattner Institute (HPI) 14482 Potsdam, Germany 14482 Potsdam, Germany [email protected] [email protected] ABSTRACT concrete metadata. One reason is that they depend not only Functional dependencies are structural metadata that can on a schema but also on a concrete relational instance. For be used for schema normalization, data integration, data example, child ! teacher might hold for kindergarten chil- cleansing, and many other data management tasks. Despite dren, but it does not hold for high-school children. Conse- their importance, the functional dependencies of a specific quently, functional dependencies also change over time when dataset are usually unknown and almost impossible to dis- data is extended, altered, or merged with other datasets. cover manually. For this reason, database research has pro- Therefore, discovery algorithms are needed that reveal all posed various algorithms for functional dependency discov- functional dependencies of a given dataset. ery. None, however, are able to process datasets of typical Due to the importance of functional dependencies, many real-world size, e.g., datasets with more than 50 attributes discovery algorithms have already been proposed. Unfor- and a million records. tunately, none of them is able to process datasets of real- world size, i.e., datasets with more than 50 columns and We present a hybrid discovery algorithm called HyFD, which combines fast approximation techniques with efficient a million rows, as a recent study showed [20]. Because validation techniques in order to find all minimal functional the need for normalization, cleansing, and query optimiza- dependencies in a given dataset.
    [Show full text]
  • Database Normalization
    Outline Data Redundancy Normalization and Denormalization Normal Forms Database Management Systems Database Normalization Malay Bhattacharyya Assistant Professor Machine Intelligence Unit and Centre for Artificial Intelligence and Machine Learning Indian Statistical Institute, Kolkata February, 2020 Malay Bhattacharyya Database Management Systems Outline Data Redundancy Normalization and Denormalization Normal Forms 1 Data Redundancy 2 Normalization and Denormalization 3 Normal Forms First Normal Form Second Normal Form Third Normal Form Boyce-Codd Normal Form Elementary Key Normal Form Fourth Normal Form Fifth Normal Form Domain Key Normal Form Sixth Normal Form Malay Bhattacharyya Database Management Systems These issues can be addressed by decomposing the database { normalization forces this!!! Outline Data Redundancy Normalization and Denormalization Normal Forms Redundancy in databases Redundancy in a database denotes the repetition of stored data Redundancy might cause various anomalies and problems pertaining to storage requirements: Insertion anomalies: It may be impossible to store certain information without storing some other, unrelated information. Deletion anomalies: It may be impossible to delete certain information without losing some other, unrelated information. Update anomalies: If one copy of such repeated data is updated, all copies need to be updated to prevent inconsistency. Increasing storage requirements: The storage requirements may increase over time. Malay Bhattacharyya Database Management Systems Outline Data Redundancy Normalization and Denormalization Normal Forms Redundancy in databases Redundancy in a database denotes the repetition of stored data Redundancy might cause various anomalies and problems pertaining to storage requirements: Insertion anomalies: It may be impossible to store certain information without storing some other, unrelated information. Deletion anomalies: It may be impossible to delete certain information without losing some other, unrelated information.
    [Show full text]
  • The Theory of Functional and Template Dependencs[Es*
    View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by Elsevier - Publisher Connector Theoretical Computer Science 17 (1982) 317-331 317 North-Holland Publishing Company THE THEORY OF FUNCTIONAL AND TEMPLATE DEPENDENCS[ES* Fereidoon SADRI** Department of Computer Science, Princeton University, Princeton, NJ 08540, U.S.A. Jeffrey D. ULLMAN*** Department of ComprrtzrScience, Stanfoc:;lUniversity, Stanford, CA 94305, U.S.A. Communicated by M. Nivat Received June 1980 Revised December 1980 Abstract. Template dependencies were introduced by Sadri and Ullman [ 171 to generuize existing forms of data dependencies. It was hoped that by studyin;g a 4arge and natural class of dependen- cies, we could solve the inference problem for these dependencies, while that problem ‘was elusive for restricted subsets of the template dependencjes, such as embedded multivalued dependencies. At about the same time, other generalizations of known clependency forms were developed, such as the implicational dependencies of Fagin [l 1j and the algebraic dependencies of Vannakakis and Papadimitriou [20]. Unlike the template dependencies, the latter forms include the functional dependencies as special cases. In this paper we show that no nontrivial functional dependency follows from template dependencies, and we characterize those template dependencies that follow from functional dependencies. We then give a complete set of axioms for reasoning about combinations of functional and template dependencies. As a result, template dependencies augmented1 by functional dependencies can serve as a sub!;tltute for the more genera1 implicational or algebraic dependenc:ies, providing the same ability to rl:present those dependencies that appear ‘in nature’,, while providing a somewhat simpler notation and set of axioms than the more genera4 classes.
    [Show full text]
  • SEMESTER-II Functional Dependencies
    For SEMESTER-II Paper II : Database Management Systems(CODE: CSC-RC-2016) Topics: Functional dependencies, Normalization and Normal forms up to 3NF Functional Dependencies A functional dependency (FD) is a relationship between two attributes, typically between the primary key and other non-key attributes within a table. A functional dependency denoted by X Y , is an association between two sets of attribute X and Y. Here, X is called the determinant, and Y is called the dependent. For example, SIN ———-> Name, Address, Birthdate Here, SIN determines Name, Address and Birthdate.So, SIN is the determinant and Name, Address and Birthdate are the dependents. Rules of Functional Dependencies 1. Reflexive rule : If Y is a subset of X, then X determines Y . 2. Augmentation rule: It is also known as a partial dependency, says if X determines Y, then XZ determines YZ for any Z 3. Transitivity rule: Transitivity says if X determines Y, and Y determines Z, then X must also determine Z Types of functional dependency The following are types functional dependency in DBMS: 1. Fully-Functional Dependency 2. Partial Dependency 3. Transitive Dependency 4. Trivial Dependency 5. Multivalued Dependency Full functional Dependency A functional dependency XY is said to be a full functional dependency, if removal of any attribute A from X, the dependency does not hold any more. i.e. Y is fully functional dependent on X, if it is Functionally Dependent on X and not on any of the proper subset of X. For example, {Emp_num,Proj_num} Hour Is a full functional dependency. Here, Hour is the working time by an employee in a project.
    [Show full text]
  • Chapter 7+8+9
    7+8+9: Functional Dependencies and Normalization how “good” how do we know the is our data database design won’t model cause any problems? design? what do we grouping of know about attributes so far has the quality been intuitive - how of the do we validate the logical design? schema? 8 issue of quality of design an illustration - figure 7.1b STOCK (Store, Product, Price, Quantity, Location, Discount, Sq_ft, Manager) are there data redundancies? for price? location? quantity? discount? repeated appearances of a data value ≠ data redundancy unneeded repetition that does what is data not add new meaning = data redundancy? redundancy data redundancy → modification anomalies are there data redundancies? yes - for price, location, and discount insertion anomaly - adding a washing machine with a price (cannot add without store number) update anomaly - store 11 moves to Cincinnati (requires updating multiple rows) deletion anomaly - store 17 is closed (pricing data about vacuum cleaner is lost) decomposition of the STOCK instance no data redundancies/ modification anomalies in STORE or PRODUCT data redundancies/ modification anomalies persist in INVENTORY normalized free from data redundancies/modification anomalies relational schema reverse-engineered from tables design-specific ER diagram reverse-engineered from relational schema how do we systematically identify data redundancies? how do we know how to decompose the base relation schema under investigation? how we know that the data decomposition is correct and complete? the seeds of data redundancy are undesirable functional dependencies. functional dependencies relationship between attributes that if we are given the value of one of the attributes we can look up the value FD of the other the building block of normalization principles functional dependencies an attribute A (atomic or composite) in a relation schema R functionally determines another attribute B (atomic or composite) in R if: ! for a given value a1 of A there is a single, specific value b1 of B in every relation state ri of R.
    [Show full text]
  • Functional Dependencies and Normalization Juliana Freire
    Design Theory for Relational Databases: Functional Dependencies and Normalization Juliana Freire Some slides adapted from L. Delcambre, R. Ramakrishnan, G. Lindstrom, J. Ullman and Silberschatz, Korth and Sudarshan Relational Database Design • Use the Entity Relationship (ER) model to reason about your data---structure and relationships, then translate model into a relational schema (more on this later) • Specify relational schema directly – Like what you do when you design the data structures for a program Pitfalls in Relational Database Design • Relational database design requires that we find a “good” collection of relation schemas • A bad design may lead to – Repetition of Information – Inability to represent certain information • Design Goals: – Avoid redundant data – Ensure that relationships among attributes are represented – Facilitate the checking of updates for violation of database integrity constraints Design Choices: Small vs. Large Schemas Which design do you like better? Why? EMPLOYEE(ENAME, SSN, ADDRESS, PNUMBER) PROJECT(PNAME, PNUMBER, PMGRSSN) EMP_PROJ(ENAME, SSN, ADDRESS, PNUMBER, PNAME, PMGRSSN) An employee can be assigned to at most one project, many employees participate in a project What’s wrong? EMP(ENAME, SSN, ADDRESS, PNUM, PNAME, PMGRSSN)" The description of the project (the name" and the manager of the project) is repeated" for every employee that works in that department." Redundancy! " The project is described redundantly." This leads to update anomalies." EMP(ENAME, SSN, ADDRESS, PNUM, PNAME, PMGRSSN)" Update
    [Show full text]
  • Functional Dependency and Normalization for Relational Databases
    Functional Dependency and Normalization for Relational Databases Introduction: Relational database design ultimately produces a set of relations. The implicit goals of the design activity are: information preservation and minimum redundancy. Informal Design Guidelines for Relation Schemas Four informal guidelines that may be used as measures to determine the quality of relation schema design: Making sure that the semantics of the attributes is clear in the schema Reducing the redundant information in tuples Reducing the NULL values in tuples Disallowing the possibility of generating spurious tuples Imparting Clear Semantics to Attributes in Relations The semantics of a relation refers to its meaning resulting from the interpretation of attribute values in a tuple. The relational schema design should have a clear meaning. Guideline 1 1. Design a relation schema so that it is easy to explain. 2. Do not combine attributes from multiple entity types and relationship types into a single relation. Redundant Information in Tuples and Update Anomalies One goal of schema design is to minimize the storage space used by the base relations (and hence the corresponding files). Grouping attributes into relation schemas has a significant effect on storage space Storing natural joins of base relations leads to an additional problem referred to as update anomalies. These are: insertion anomalies, deletion anomalies, and modification anomalies. Insertion Anomalies happen: when insertion of a new tuple is not done properly and will therefore can make the database become inconsistent. When the insertion of a new tuple introduces a NULL value (for example a department in which no employee works as of yet).
    [Show full text]
  • Chapter 4: Functional Dependencies
    Chapter 4 FUNCTIONAL DEPENDENCIES Two primary purposes of databases are to attenuate data redundancy and enhance data reliability. Any a priorz’ knowledge of restrictions or constraints on permissible sets of data has considerable usefulness in reaching these goals, as we shall see. Data dependencies are one way to formulate such ad- vance knowledge. In this chapter we shall cover one type of data dependency, the functional dependency. In Chapter 7 we cover two other types of data dependencies, the multivalued and join dependencies. Other general classes of data dependencies are treated in Chapter 14. 4.1 DEFINITIONS We discussed keys in Chapter 1. Functional dependencies are a generaliza- tion. Table 4.1 depicts the relation assign(PILOT FLIGHT DATE DEPARTS). Assign tells which pilot flies a given flight on a given day, and what time the flight leaves. Not every combination of pilots, flights, dates, and times is allowable in assign. The following restrictions appIy, among others. 1. For each flight there is exactly one time. 2. For any given pilot, date, and time, there is only one flight. 3. For a given flight and date, there is only one pilot. These restrictions are examples of functional dependencies. Informally, a functional dependency occurs when the values of a tuple on one set of at- tributes uniquely determine the values on another set of attributes. Our restrictions can be phrased as 1. TIME functionally depends on FLIGHT, 2. FLIGHT functionally depends on {PILOT, DATE, TIME}, and 3. PILOT functionally depends on {FLIGHT, DATE). 42 Definitions 43 Table 4.1 The relation assign(PILOT FLIGHT DATE DEPARTS).
    [Show full text]
  • Functional Dependencies and Normalization
    Functional Dependencies and Normalization Definition 1 Let R be a relation scheme and let X ⊆ R and Y ⊆ R. We say that a relation instance r(R) satisfies a functional dependency X ! Y if for every pair of tuples t1 2 r and t2 2 r, if t1[X] = t2[X] then t1[Y ] = t2[Y ]. Definition 2 An instance r of relation scheme R is called a legal instance if it is a true reflection of the mini-world facts it represents (i.e. it satisfies all constraints imposed on it in the real world). Definition 3 Let R be a relation scheme and let X ⊆ R and Y ⊆ R. Then X ! Y , a functional dependency on scheme R, is valid if every legal instance r(R) satisfies X ! Y . Mathematical Properties of Functional Dependencies Definition 4 Let F be a set of FDs on scheme R and f be another FD on R. Then, F implies f, denoted by F j= f, if every relation instance r(R) that satisfies all FDs in F also satisfies f. Definition 5 Let F be a set of FDs on scheme R. Then, the closure of F , denoted by F +, is the set of all FDs implied by F . Definition 6 Let F and G be sets of FDs on scheme R. Then, F and G are equivalent, denoted by F ≡ G, if F j= G and G j= F . Inference rules for FDs (Armstrong's Axioms) Reflexivity: If Y ⊆ X then, X ! Y . Such FDs are called trivial FDs. Augmentation: If X ! Y , then XZ ! Y Z.
    [Show full text]