Derivation of Database Keys Operations. Abstract. Introduction

Size: px
Start display at page:

Download "Derivation of Database Keys Operations. Abstract. Introduction"

Transcription

1 Issues in Informing Science and Information Technology Volume 8, 2011 Derivation of Database Keys Operations Adio Akinwale, Olusegun Folorunso, and Adesina Sodiya Department of Computer Science, University of Agriculture, Abeokuta, Nigeria Abstract Designing normalized relation is subject of great difficult, yet great importance. The paper presented automatic derivation of database keys as a step forward solution to designing normalized relations. It studied relational schema and functional dependencies to derive keys of primary, candidate, alternative and super key of relational database. The necessary algorithms to derive database keys were analyzed, modified and coded in Java Programming Language to display graphical key derivation input interface. The input interface accepts any length of schemas attributes and functional dependencies to compute power set, closure, derived keys and specific group of keys which can aid database designers to control anomalies at initial stage of database design. The system also assists the students to find, see, and learn database keys derivation. The effectiveness has a positive impact on the students performance on normalization technique. Keywords: database anomalies, inconsistency, database keys, functional dependencies, relational schemas, Armstrong s inference rules, prime and non-prime attributes, normal forms Introduction Designing database is an art process similar to building a house. Database designers always face the problems of designing a relational database that will be free of database anomalies. These anomalies bring repetition of tuples that delay processing time and occupy memory spaces. Suppose that the value of the attribute BUILDER determines values of the attribute MODEL and PRICE, (BUILDER MODEL, PRICE) and that the value for the attribute MODEL determines the value for PRICE, (MODEL PRICE). Grouping these attributes in relation HOUSE(BUILDER, MODEL, PRICE) has several undesirable properties. First the relationship between MODEL and PRICE is repeated in the relation for each BUILDER who builds a particular MODEL of home. This repetition creates difficulties if a BUILDER who happens to be the last BUILDER of a certain MODEL home is deleted from the relation, then the relationship between the MODEL and its PRICE also disappears from the relation. This is called a deletion anomaly. Similarly, if a new builder Material published as part of this publication, either on-line or in print, is copyrighted by the Informing Science Institute. Permission to make digital or paper copy of part or all of these works for personal or classroom use is granted without fee provided that the copies are not made or distributed for profit or commercial advantage AND that copies 1) bear this notice in full and 2) give the full citation on the first page. It is permissible to abstract these works so long as credit is given. To copy in all other cases or to republish or to post on a server or to redistribute to lists requires specific permission and payment of a fee. Contact Publisher@InformingScience.org to request redistribution permission. who happens to be the first BUILDER of a certain MODEL home is added then the relationship between MODEL of a home and its PRICE will also be added. This is called an insertion anomaly. Suppose that the relationship between a MODEL and its PRICE is changed e.g. the price is increased; then the MODEL and PRICE relationship should be affected for every BUILDER of the

2 Derivation of Database Keys Operations MODEL. This is called update anomaly. These anomalies are undesirable since the user is not likely to realize the consequence of the insertion, deletion or updating. The user may inadvertently affect a relationship that was not intended to be modified. Consistency, insertion, deletion and updating are not probe effecting all groupings of attributes. If the relation HOUSE(BUILDER, MODEL, PRICE) is normalized then the consistency and anomaly problems disappear. Normalization is a step by step reversible process of replacing a given collection of relations by successive collection in which the relations have a progressively simpler and more regular structure (Date & Darwen, 2000). The reversibility guarantees that the original collection of relations can be recovered and therefore no information has been lost. Codd proposed three normal forms which he called first normal form (1NF), second normal form (2NF) and third normal form (3NF). A stronger definition of 3NF was proposed by Boyce and Codd and is known as Boyce- Codd Normal Form (BCNF). All these normal forms except 1NF are based on the functional dependencies among the attributes of a relation (Elmasri & Navathe, 1994). First normal form relates to the structure of the relation. It requires that every attribute of a relation be based on a simple domain. The database designers have no problem to know if a relation violates first normal form. They can put the relation into first normal form algorithmically by replacing a non-simple domain by its constituent simple domains. In the second (2NF), third (3NF) and Boyce Codd normal form (BCNF), there is a need for the database designers to know the real meaning and application of database keys such as candidate key, primary key, super key, etc,. Problem Statement Database designers always find it difficult to determine these keys from relational database schemas. It has been difficult to motivate students and database designers to derive primary, candidate, alternative and super keys because they think this area is dry and theoretical. There are many algorithms to determine the database keys but they look abstract for students. Many database researchers indicated that relational database model to derive database keys tends to be complex for the average designers. Failure to determine the database keys at times leads to poor design that can generate database anomalies. The database key algorithms often require extensive relational algebraic backgrounds that database designers lack. Most database text books rely on the definition of the keys in their course areas. They simply give the definition of primary key, candidate key, alternative key and super key and hope the database designers would be able to apply the definition to determine these keys from relational schemas and functional dependencies. It is still difficult for students to understand which attributes from a given relation determines another attributes. These approaches may not be the best way to assist many database designers effectively understands the derivation of database keys. It has been noticed that normalization process, decomposition and loss less join happened when various database keys have been expressed. Literature Review There are many literature reviews on database normalization but none has singly or deeply involved on the derivation of database keys which are very fundamental in this area. Hsiang-Jui Kung and Hui-Lien Tung (2006) developed a web-based database normalization tool and its effectiveness in teaching and learning normalization. The aspect of database keys was not touched. Concepcion and Villafuerteq (1990) and Rosenthal and Reiner, (1994) proposed algorithms and tools to synthesize a normalized database using functional dependencies. The algorithms did not illustrate how to derive database keys of primary, candidate, alternative or secondary and super. Chilton, McHaney, and Chae (2006) developed a normalization tool to teach student on normalization process but the tool did not provide means of finding database keys. Diederich and Milton 278

3 Akinwale, Folorunso, & Sodiya developed new methods and fast algorithms for database normalization. These methods and algorithm did not include database keys derivation. Most database authors provide a definition for the key but no algorithm for computing it. David Maier (1993) and Jeffrey Ullman (1988) provided algorithms for computing the closure of a set of attributes or a set of functional dependencies but the calculation of a key is left for the readers using the closure algorithms. Determining the candidate keys for a small relation schema with a small set of functional dependencies may be trivial but if a relation has a relatively large number of attributes and/or functional dependencie, then determining the keys may not be a trivial process. Ramez Elmasri and Shamkant Navathe (1994) offer a candidate key algorithm as shown in Figure 1. set K R for each attribute A K conpute ( K A) + with respect to fds, Γ for R + if ( K A) contains all attributes of R then set K K ( A) Figure 1: Elmasri and Navathe s Candidate Key Algorithm The algorithm in Figure 1 returns only one key for R and the returned key depends on the order in which attributes were removed. For example, for R(ABCDEF) with a set of functional dependencies, if we start removing attributes from the right side, that is F, followed by E, followed by D, we may conclude that ABC is a key. We may not realize that for example E by itself or F by itself or a combination of EF or E or F combined with any of the attributes A, B, or C are also keys of Ausiello, Datri, and Sacca (1983) who provide an approach for homogenous treatment of several related aspects of relational database schemas, namely, closure, minimalization and synthesizing a relational schema in 3NF. In their work, database key funding issues were not treated. Biskup, Dematrovics, Libkin, & Muchnik (1991) explored the relational database schemes having a unique minimal key but the emphasis is on their relationship with normal form relation schemes and lattice theoretic issues. Key funding issues were not emphasized. The problem of funding a primary key is much easier than funding all derived keys of all candidate keys, super keys and alternative keys. The objective of the paper is to develop a graphical key derivation user interface that would allow students and database designers understand the step-by-step derivation of database keys. Claudio Lucchesi and Sylvia Osborn (1978) designed an algorithm which finds all the keys and whose running time is a polynomial of the size of the input and the size of output. The algorithm is modified to derive the keys of candidate, alternative, primary and super keys as shown in Figure 1. Definitions Functional Dependencies The single most important concept in relational schema design is that of a functional dependency. A functional dependency denoted by X Y between two sets of attributes X and Y that are subsets of R specifies a constraint on the possible tuples that can form a relation instance r of R. The constraint states that for any two tuples t 1 and t 2 in r such that t 1 [X] = t 2 [X]. We must also have t 1 [Y] = t 2 [Y]. This means that the values of the Y component of a tuple in r depend on or are de- 279

4 Derivation of Database Keys Operations termined by the values of the X component, or alternatively, the values of the X component of a tuple uniquely or functionally determine the values of the Y component. We also say that there is a functional dependency from X to Y or that Y is functionally dependent on X (Elmasri & Navathe, 1994). Key of Relation We say a set of one or more attributes { A 1, A 2, A 3,,A n } is a key for a relation if (1) those attributes functionally determine all other attributes of the relation. That is, it is impossible for two distinct tuples of R to agree on all of A 1, A 2, A 3,,A n. (2) there is no proper subset of { A 1, A 2, A 3,,A n } functionally determine all other attributes of R. Naturally, there are many keys that already identified in database schemas. Among them are candidate keys, primary keys, alternative keys, secondary keys, super keys and foreign keys. Candidate key is unique identifier enforcing that no tuple will be duplicated. If a relation schema has more than one minimal key, each is called a candidate key. One of the candidate keys is arbitrarily designated to be the primary key of the relation schema and the other are called secondary keys. Each relation schema must have a primary key. A primary key is a set of attributes that uniquely determined an instance of an entity. Suppose we have the following schemas: Customer(customer_number, customer_name, customer_address, customer_phone, ) Order(order_number, customer_number, invoice_number,, ) Invoice(invoice_number, customer_number, order_number,, ) Order_Line(order_number, order_line_number, produce_code,, ) In the above example, we have four relational schemas, namely, customer, order, invoice and order_line. The bold underlined attributes are candidate keys. The non-bold underlined attributes are foreign keys. Usually one candidate key is the primary key and used in preference over the other candidate keys which are alternative keys. For example, in order_line( order_number, order_line_number,,); order_number can be chosen as primary key while order_line_number can now be alternative key. But both are candidate keys. A super key of a relation schemas R= { A 1, A 2, A 3,,A n } is a set of attributes S R with the property that no two tuples t 1 and t 2 in any relation instance r of R will have t 1 [s] = t 2 [s]. A key K is a super key with the additional property that removal of any attribute from K will result in K not being a super key any more. Every key is a super key. Some keys are not super keys. If a relation R is considered from a relationship then (1) if the relationship is many to many ( n: m ) then the keys of both connected entity sets are the key attributes of R many to many. (2) if the relationship is from entity sets many (E1) to entity set one (E2) ( n:1) then the key attributes of E1 are the key attributes of R but those E2 are not. (3) if the relationship is from entity set one to one ( 1:1 ) then the key attributes for either of the connected entity sets are the key attributes of R. Database Key Constraints The work identifies four database key constraints as follows: 280

5 Akinwale, Folorunso, & Sodiya i The difference between a key and a super key is that a key has to be minimal, that is, if we have a key K= (A 1, A 2, A 3,,A n ) then K A is not a key for 1 i< k. ii Consider the car relation: CAR(label, reg#, serialno, make, model, year) which has two keys : K1 = {label, reg#} and K2 = {serialno}. These keys {K1, K2}are super key (SK). {serialno, make} is a super key but not a key. If a relation has several candidate keys, one is chosen arbitrarily to be the primary key. The primary key attributes are underlined. Any of the candidate keys that is not part of the primary key is called an alternative key. iii Super key of R: a set of attributes SK of R such that no two tuples in any valid relation instance r(r) will have the same value for SK. That is, for any distinct tuples t 1 and t 2 in r(r), t 1 [SK] t 2 [SK]. iv In a BCNF relation R, every functional dependency in R must be of the form K A where K is a key and A is any attribute. The following can be asserted: - all non-prime attributes must be fully dependent on each key - all prime attributes must be fully dependent on all keys of which they are not a part. - No attribute (prime or not prime) can be fully dependent on any set of attributes that is not key. Since each key is fully dependent on every other key, the keys are functionally equivalent. That is, for every pair of keys there is a bijection, i.e., functions in both directions connecting them proof: H ( A) X ( A) // characteristic functionin set A H: P( N) {0,1} N H 0,1, 0,1, 0, 0,1,1,1,..., A = {1,3,6,7,8,12,...,} 0,1,2,3,4,5,6,7,8,..., H to bijection { } 1 1 : ( ) 0,1 N on H P N 1 1 because A B X ( A) X ( B) H( A B) = H( A) o H( B) X( A B) = X( A) o X( B) X( A B) = min imal( X( A), X( B)) { } X( A B), X( A), X( B): N 0, 1 X ( A B) X( A) o X( B),,0,,, 1,,, k,,, k, The function is one to one in every position 281

6 Derivation of Database Keys Operations X( A) k 0 k A ( ) = k { 1 k A} N X( A B) min imal( X( A), X( B) ( k) ( k) ( k) X( A B) = 0 k A B ( k ) k A or k B X( A) = 0 X( B) = 0 ( k) ( k) hence X ( A B) = min imal( X ( A), X ( B) X( A B) = X( A) o ( B) ( k) ( k) ( k) k A B k A or k B k A B k A or k B ) These four constraints were embedded into database keys derivation to derive candidate leys, primary keys, alternative keys and super keys. Methodology The following algorithms are needed to generate database keys of primary, candidate, alternative, secondary and super keys from relational schemas R and a set of functional dependency (fd) - Power set of relational schemas - Closure T + Algorithm - Keys Algorithm Power Set of Relational Schemas This power set is to determine the power set of relation T( A 1, A 2, A 3, A n ) except the empty set. The n attributes will be combined into 2 n 1. For example a relation R(A,B,C) will generate a power set of (ABC permutation) as follows: ( A, B, C, AB, AC, BC, ABC) minus empty set ( φ ). Closure X + Algorithm The schema designer will specify the relation and functional dependencies that are semantically obvious. There are usually numerous other functional dependencies that will also hold in all legal relation instances that satisfy the dependencies in T. The set of all such functional dependencies is called the closure of T and is denoted by T +. A systematic way to determine these additional functional dependencies is first to determine each set of attributes X that appears as a left-hand side of some functional dependencies in T and then use Armstrong s inference rules of reflexive, augmentation, transitive, decomposition union and pseudotransitive to determine the set of all attributes that dependent on X as shown in figure 2. Thus, for each set of attributes X, we determine the set X + of attributes that are functional determined by X; X + is called the closure of X under T. ) 282

7 Akinwale, Folorunso, & Sodiya 1. Let X be a set of attributes that eventually will become the closure -we first initialize X to be { A1, A2, A3,..., A n } 2. we repeatedly search for some functional dependency B1, B2, B3,..., Bm C such that all B1, B2, B3,..., B m are in the set of attribute X but C is not. we add C to the set X 3. repeat 2 as many times as necessary until no more attributes can be added to X 4. the set X after no more attributes can be added to it is the correct value of { A, A, A,..., A } n Figure 2: Closure Algorithm Key Algorithms Key algorithm used the algorithm of candidate key (cd) which was modified to determine those attributes that must be part of a key and those attributes may not be part of the keys. It considered attributes that would lead to primary key (pk), alternative key ( ak) and supper key (sp). Figure 3 describes the algorithm of derived keys. Implementation The algorithms of power set, closure (Figure 2) and database keys (Figure 3) were developed using JAVA programming language. The tool has input interface to key in and display relational schema and functional dependencies. The tool is in position to accept any length of relational attributes and functional dependencies. It will derive the database keys and group them into primary key, candidate key, alternative key and super key. As illustrated in the introduction section, Figure 4 depicts sample of three attributes of relation House(Builder = B, Model = M, Price = P) and two functional dependencies: B M, M P. It is possible for the user to add more attributes and functional dependencies. As shown in figure 4 the user has keyed in three attributes and two functional dependencies. The next step is for the user to press power set button to generate the power set of R as still shown in Figure

8 Derivation of Database Keys Operations Given a header R(A 1, A 2, A 3,, A n ) and a set of FD that only contain subset of R. It holds that X Y is in S + if only if Y X +. Input: R(A 1, A 2, A 3,, A n ) and a set of FDs Output: a set of derived keys that hold as primary, candidate, alternative and super keys in all relation universes over R in which all FDs in S hold begin 1. set F to a minimal cover of F 2. partition all attributes in R into necessary, useless and middle-ground attribute sets according to F Let X = { C1, C2, C3,..., C n } be the necessary attribute set Let Y = { B 1, B2, B3,..., B k } be the useless attribute set M = { A, A, A,..., A } ( X Y) be the middle-ground attribute set Let If X ={} then go to step 4 3. compute X + if X + = R then set K = { X } terminate n 4. let L =< Z1, Z2, Z3,..., Zm > be the list of all non-empty subsets of M, the middle-ground attributes such that L is arranged in according order of the size Z i add all attributes in X, necessary attribute to each set K = {}; i = 0 while L empty do begin i= i+ 1 remove the first element Z from L; compute Z + if X + = R then begin set K K { Z} Z i in L for any Z j L if Z Z j then L L { Z j } end Figure 3: Derived Keys Algorithm 284

9 Akinwale, Folorunso, & Sodiya Figure 4: Key Interface to generate Power Set Figure 5: Key Interface to generate Closure of the Attributes 285

10 Derivation of Database Keys Operations The next step is for the user to press closure button that will display all the attribute values of each element as shown in Figure 5. Pressing derive keys button will display all attributes in closure that contain relational attributes as shown in Figure 6. Figure 6 has derived key of B, {BM} and {BP} and they contain {BMP} in closure box. The user will press other keys button to see how attributes in derive key are distributed into primary, candidate, alternative and super keys as shown in Figure 7. Figure 6: Key Interface to generate Derived Keys The specific group of keys can aid database designers to design good schema and check database anomalies. For example, primary keys can be used to sort and translate schema. It can also be used to map entity relations and relational model. The candidate keys can be used to list instance object for loaded models. Super keys would assist to check if relations violate 3NF or BCNF. For example, as shown in Figure 7, the only primary key is B. The super keys are {BM} and {BP}. It is clearly seen that the left hand side of M P is not a super key. The schema is not in 3NF because the right hand side is not part of the key. 286

11 Akinwale, Folorunso, & Sodiya Figure 7: Key Interface to generate Other Keys Looking at Figure 8 where we have the same schema: House(Builder = B, Model = M, Price = P) and FDs were changed into BM P, and P B, the whole process has changed. The derived keys are {BM} and {MP} as illustrated in figure 8. It is easy for database designer to check if the relation violate either 3NF or BCNF. The left hand side of BM P is a key so it is okay. The right hand side of P B is part of the key so it is okay. Therefore, the schema is in 3NF. It is also easy to ask if the relation is in BCNF. Based on the definition of BCNF and derivation of keys as shown in Figure 8, this schema is not in BCNF because the only keys are {BM} and {MP} and the FD, P B has a left hand side which is not a super key. It is the right hand side which was part of the key that made it in 3NF. This process is easy to follow without extensive background in relational algebra and database theories. The user needs to know the definition of third or boyce-codd normal form in order to determine the keys. 287

12 Derivation of Database Keys Operations Figure 8: Key Interface with Changes in Functional Dependencies Detailed Analysis Students offer database design (CSC422) at 400 level in the Department of Computer Science, University of Agriculture, Abeokuta, Nigeria. Out of 15-week course, Lecturers and Tutors normally spend 3 weeks on normalization topic. In their final examination paper, one question on normalization technique always appears. Table 1 depicts the students performance between 2000 and The detailed comments on student s performance question by question by external examiner indicated that students found it difficult to determine the closure R + when the attributes of the relation were more than 5. More so, they found it so difficult to derive candidate and super keys. The students performance on normalization question compared with other questions was very poor from year 2000 to Before the beginning of 2007 second semester database design lectures, the graphical key derivation interface as shown in above Figures 3-8 has been developed as part of teaching and learning normalization topic. In 2007 database design tutorials of normalization topic, students were given exercises on relations with three to four attributes and various functional dependencies. It was very easy for average students to get the keys. The results were compared with the text books answers and graphical key derivation interface which showed no discrepancies. Two in-class exercises were given to students as follows: Exercise A: R(A, B, C, D, E, F, G, H, I, J, K, M, N, P) FDs: A, G B, C, D, E, F, H, J, K, L, M, N, P J K,L, M, N, P M N, P G H 288

13 Akinwale, Folorunso, & Sodiya Exercise B: CAR_SALE(invoice#, date, line#, quantity, selling_price, coupon _deduction, saving, sub_total, product#, product_name, product_price, vendor#, vendor_name, vendor_city ) FDs: invoice#, line# date, quantity, selling_price, coupon_deduction, saving, sub_total, product#, product_name, product_price, vendor#, vendor_city product# product_name, product_price, vendor#, vendor_name, vendor_city vendor vendor_name, vendor_city invoice# date None of the 114 students offered database design course for 2007 session was able to derive the closure of exercise A. Later, they were exposed to use the graphical key derivation interface to get the closure of R +. After deriving the closure, 102 out of 114 students derived the keys. They used the tool to do more exercises from the text book. Exercise B was given as continuous assignment test and the result showed that 105 out of 114 students got the closure, non-trivial functional dependencies and the keys after the use of graphical key derivation interface. The tool was used for both teaching and learning of normalization topic for 2007 and 2008 sessions. Table 2 illustrates the students performance on normalization questions for 2007 and 2008 second semester examination on database design. The external examiner remarks on the students performance in normalization questions for both 2007 and 2008 sessions were very impressive compared with other questions. Looking at Tables 1 and 2, before and after introduction of graphical key derivation interface, students knew and answered normalization questions better in respect of grade-wise. Table 1: Students Performance on Normalization question Year offered the course Normalization question No. of Student offered the course No of student attempted the question % % % % % % % Overall performance (%) Year offered the course Table 2: Students performance on normalization question after introduction of graphical key derivation interface Normalization question No. of Student offered the course No of student attempted the question Overall performance % % 289

14 Derivation of Database Keys Operations Conclusion and Future Research Direction The paper identified definitions of each component of relational schema that are necessary to determine various database keys. It enumerated the problems of database designer to identify specific keys for designing relational schemas that would free database anomalies. The work implemented necessary algorithms to derive database keys in their specific groups. These groups can provide piece of information for schema translation, separation of multiple mapped keys and determination of relations that violate normal forms. It was justified that the developed graphical key derivation interface guided students to learn normalization topic effectively. This tool can be expanded to display non-trivial functional dependencies from derived keys and if any functional dependency followed specified functional dependencies. The incorporation of decomposition and loss-less join dependency is proposed if a relational schema violates either 3NF or BCNF as further studies for proper perfection of relation from database anomalies. References Atamturk, E. L., Johnson, E. L., Linderoth, J. T., & Savelsbergh, W. P. (1999). A relational modeling system for linear and integer programming. Information and Management, 48(5) Ausiello, G., Datri, A., & Sacca, D. (1983). Graph algorithms for functional dependency manipulation. Journal of the ACM, 30(4), Biskup, J., Dematrovics, J., Libkin, L., & Muchnik, I. (1991). On relational database schemes having unique minimal key. Journal of Information Processing Cybernetics, 27, Cattel, R. G. G., & Barry, D. K. (1997). The object database standard. Morgan Kaufmann Publishers. Ceri, S., Navathe, S. B., & Wielderhold, G. (1983). Distribution design of logical database schemas, IEEE Transactions on Software Engineering, Chilton, M. A., McHaney, R. & Chae, B. (2006). Data modeling education. The Journal of Information Systems Education, 17(1), Codd, E. F. (1970). A relational model of data for large shared data banks. Communications of the ACM, 13(6), Codd, E. F. (1982). Relational database: A practical foundation for productivity. Communications of the ACM, 25(2), Codd, E. F. (1990). The relational model for database management: Version 2. Addison-Wesley. Concepcion, A. A., & Villafuerte, R. M. (1990). Expert database: An assistant database design system. Proceedings for the Third International Conference on Industrial and Engineering Applications of Artificial Intelligence and Expert Systems, Vol 1. Date, C. J. (1986). An introduction to database systems (Vol. 1). Addison-Wesley. Date, C. J. (2003). An Introduction to database systems (8th ed.). Addison-Wesley. Date C. J., & Darwen, H. (2000). Foundation for future database systems (2nd ed.). Addison-Wesley. Dionysis, C., Tsichritzis, F., & Lochorski, H. (1982). Data models. Prentice-Hall. Diederich, J., & Milton, J. (1988). New method and fast algorithm for database normalization. ACM Transaction on Database Systems, 13(3), Elmasri. R., & Navathe, S. B. (1994), Fundamentals of Database Systems, Benjamin/Cummings Kung, H-J., & Tung, H-L. (2006). A Web-based tool to enhance teaching/learning database normalization. Proceedings of the Southern Association for Information Systems Conference, pp Lucchesi, C., & Osborn, S. (1978). Candidate keys for relations. Journal of Computer and System Sciences, 17(2),

15 Akinwale, Folorunso, & Sodiya Maier, D. (1983). The theory of relational databases. Rockville, MD: Computer Science Press. Rosenthal, A., & Reiner, D. (1994). Tools and transformation for practical database design. ACM Transaction on Database System, 19(2), Saiedian, H., & Spencer, T. (1996). An efficient algorithm to compute the candidate keys of a relational database schema. The Computer Journal, 39(2), Teorey, T. J. (1994). Database modeling and design (2nd ed.). Morgan Kaufmann. Thompson, C. B., & Sward, K. (2005). modelling and teaching technique for conceptual and logical relational database design. Journal of Medical Systems, 29(5). Ullman, J. (1988). Principles of database and knowledge based systems (Vol. 1). Rockville, MD: Computer Science Press Biographies Akinwale Adio Taofiki received his Magister in Informatics from Warsaw University, Warsaw, Poland, M.Sc./PhD in Economic Cybernetics and Computer Science from Oskar Lange University, Wroclaw, Poland. His area of research interest is knowledge database management system and optimization. Olusegun Folorunso is a Senior Lecturer in the Department of Computer Science, University of Agriculture, Abeokuta. He obtained a B.Sc degree in Mathematical Sciences from the University of Agriculture, Abeokuta in 1992, M.Sc in Computer Science from University of Lagos in 1997 and a PhD in Computer Science in 2003 from the University of Agriculture, Abeokuta. His research interest includes Adoption of Information Systems strategies, Human Computer Interaction (HCI), Knowledge Management, Image Processing and Computational Intelligence. He is a member of Nigeria Computer Society and Computer Professional Registration Council of Nigeria. He has published in reputable international and local Journals. Dr. A. S. Sodiya is presently a Senior Lecturer in the department of Computer Science, University of Agriculture, Abeokuta, Nigeria. He completed his PhD in the same university in His areas of research interest are Computer Security, Computer Network, Artificial Intelligence and Software Engineering. He has published both in local and international Journals. He has also attended and presented papers in several conferences. 291

Determination of the normalization level of database schemas through equivalence classes of attributes

Determination of the normalization level of database schemas through equivalence classes of attributes Computer Science Journal of Moldova, vol.17, no.2(50), 2009 Determination of the normalization level of database schemas through equivalence classes of attributes Cotelea Vitalie Abstract In this paper,

More information

Database Design and Normalization

Database Design and Normalization Database Design and Normalization CPS352: Database Systems Simon Miner Gordon College Last Revised: 9/27/12 Agenda Check-in Functional Dependencies (continued) Design Project E-R Diagram Presentations

More information

Relational Database Design

Relational Database Design Relational Database Design To generate a set of relation schemas that allows - to store information without unnecessary redundancy - to retrieve desired information easily Approach - design schema in appropriate

More information

An Algorithmic Approach to Database Normalization

An Algorithmic Approach to Database Normalization An Algorithmic Approach to Database Normalization M. Demba College of Computer Science and Information Aljouf University, Kingdom of Saudi Arabia bah.demba@ju.edu.sa ABSTRACT When an attempt is made to

More information

Schema Design and Normal Forms Sid Name Level Rating Wage Hours

Schema Design and Normal Forms Sid Name Level Rating Wage Hours Entity-Relationship Diagram Schema Design and Sid Name Level Rating Wage Hours Database Management Systems, 2 nd Edition. R. Ramakrishnan and J. Gehrke 1 Database Management Systems, 2 nd Edition. R. Ramakrishnan

More information

Design of Relational Database Schemas

Design of Relational Database Schemas Design of Relational Database Schemas T. M. Murali October 27, November 1, 2010 Plan Till Thanksgiving What are the typical problems or anomalies in relational designs? Introduce the idea of decomposing

More information

Chapter 7: Relational Database Design

Chapter 7: Relational Database Design Chapter 7: Relational Database Design Database System Concepts, 5th Ed. See www.db book.com for conditions on re use Chapter 7: Relational Database Design Features of Good Relational Design Atomic Domains

More information

CS 377 Database Systems. Database Design Theory and Normalization. Li Xiong Department of Mathematics and Computer Science Emory University

CS 377 Database Systems. Database Design Theory and Normalization. Li Xiong Department of Mathematics and Computer Science Emory University CS 377 Database Systems Database Design Theory and Normalization Li Xiong Department of Mathematics and Computer Science Emory University 1 Relational database design So far Conceptual database design

More information

A WEB-BASED TOOL TO ENHANCE TEACHING/LEARNING DATABASE NORMALIZATION

A WEB-BASED TOOL TO ENHANCE TEACHING/LEARNING DATABASE NORMALIZATION A WEB-BASED TOOL TO ENHANCE TEACHING/LEARNING DATABASE NORMALIZATION Abstract Hsiang-Jui Kung Georgia Southern University hjkung@georgiasouthern.edu Hui-Lien Tung Troy University tungh@troy.edu It has

More information

Functional Dependencies and Finding a Minimal Cover

Functional Dependencies and Finding a Minimal Cover Functional Dependencies and Finding a Minimal Cover Robert Soulé 1 Normalization An anomaly occurs in a database when you can update, insert, or delete data, and get undesired side-effects. These side

More information

Theory of Relational Database Design and Normalization

Theory of Relational Database Design and Normalization Theory of Relational Database Design and Normalization (Based on Chapter 14 and some part of Chapter 15 in Fundamentals of Database Systems by Elmasri and Navathe, Ed. 3) 1 Informal Design Guidelines for

More information

Chapter 10. Functional Dependencies and Normalization for Relational Databases

Chapter 10. Functional Dependencies and Normalization for Relational Databases Chapter 10 Functional Dependencies and Normalization for Relational Databases Chapter Outline 1 Informal Design Guidelines for Relational Databases 1.1Semantics of the Relation Attributes 1.2 Redundant

More information

Lecture Notes on Database Normalization

Lecture Notes on Database Normalization Lecture Notes on Database Normalization Chengkai Li Department of Computer Science and Engineering The University of Texas at Arlington April 15, 2012 I decided to write this document, because many students

More information

Database Constraints and Design

Database Constraints and Design Database Constraints and Design We know that databases are often required to satisfy some integrity constraints. The most common ones are functional and inclusion dependencies. We ll study properties of

More information

Chapter 10 Functional Dependencies and Normalization for Relational Databases

Chapter 10 Functional Dependencies and Normalization for Relational Databases Chapter 10 Functional Dependencies and Normalization for Relational Databases Copyright 2004 Pearson Education, Inc. Chapter Outline 1 Informal Design Guidelines for Relational Databases 1.1Semantics of

More information

Database Design and Normal Forms

Database Design and Normal Forms Database Design and Normal Forms Database Design coming up with a good schema is very important How do we characterize the goodness of a schema? If two or more alternative schemas are available how do

More information

COSC344 Database Theory and Applications. Lecture 9 Normalisation. COSC344 Lecture 9 1

COSC344 Database Theory and Applications. Lecture 9 Normalisation. COSC344 Lecture 9 1 COSC344 Database Theory and Applications Lecture 9 Normalisation COSC344 Lecture 9 1 Overview Last Lecture Functional Dependencies This Lecture Normalisation Introduction 1NF 2NF 3NF BCNF Source: Section

More information

Theory of Relational Database Design and Normalization

Theory of Relational Database Design and Normalization Theory of Relational Database Design and Normalization (Based on Chapter 14 and some part of Chapter 15 in Fundamentals of Database Systems by Elmasri and Navathe) 1 Informal Design Guidelines for Relational

More information

Week 11: Normal Forms. Logical Database Design. Normal Forms and Normalization. Examples of Redundancy

Week 11: Normal Forms. Logical Database Design. Normal Forms and Normalization. Examples of Redundancy Week 11: Normal Forms Database Design Database Redundancies and Anomalies Functional Dependencies Entailment, Closure and Equivalence Lossless Decompositions The Third Normal Form (3NF) The Boyce-Codd

More information

Chapter 15 Basics of Functional Dependencies and Normalization for Relational Databases

Chapter 15 Basics of Functional Dependencies and Normalization for Relational Databases Chapter 15 Basics of Functional Dependencies and Normalization for Relational Databases Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 15 Outline Informal Design Guidelines

More information

Functional Dependencies

Functional Dependencies BCNF and 3NF Functional Dependencies Functional dependencies: modeling constraints on attributes stud-id name address course-id session-id classroom instructor Functional dependencies should be obtained

More information

Functional Dependencies and Normalization

Functional Dependencies and Normalization Functional Dependencies and Normalization 5DV119 Introduction to Database Management Umeå University Department of Computing Science Stephen J. Hegner hegner@cs.umu.se http://www.cs.umu.se/~hegner Functional

More information

Chapter 10. Functional Dependencies and Normalization for Relational Databases. Copyright 2007 Ramez Elmasri and Shamkant B.

Chapter 10. Functional Dependencies and Normalization for Relational Databases. Copyright 2007 Ramez Elmasri and Shamkant B. Chapter 10 Functional Dependencies and Normalization for Relational Databases Copyright 2007 Ramez Elmasri and Shamkant B. Navathe Chapter Outline 1 Informal Design Guidelines for Relational Databases

More information

normalisation Goals: Suppose we have a db scheme: is it good? define precise notions of the qualities of a relational database scheme

normalisation Goals: Suppose we have a db scheme: is it good? define precise notions of the qualities of a relational database scheme Goals: Suppose we have a db scheme: is it good? Suppose we have a db scheme derived from an ER diagram: is it good? define precise notions of the qualities of a relational database scheme define algorithms

More information

Limitations of E-R Designs. Relational Normalization Theory. Redundancy and Other Problems. Redundancy. Anomalies. Example

Limitations of E-R Designs. Relational Normalization Theory. Redundancy and Other Problems. Redundancy. Anomalies. Example Limitations of E-R Designs Relational Normalization Theory Chapter 6 Provides a set of guidelines, does not result in a unique database schema Does not provide a way of evaluating alternative schemas Normalization

More information

Schema Refinement and Normalization

Schema Refinement and Normalization Schema Refinement and Normalization Module 5, Lectures 3 and 4 Database Management Systems, R. Ramakrishnan 1 The Evils of Redundancy Redundancy is at the root of several problems associated with relational

More information

The Relational Data Model and Relational Database Constraints

The Relational Data Model and Relational Database Constraints The Relational Data Model and Relational Database Constraints Chapter Outline Relational Model Concepts Relational Model Constraints and Relational Database Schemas Update Operations and Dealing with Constraint

More information

Why Is This Important? Schema Refinement and Normal Forms. The Evils of Redundancy. Functional Dependencies (FDs) Example (Contd.)

Why Is This Important? Schema Refinement and Normal Forms. The Evils of Redundancy. Functional Dependencies (FDs) Example (Contd.) Why Is This Important? Schema Refinement and Normal Forms Chapter 19 Many ways to model a given scenario in a database How do we find the best one? We will discuss objective criteria for evaluating database

More information

Theory behind Normalization & DB Design. Satisfiability: Does an FD hold? Lecture 12

Theory behind Normalization & DB Design. Satisfiability: Does an FD hold? Lecture 12 Theory behind Normalization & DB Design Lecture 12 Satisfiability: Does an FD hold? Satisfiability of FDs Given: FD X Y and relation R Output: Does R satisfy X Y? Algorithm: a.sort R on X b.do all the

More information

Functional Dependency and Normalization for Relational Databases

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

More information

Normalisation to 3NF. Database Systems Lecture 11 Natasha Alechina

Normalisation to 3NF. Database Systems Lecture 11 Natasha Alechina Normalisation to 3NF Database Systems Lecture 11 Natasha Alechina In This Lecture Normalisation to 3NF Data redundancy Functional dependencies Normal forms First, Second, and Third Normal Forms For more

More information

Database Systems Concepts, Languages and Architectures

Database Systems Concepts, Languages and Architectures These slides are for use with Database Systems Concepts, Languages and Architectures Paolo Atzeni Stefano Ceri Stefano Paraboschi Riccardo Torlone To view these slides on-screen or with a projector use

More information

Fundamentals of Database System

Fundamentals of Database System Fundamentals of Database System Chapter 4 Normalization Fundamentals of Database Systems (Chapter 4) Page 1 Introduction To Normalization In general, the goal of a relational database design is to generate

More information

How To Find Out What A Key Is In A Database Engine

How To Find Out What A Key Is In A Database Engine Database design theory, Part I Functional dependencies Introduction As we saw in the last segment, designing a good database is a non trivial matter. The E/R model gives a useful rapid prototyping tool,

More information

Relational Database Design Theory

Relational Database Design Theory Relational Database Design Theory Informal guidelines for good relational designs Functional dependencies Normal forms and normalization 1NF, 2NF, 3NF BCNF, 4NF, 5NF Inference rules on functional dependencies

More information

LiTH, Tekniska högskolan vid Linköpings universitet 1(7) IDA, Institutionen för datavetenskap Juha Takkinen 2007-05-24

LiTH, Tekniska högskolan vid Linköpings universitet 1(7) IDA, Institutionen för datavetenskap Juha Takkinen 2007-05-24 LiTH, Tekniska högskolan vid Linköpings universitet 1(7) IDA, Institutionen för datavetenskap Juha Takkinen 2007-05-24 1. A database schema is a. the state of the db b. a description of the db using a

More information

MCQs~Databases~Relational Model and Normalization http://en.wikipedia.org/wiki/database_normalization

MCQs~Databases~Relational Model and Normalization http://en.wikipedia.org/wiki/database_normalization http://en.wikipedia.org/wiki/database_normalization Database normalization is the process of organizing the fields and tables of a relational database to minimize redundancy. Normalization usually involves

More information

Normalization in Database Design

Normalization in Database Design in Database Design Marek Rychly mrychly@strathmore.edu Strathmore University, @ilabafrica & Brno University of Technology, Faculty of Information Technology Advanced Databases and Enterprise Systems 14

More information

Schema Refinement, Functional Dependencies, Normalization

Schema Refinement, Functional Dependencies, Normalization Schema Refinement, Functional Dependencies, Normalization MSCI 346: Database Systems Güneş Aluç, University of Waterloo Spring 2015 MSCI 346: Database Systems Chapter 19 1 / 42 Outline 1 Introduction Design

More information

Databases -Normalization III. (N Spadaccini 2010 and W Liu 2012) Databases - Normalization III 1 / 31

Databases -Normalization III. (N Spadaccini 2010 and W Liu 2012) Databases - Normalization III 1 / 31 Databases -Normalization III (N Spadaccini 2010 and W Liu 2012) Databases - Normalization III 1 / 31 This lecture This lecture describes 3rd normal form. (N Spadaccini 2010 and W Liu 2012) Databases -

More information

Chapter 8. Database Design II: Relational Normalization Theory

Chapter 8. Database Design II: Relational Normalization Theory Chapter 8 Database Design II: Relational Normalization Theory The E-R approach is a good way to start dealing with the complexity of modeling a real-world enterprise. However, it is only a set of guidelines

More information

Database Management System

Database Management System UNIT -6 Database Design Informal Design Guidelines for Relation Schemas; Functional Dependencies; Normal Forms Based on Primary Keys; General Definitions of Second and Third Normal Forms; Boyce-Codd Normal

More information

DATABASE NORMALIZATION

DATABASE NORMALIZATION DATABASE NORMALIZATION Normalization: process of efficiently organizing data in the DB. RELATIONS (attributes grouped together) Accurate representation of data, relationships and constraints. Goal: - Eliminate

More information

Chapter 5: FUNCTIONAL DEPENDENCIES AND NORMALIZATION FOR RELATIONAL DATABASES

Chapter 5: FUNCTIONAL DEPENDENCIES AND NORMALIZATION FOR RELATIONAL DATABASES 1 Chapter 5: FUNCTIONAL DEPENDENCIES AND NORMALIZATION FOR RELATIONAL DATABASES INFORMAL DESIGN GUIDELINES FOR RELATION SCHEMAS We discuss four informal measures of quality for relation schema design in

More information

The University of British Columbia

The University of British Columbia The University of British Columbia Computer Science 304 Midterm Examination October 31, 2005 Time: 50 minutes Total marks: 50 Instructor: Rachel Pottinger Name ANSWER KEY (PRINT) (Last) (First) Signature

More information

Advanced Relational Database Design

Advanced Relational Database Design APPENDIX B Advanced Relational Database Design In this appendix we cover advanced topics in relational database design. We first present the theory of multivalued dependencies, including a set of sound

More information

Introduction to Database Systems. Normalization

Introduction to Database Systems. Normalization Introduction to Database Systems Normalization Werner Nutt 1 Normalization 1. Anomalies 1. Anomalies 2. Boyce-Codd Normal Form 3. 3 rd Normal Form 2 Anomalies The goal of relational schema design is to

More information

CS143 Notes: Normalization Theory

CS143 Notes: Normalization Theory CS143 Notes: Normalization Theory Book Chapters (4th) Chapters 7.1-6, 7.8, 7.10 (5th) Chapters 7.1-6, 7.8 (6th) Chapters 8.1-6, 8.8 INTRODUCTION Main question How do we design good tables for a relational

More information

Relational Database Design: FD s & BCNF

Relational Database Design: FD s & BCNF CS145 Lecture Notes #5 Relational Database Design: FD s & BCNF Motivation Automatic translation from E/R or ODL may not produce the best relational design possible Sometimes database designers like to

More information

Introduction Decomposition Simple Synthesis Bernstein Synthesis and Beyond. 6. Normalization. Stéphane Bressan. January 28, 2015

Introduction Decomposition Simple Synthesis Bernstein Synthesis and Beyond. 6. Normalization. Stéphane Bressan. January 28, 2015 6. Normalization Stéphane Bressan January 28, 2015 1 / 42 This lecture is based on material by Professor Ling Tok Wang. CS 4221: Database Design The Relational Model Ling Tok Wang National University of

More information

Normalization of Database

Normalization of Database Normalization of Database UNIT-4 Database Normalisation is a technique of organizing the data in the database. Normalization is a systematic approach of decomposing tables to eliminate data redundancy

More information

Normalization in OODB Design

Normalization in OODB Design Normalization in OODB Design Byung S. Lee Graduate Programs in Software University of St. Thomas St. Paul, Minnesota bslee@stthomas.edu Abstract When we design an object-oriented database schema, we need

More information

a 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22 x 2 + + a 2n x n = b 2.

a 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22 x 2 + + a 2n x n = b 2. Chapter 1 LINEAR EQUATIONS 1.1 Introduction to linear equations A linear equation in n unknowns x 1, x,, x n is an equation of the form a 1 x 1 + a x + + a n x n = b, where a 1, a,..., a n, b are given

More information

Chapter 5: Logical Database Design and the Relational Model Part 2: Normalization. Introduction to Normalization. Normal Forms.

Chapter 5: Logical Database Design and the Relational Model Part 2: Normalization. Introduction to Normalization. Normal Forms. Chapter 5: Logical Database Design and the Relational Model Part 2: Normalization Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred R. McFadden Robert C. Nickerson ISYS

More information

Design of Normalized Relation: An Ameliorated Tool

Design of Normalized Relation: An Ameliorated Tool International Journal of Computing & Information Sciences Vol. 9, No. 1, April 2011 Design of Normalized Relation: An Ameliorated Tool Ajeet A. Chikkamannur and Shivanand M. Handigund Pages 28 33 Design

More information

Databases What the Specification Says

Databases What the Specification Says Databases What the Specification Says Describe flat files and relational databases, explaining the differences between them; Design a simple relational database to the third normal form (3NF), using entityrelationship

More information

BCA. Database Management System

BCA. Database Management System BCA IV Sem Database Management System Multiple choice questions 1. A Database Management System (DBMS) is A. Collection of interrelated data B. Collection of programs to access data C. Collection of data

More information

Database Management Systems. Redundancy and Other Problems. Redundancy

Database Management Systems. Redundancy and Other Problems. Redundancy Database Management Systems Winter 2004 CMPUT 391: Database Design Theory or Relational Normalization Theory Dr. Osmar R. Zaïane Lecture 2 Limitations of Relational Database Designs Provides a set of guidelines,

More information

Limitations of DB Design Processes

Limitations of DB Design Processes Normalization CS 317/387 1 Limitations of DB Design Processes Provides a set of guidelines, does not result in a unique database schema Does not provide a way of evaluating alternative schemas Pitfalls:

More information

3. Relational Model and Relational Algebra

3. Relational Model and Relational Algebra ECS-165A WQ 11 36 3. Relational Model and Relational Algebra Contents Fundamental Concepts of the Relational Model Integrity Constraints Translation ER schema Relational Database Schema Relational Algebra

More information

Formal Languages and Automata Theory - Regular Expressions and Finite Automata -

Formal Languages and Automata Theory - Regular Expressions and Finite Automata - Formal Languages and Automata Theory - Regular Expressions and Finite Automata - Samarjit Chakraborty Computer Engineering and Networks Laboratory Swiss Federal Institute of Technology (ETH) Zürich March

More information

Regular Expressions and Automata using Haskell

Regular Expressions and Automata using Haskell Regular Expressions and Automata using Haskell Simon Thompson Computing Laboratory University of Kent at Canterbury January 2000 Contents 1 Introduction 2 2 Regular Expressions 2 3 Matching regular expressions

More information

Normalisation. Why normalise? To improve (simplify) database design in order to. Avoid update problems Avoid redundancy Simplify update operations

Normalisation. Why normalise? To improve (simplify) database design in order to. Avoid update problems Avoid redundancy Simplify update operations Normalisation Why normalise? To improve (simplify) database design in order to Avoid update problems Avoid redundancy Simplify update operations 1 Example ( the practical difference between a first normal

More information

Lecture 2 Normalization

Lecture 2 Normalization MIT 533 ระบบฐานข อม ล 2 Lecture 2 Normalization Walailuk University Lecture 2: Normalization 1 Objectives The purpose of normalization The identification of various types of update anomalies The concept

More information

RELATIONAL DATABASE DESIGN

RELATIONAL DATABASE DESIGN RELATIONAL DATABASE DESIGN g Good database design - Avoiding anomalies g Functional Dependencies g Normalization & Decomposition Using Functional Dependencies g 1NF - Atomic Domains and First Normal Form

More information

SAMPLE FINAL EXAMINATION SPRING SESSION 2015

SAMPLE FINAL EXAMINATION SPRING SESSION 2015 SAMPLE FINAL EXAMINATION SPRING SESSION 2015 School of Computing, Engineering and Mathematics Student family name: Student given name/s: Student ID number: Course: Unit Name (In Full): Database Design

More information

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS Systems of Equations and Matrices Representation of a linear system The general system of m equations in n unknowns can be written a x + a 2 x 2 + + a n x n b a

More information

Threat Modeling Using Fuzzy Logic Paradigm

Threat Modeling Using Fuzzy Logic Paradigm Issues in Informing Science and Information Technology Volume 4, 2007 Threat Modeling Using Fuzzy Logic Paradigm A. S. Sodiya, S. A. Onashoga, and B. A. Oladunjoye Department of Computer Science, University

More information

6.830 Lecture 3 9.16.2015 PS1 Due Next Time (Tuesday!) Lab 1 Out today start early! Relational Model Continued, and Schema Design and Normalization

6.830 Lecture 3 9.16.2015 PS1 Due Next Time (Tuesday!) Lab 1 Out today start early! Relational Model Continued, and Schema Design and Normalization 6.830 Lecture 3 9.16.2015 PS1 Due Next Time (Tuesday!) Lab 1 Out today start early! Relational Model Continued, and Schema Design and Normalization Animals(name,age,species,cageno,keptby,feedtime) Keeper(id,name)

More information

MATH10040 Chapter 2: Prime and relatively prime numbers

MATH10040 Chapter 2: Prime and relatively prime numbers MATH10040 Chapter 2: Prime and relatively prime numbers Recall the basic definition: 1. Prime numbers Definition 1.1. Recall that a positive integer is said to be prime if it has precisely two positive

More information

An Engagement Model for Learning: Providing a Framework to Identify Technology Services

An Engagement Model for Learning: Providing a Framework to Identify Technology Services Interdisciplinary Journal of Knowledge and Learning Objects Volume 3, 2007 An Engagement Model for Learning: Providing a Framework to Identify Technology Services I.T. Hawryszkiewycz Department of Information

More information

Margaret S. W% 425 Beldon Ave Iowa City, Iowa 52246 Phone: (319) 335-0846 ABSTRACT

Margaret S. W% 425 Beldon Ave Iowa City, Iowa 52246 Phone: (319) 335-0846 ABSTRACT The Practical Need for Fourth Normal Form Margaret S. W% 425 Beldon Ave Iowa City, Iowa 52246 Phone: (319) 335-0846 ABSTRACT Many practitioners and academicians believe that data violating fourth normal

More information

KNOWLEDGE FACTORING USING NORMALIZATION THEORY

KNOWLEDGE FACTORING USING NORMALIZATION THEORY KNOWLEDGE FACTORING USING NORMALIZATION THEORY J. VANTHIENEN M. SNOECK Katholieke Universiteit Leuven Department of Applied Economic Sciences Dekenstraat 2, 3000 Leuven (Belgium) tel. (+32) 16 28 58 09

More information

Lecture 17 : Equivalence and Order Relations DRAFT

Lecture 17 : Equivalence and Order Relations DRAFT CS/Math 240: Introduction to Discrete Mathematics 3/31/2011 Lecture 17 : Equivalence and Order Relations Instructor: Dieter van Melkebeek Scribe: Dalibor Zelený DRAFT Last lecture we introduced the notion

More information

Normalization of database model. Pazmany Peter Catholic University 2005 Zoltan Fodroczi

Normalization of database model. Pazmany Peter Catholic University 2005 Zoltan Fodroczi Normalization of database model Pazmany Peter Catholic University 2005 Zoltan Fodroczi Closure of an attribute set Given a set of attributes α define the closure of attribute set α under F (denoted as

More information

Database Design and Normalization

Database Design and Normalization Database Design and Normalization Chapter 10 (Week 11) EE562 Slides and Modified Slides from Database Management Systems, R. Ramakrishnan 1 Computing Closure F + Example: List all FDs with: - a single

More information

k, then n = p2α 1 1 pα k

k, then n = p2α 1 1 pα k Powers of Integers An integer n is a perfect square if n = m for some integer m. Taking into account the prime factorization, if m = p α 1 1 pα k k, then n = pα 1 1 p α k k. That is, n is a perfect square

More information

Graham Kemp (telephone 772 54 11, room 6475 EDIT) The examiner will visit the exam room at 15:00 and 17:00.

Graham Kemp (telephone 772 54 11, room 6475 EDIT) The examiner will visit the exam room at 15:00 and 17:00. CHALMERS UNIVERSITY OF TECHNOLOGY Department of Computer Science and Engineering Examination in Databases, TDA357/DIT620 Tuesday 17 December 2013, 14:00-18:00 Examiner: Results: Exam review: Grades: Graham

More information

Regular Languages and Finite Automata

Regular Languages and Finite Automata Regular Languages and Finite Automata 1 Introduction Hing Leung Department of Computer Science New Mexico State University Sep 16, 2010 In 1943, McCulloch and Pitts [4] published a pioneering work on a

More information

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES I GROUPS: BASIC DEFINITIONS AND EXAMPLES Definition 1: An operation on a set G is a function : G G G Definition 2: A group is a set G which is equipped with an operation and a special element e G, called

More information

IT2304: Database Systems 1 (DBS 1)

IT2304: Database Systems 1 (DBS 1) : Database Systems 1 (DBS 1) (Compulsory) 1. OUTLINE OF SYLLABUS Topic Minimum number of hours Introduction to DBMS 07 Relational Data Model 03 Data manipulation using Relational Algebra 06 Data manipulation

More information

A. TRUE-FALSE: GROUP 2 PRACTICE EXAMPLES FOR THE REVIEW QUIZ:

A. TRUE-FALSE: GROUP 2 PRACTICE EXAMPLES FOR THE REVIEW QUIZ: GROUP 2 PRACTICE EXAMPLES FOR THE REVIEW QUIZ: Review Quiz will contain very similar question as below. Some questions may even be repeated. The order of the questions are random and are not in order of

More information

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products Chapter 3 Cartesian Products and Relations The material in this chapter is the first real encounter with abstraction. Relations are very general thing they are a special type of subset. After introducing

More information

6.2 Permutations continued

6.2 Permutations continued 6.2 Permutations continued Theorem A permutation on a finite set A is either a cycle or can be expressed as a product (composition of disjoint cycles. Proof is by (strong induction on the number, r, of

More information

The Graphical Method: An Example

The Graphical Method: An Example The Graphical Method: An Example Consider the following linear program: Maximize 4x 1 +3x 2 Subject to: 2x 1 +3x 2 6 (1) 3x 1 +2x 2 3 (2) 2x 2 5 (3) 2x 1 +x 2 4 (4) x 1, x 2 0, where, for ease of reference,

More information

Automating The Normalization Process For Relational Database Model

Automating The Normalization Process For Relational Database Model Automating The Normalization Process For Relational Database Model P.B.Alappanavar 1, Radhika Grover 2, Srishti Hunjan 3, Dhiraj Patil 4 Yuvraj Girnar 5 1 (Assistant Professor, Department of IT, STES's

More information

Chapter 13. Chapter Outline. Disk Storage, Basic File Structures, and Hashing

Chapter 13. Chapter Outline. Disk Storage, Basic File Structures, and Hashing Chapter 13 Disk Storage, Basic File Structures, and Hashing Copyright 2007 Ramez Elmasri and Shamkant B. Navathe Chapter Outline Disk Storage Devices Files of Records Operations on Files Unordered Files

More information

Systems of Linear Equations

Systems of Linear Equations Systems of Linear Equations Beifang Chen Systems of linear equations Linear systems A linear equation in variables x, x,, x n is an equation of the form a x + a x + + a n x n = b, where a, a,, a n and

More information

The process of database development. Logical model: relational DBMS. Relation

The process of database development. Logical model: relational DBMS. Relation The process of database development Reality (Universe of Discourse) Relational Databases and SQL Basic Concepts The 3rd normal form Structured Query Language (SQL) Conceptual model (e.g. Entity-Relationship

More information

Xml Normalization and Reducing RedUndies

Xml Normalization and Reducing RedUndies Proceedings of the International Multiconference on Computer Science and Information Technology pp. 543 550 ISBN 978-83-60810-14-9 ISSN 1896-7094 Dealing with redundancies and dependencies in normalization

More information

C# Cname Ccity.. P1# Date1 Qnt1 P2# Date2 P9# Date9 1 Codd London.. 1 21.01 20 2 23.01 2 Martin Paris.. 1 26.10 25 3 Deen London.. 2 29.

C# Cname Ccity.. P1# Date1 Qnt1 P2# Date2 P9# Date9 1 Codd London.. 1 21.01 20 2 23.01 2 Martin Paris.. 1 26.10 25 3 Deen London.. 2 29. 4. Normalisation 4.1 Introduction Suppose we are now given the task of designing and creating a database. How do we produce a good design? What relations should we have in the database? What attributes

More information

Carnegie Mellon Univ. Dept. of Computer Science 15-415 - Database Applications. Overview - detailed. Goal. Faloutsos CMU SCS 15-415

Carnegie Mellon Univ. Dept. of Computer Science 15-415 - Database Applications. Overview - detailed. Goal. Faloutsos CMU SCS 15-415 Faloutsos 15-415 Carnegie Mellon Univ. Dept. of Computer Science 15-415 - Database Applications Lecture #17: Schema Refinement & Normalization - Normal Forms (R&G, ch. 19) Overview - detailed DB design

More information

Lecture 16 : Relations and Functions DRAFT

Lecture 16 : Relations and Functions DRAFT CS/Math 240: Introduction to Discrete Mathematics 3/29/2011 Lecture 16 : Relations and Functions Instructor: Dieter van Melkebeek Scribe: Dalibor Zelený DRAFT In Lecture 3, we described a correspondence

More information

WRITING PROOFS. Christopher Heil Georgia Institute of Technology

WRITING PROOFS. Christopher Heil Georgia Institute of Technology WRITING PROOFS Christopher Heil Georgia Institute of Technology A theorem is just a statement of fact A proof of the theorem is a logical explanation of why the theorem is true Many theorems have this

More information

CIS 631 Database Management Systems Sample Final Exam

CIS 631 Database Management Systems Sample Final Exam CIS 631 Database Management Systems Sample Final Exam 1. (25 points) Match the items from the left column with those in the right and place the letters in the empty slots. k 1. Single-level index files

More information

Relational Databases

Relational Databases Relational Databases Jan Chomicki University at Buffalo Jan Chomicki () Relational databases 1 / 18 Relational data model Domain domain: predefined set of atomic values: integers, strings,... every attribute

More information

1.2 Solving a System of Linear Equations

1.2 Solving a System of Linear Equations 1.. SOLVING A SYSTEM OF LINEAR EQUATIONS 1. Solving a System of Linear Equations 1..1 Simple Systems - Basic De nitions As noticed above, the general form of a linear system of m equations in n variables

More information

Components- Based Access Control Architecture

Components- Based Access Control Architecture Issue s in Informing Science and Information Technology Volume 6, 2009 Components- Based Access Control Architecture Adesina S. Sodiya and Adebukola S. Onashoga Department of Computer Science, University

More information

This asserts two sets are equal iff they have the same elements, that is, a set is determined by its elements.

This asserts two sets are equal iff they have the same elements, that is, a set is determined by its elements. 3. Axioms of Set theory Before presenting the axioms of set theory, we first make a few basic comments about the relevant first order logic. We will give a somewhat more detailed discussion later, but

More information

Question 1. Relational Data Model [17 marks] Question 2. SQL and Relational Algebra [31 marks]

Question 1. Relational Data Model [17 marks] Question 2. SQL and Relational Algebra [31 marks] EXAMINATIONS 2005 MID-YEAR COMP 302 Database Systems Time allowed: Instructions: 3 Hours Answer all questions. Make sure that your answers are clear and to the point. Write your answers in the spaces provided.

More information