3. Database Design Functional Dependency Introduction Value in design Initial state Aims
|
|
|
- Rudolf Singleton
- 10 years ago
- Views:
Transcription
1 of 18 05/03/ :37 3. Database Design This is the Database Design course theme. [Complete set of notes PDF 295Kb] Functional Dependency In this lecture we look at... [Section notes PDF 64Kb] Introduction What is relational design? Notion of attribute distribution Conceptual-level optimisation How do we asses the quality of a design? Value in design Allocated arbitrarily by DBD under ER/EER Goodness at Internal/storage level (base relations only) Reducing nulls - obvious storage benefits /frequent Reducing redundancy - for efficient storage/anomalies Conceptual level Semantics of the attributes /single entity:relation No spurious tuple generation /no match Attr,-PK/FK Initial state Database design Universal relation R = {A 1, A 2,, A n } Set of functional dependencies F Decompose R using F to D = {R 1, R 2,, R n } D is a decomposition of R under F Aims
2 of 18 05/03/ :37 Attribute preservation Union of all decomposed relations = original Lossless/non-additive join For every extension, total join of r(r i ) yeilds r(r) no spurious/erroneous tuples Aims (preservation) Dependency preservation Constraints on the database X -> Y in F of R, appears directly in R i Attributes X and Y all contained in R i Each relation R i in 3NF But what's a dependency? Functional dependency Constraint between two sets of attributes Formal method for grouping attributes DB as one single universal relation/-literal R = {A 1,A 2,,A n } Two sets of attributes, X subset R,Y subset R Functional dependency (FD or f.d.) X -> Y If t 1 [X] = t 2 [X], then t 1 [Y] = t 2 [Y] Values of the Y attribute depend on value of X X functionally determines Y, not reverse necessarily Dependency derivation Rules of inference reflexive: if X implies Y then X -> Y augment: {X -> Y} then XZ -> YZ transitive: {X -> Y,Y -> Z} then X -> Z Armstrong demonstrated complete for closures Functional dependency If X is a key (primary and/or candidate) All tuples t i have a unique value for X No two tuples (t 1,t 2 ) share a value of X Therefore X -> Y For any subset of attributes Y Examples SSN -> {Fname, Minit, Lname}
3 of 18 05/03/ :37 {Country of issue, Driving license no} -> SSN Mobile area code -> Mobile network (not anymore) Process Typically start with set of f.d., F determined from semantics of attributes Then use IR1,2,3 to infer additional f.d.s Determine left hand sides (Xs) Then determine all attributes dependent on X For each set of attributes X, determine X+ :the set of attributes f.d'ed by X on F Algorithm Compute the closure of X under F: X+ xplus = x; do oldxplus = xplus; for (each f.d. Y -> Z in F) if (xplus implies Y) then xplus = xplus union Z; while (xplus!= oldxplus); Function dependency Consider a relation schema R(A,B,C,D) and a set F of functional dependencies Aim to find all keys (minimal superkeys), by determining closures of all possible X subsets of R s attributes, e.g. A+, B+, C+, D+, AB+, AC+, AD+, BC+, BD+, CD+ ABC+, ABD+, BCD+ ABCD Worked example Let R be a relational schema R(A, B, C, D) Simple set of f.d.s AB -> C, C -> D, D -> A Calculate singletons A+, B+, C+, D+, Pairs AB+, AC+,
4 of 18 05/03/ :37 Triples and so on Worked example Compute sets of closures AB -> C, C -> D, D -> A 1.Singletons A+ -> A B+ -> B C+ -> CDA D+ -> AD Question: are any singletons superkeys? F.d. closure example 2.Pairs (note commutative) AB+ -> ABCD AC+ -> ACD AD+ -> AD BC+ -> ABCD BD+ -> ABCD CD+ -> ACD Superkeys? F.d. closure example 3.Triples ABC+ -> ABCD ABD+ -> ABCD BCD+ -> ABCD Superkeys? Minimal superkeys (keys)? 4.Quadruples ABCD+ -> ABCD F.d. closure summary Superkeys: AB, BC, BD, ABC, ABD, BCD, ABCD Minimal superkeys (keys) AB, BC, BD 3.2. Normal Forms
5 of 18 05/03/ :37 In this lecture we look at... [Section notes PDF 121Kb] Orthogonal design Information Principle: The entire information content of the database is represented in one and only one way, namely as explicit values in column positions in tables Implies that two relations cannot have the same meaning unless they explicitly have the same design/attributes (including name) Normalization Reduced redundancy Organised data efficiently Improves data consistency Reduces chance of update anomalies Data duplicated, then updated in only one location Only duplicate primary key All non-key data stored only once Data spread across multiple tables, instead of one Universal relation R Good or bad? Depends on Application OLTP (Transaction processing) Lots of small transactions Need to execute updates quickly OLAP (Analytical processing/dss) Largely Read-only Redundant data copies facilitate Business Intellegence applications, e.g. star schema (later) 3NF considered normalised save special cases Normal forms (1NF) First Normal form (1NF) Disallows multivalued attributes Part of the basic relational model Domain must include only atomic values simple, indivisible Value of attribute-tuple in extension of schema t[a i ] (A i )
6 of 18 05/03/ : Normalisation (1NF) Remove fields containing comma separated lists Multi-valued attribute (A MV ) of R i Create new relation (R NEW ) with FK to R i [PK] R NEW (UID, A MV, FK I ) Normalisation (1NF) On weak entity On strong entity Normal forms (2NF) A relation R i is in 2NF if: Every nonprime attribute A in R i is fully functionally dependent on 1y key of R If all keys are singletons, guaranteed If R i has composite key are all non-key attributes fully functionally dependent on all attributes of composite key? Normal forms (2NF) Second normal form (2NF) Full functional dependency X Y A X, (X - {A}) Y
7 of 18 05/03/ :37 If any attribute A is removed from X Then X Y no longer holds Partial functional dependency A X, (X - {A}) Y Normal forms (2NF) In context Not 2NF: AB C, A C AB C is not in 2NF, because B can be removed Not 2NF: AB CDE, B DE because attributes D&E are dependent on part of the composite key (B of AB), not all of it Normalisation (2NF) Split attributes not depended on all of the primary key into separate relations Normal forms (BCNF) Boyce-Codd Normal form (BCNF) Simpler, stricter 3NF BCNF 3NF 3NF does not imply BCNF nontrivial functional dependency X Y Then X must be a superkey Normal forms (3NF) Third Normal form (3NF) Derived/based on transitive dependency For all nontrivial functional dependencies X A Either X must be a superkey Or A is a prime attribute (member of a key)
8 of 18 05/03/ : Normal forms in context AB C, C D, D A In context 3NF? Yes Because AB is a superkey and D and A are prime attributes BCNF? No Because C and D are not superkeys (even though AB is) Normalisation (3NF) CarMakes not in 3NF because: singleton key A non-trivial fd B C B not superkey, C not prime attribute 3.3. OODB In this lecture we look at... [Section notes PDF 34Kb] Introduction Database architectures, beyond Why OODBMS? ObjectStore CORBA object distribution standard Large DBMS Complex entity fragmentation
9 of 18 05/03/ :37 across many relations Breaks the miniworld-realworld dichotomy Requires conceptual abstracting layer Difficult to retrieve all information for x Compounded by version control Object orientation Object components (icv triples) Object Identity (OID), I replaces primary key Type constructor, c how the object state is constructed from sub-comp e.g. atom, tuple (struct), set, list, bag, array Object state, v Object behaviour/action Desirable features Encapsulation Abstract data types Information hiding Object classes and behavior Defined by operations (methods) Inheritance and hierarchies Strong typing (no illegal casting) don t think about inheritance just yet Desirable features Persistence Objects exist after termination Naming and reachability mechanism Late binding in Java Performance user-def functions executed on server, not client Extension into relational model Domains of objects, not just values Domain hierarchies etc Desirable features Polymorphism aka. operator overloading
10 0 of 18 05/03/ :37 same method name/symbol multiple implementations Easy link to Programming languages popular OO language like Java/C++ Better than PL/SQL integration Much better than PL-JDBC integration! Highly suitable for multimedia data Undesirable features Object Ids Artificial Real-Mini, double edged sword Exposes inner workings (suspended abstraction) Lack of integrity constraints No concept of normalisation/forms Extreme encapsulation e.g. creation of many accessor/mutator methods Lack of (better) standardisation More undesirables Originally no mechanism for specifying relationships between objects In RDBMS relationships are tuples In OODBMS relationships should be properties of objects ObjectStore Packages supporting Java or C++ C++ package uses: C++ class definition for DDL insert(e), remove(e) and create collections, for DML Bidirectional relationship facility Persistency transparency Identical pointers to persistent and transient objects CORBA Common Object Request Broker Architecture Object communication (unifying paradigm) Distributed Heterogeneous Network, OS and language transparency Java implementation org.omg.corba
11 1 of 18 05/03/ :37 Also C, C++, ADA, SMALLTALK 3.4. Type Inheritance and EER diagrams In this lecture we look at... [Section notes PDF 117Kb] Introduction Design/schema side (Entity types) Object-orientated concepts Java, C++ or UML Sub/superclasses and inheritance EER diagrams EER to Relational mapping OO Inheritance concept Attributes (and methods) Subtypes and supertypes Specialisation and Generalisation ER diagrams show entities/entity sets EER diagrams show type inheritance additional 8 th step to ERRelational mapping Objects Basic guide to Java Object, classes as blueprints Object, collection of methods and attributes Miniworld model of real world things Object, entity in database terms Abstract Similar objects Car Park example Student example Shared properties/attributes Generalisation
12 2 of 18 05/03/ :37 Reverse, specialisation Relationships Using English as model Is a (inheritance) Has a (containment) Nouns as objects Verbs as methods Adjectives as variables (sort of) Classes Superclasses (Student) Subclasses (Engineer, Geographer, Medic) Inheritance Subclass inherits superclass attributes Union of specific/local and general attributes Inheritance chains Person Student Engineer Computer Scientist EER Fruit example Partial participation Disjoint subclasses A fruit may be either a pear or an apple or a banana, or none of them. A fruit may not be a pear and a banana, an apple and a banana, an apple and a pear EER Wine example Total, disjoint Equivalent to Java Abstract classes A Wine has to be either Red, White or Rosé cannot be both more
13 3 of 18 05/03/ : More extended (EER) Specialisation lattices and Hierarchies Multiple inheritance Union of two superclasses (u in circle) In addition to basic ER notation EER diagramatic notation Subset symbol to illustrate sub/superclass relationship direction of relationship Circle to link super to subclasses Disjoint Overlapping Union Disjointness constraint Disjointness (d in circle) single honours Overlapping (o in circle) joint honours/sports Membership condition on same attribute attribute-defined specialisation defining attribute implies disjointness versus user-defined each entity type specifically defined by user Completeness constraint Total specialisation Every entity in the superclass must be a member of atleast 1 subclass Double line (as ER)
14 4 of 18 05/03/ :37 Partial specialisation Some entites may belong to atleast 1 subclass, or none at all Single line Yields 4 possibilities (Total-Dis, Total-Over, Partial-Dis, Partial-Over) EER Chip example Total, overlapping A Chip may has to be at least one of FPA Unit, Reg Block, L1 Cache, and may be more than one type EER Multiple inheritance Type hierarchies Specialisation lattices Well, sir, the Supreme Court of the United States has determined that the tomato is for legal and commercial purposes both a fruit and a vegetable. So we can legally refer to tomato juice as 'vegetable' juice. Candice, General Foods
15 5 of 18 05/03/ : EER to Relational Mapping Initially following 7 ER stages Stage 8 4 different options Optimal solution based on problem Let C be superclass, S 1..m subclasses Stage 8 Create relation for C, and relations for S 1..m each with a foreign key to C (primary key) Create relations for S 1..m each including all attributes of C and its primary key Stage 8 Create a single relation including all attributes of C S 1..m and a type/discriminating attribute only for disjoint subclasses Create a single relation as above, but include a boolean type flag for each subclass works for overlapping, and also disjoint 3.5. System Design In this lecture we look at... [Section notes PDF 64Kb] Databases in Application Where s the data? Programmer driven future
16 6 of 18 05/03/ :37 OODBMS limitations RDBMS longevity System design by Data store, delivery, interface Case study Where s the data? Previously covered distance from User to Data (and reason for it) Client-Server data model creates DBMS P2P alternative Accountability Distribution (BitTorrent, edonkey) Caching Where s the data? Answer: everywhere But where is it meaningful? Answer: for whom? Quality paradigm Large projects require large teams Team overhead (ref 2nd year) Code responsibilities Data/data model resp. Object responsibilities
17 7 of 18 05/03/ : Web application data support Web application programming Goal, dynamically produced XHTML Client side designer-programmer split CSS, XHTML Server side programmer-programmer split Old school: query design, integrator New school: MVC (Model-View-Controller) Controller user input Model modelling of external world View visual feedback CMS Content Management System part of other courses CMS is a DBMS Zope/Plone and ZODB e107, Drupal and Seagull Zend MVC Framework (pre-beta) OODBMS limitations
18 8 of 18 05/03/ :37 Future unknown RDBMS supports Application data sharing Physical/logical data independence/views Concurrency control Constraints at inception these requirements not known RDBMS mathematical basis extensible Crude Type Inheritance (see EER mapping) OODBMS as construction kit Weaknesses in RDBMS Data type support Unwieldy, created 3VL (nulls) Type Inheritance and Relationships Tuple:Entity fragmentation not to be confused with fragmentation Entity approximation requires joins System design Client specifications Variance amongst Mobile devices Rich-media Content delivery Where s the data? (M media database) Where s it going? (C mobile browser) How s it going to get there? (query design) What s it going to look like? (V XHTML) Muddy boots The real world of databases Massive Excel spreadsheets Access Migration Normalisation Update implications Visual language of the Internet limitations Future of browser components
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
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
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
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
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
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 -
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
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
Functional Dependencies and Normalization
Functional Dependencies and Normalization 5DV119 Introduction to Database Management Umeå University Department of Computing Science Stephen J. Hegner [email protected] http://www.cs.umu.se/~hegner Functional
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
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
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
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
CSC 742 Database Management Systems
CSC 742 Database Management Systems Topic #4: Data Modeling Spring 2002 CSC 742: DBMS by Dr. Peng Ning 1 Phases of Database Design Requirement Collection/Analysis Functional Requirements Functional Analysis
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
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
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,
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
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
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
Overview RDBMS-ORDBMS- OODBMS
Overview RDBMS-ORDBMS- OODBMS 1 Database Models Transition Hierarchical Data Model Network Data Model Relational Data Model ER Data Model Semantic Data Model Object-Relational DM Object-Oriented DM 2 Main
Normalization in Database Design
in Database Design Marek Rychly [email protected] Strathmore University, @ilabafrica & Brno University of Technology, Faculty of Information Technology Advanced Databases and Enterprise Systems 14
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
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
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
Object-Oriented Databases
Object-Oriented Databases based on Fundamentals of Database Systems Elmasri and Navathe Acknowledgement: Fariborz Farahmand Minor corrections/modifications made by H. Hakimzadeh, 2005 1 Outline Overview
Chapter 8 The Enhanced Entity- Relationship (EER) Model
Chapter 8 The Enhanced Entity- Relationship (EER) Model Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 8 Outline Subclasses, Superclasses, and Inheritance Specialization
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
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
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
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
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
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
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
Object Oriented Databases (OODBs) Relational and OO data models. Advantages and Disadvantages of OO as compared with relational
Object Oriented Databases (OODBs) Relational and OO data models. Advantages and Disadvantages of OO as compared with relational databases. 1 A Database of Students and Modules Student Student Number {PK}
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,
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
2. Conceptual Modeling using the Entity-Relationship Model
ECS-165A WQ 11 15 Contents 2. Conceptual Modeling using the Entity-Relationship Model Basic concepts: entities and entity types, attributes and keys, relationships and relationship types Entity-Relationship
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
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
DATABASE MANAGEMENT SYSTEMS. Question Bank:
DATABASE MANAGEMENT SYSTEMS Question Bank: UNIT 1 1. Define Database? 2. What is a DBMS? 3. What is the need for database systems? 4. Define tupule? 5. What are the responsibilities of DBA? 6. Define schema?
Jordan University of Science & Technology Computer Science Department CS 728: Advanced Database Systems Midterm Exam First 2009/2010
Jordan University of Science & Technology Computer Science Department CS 728: Advanced Database Systems Midterm Exam First 2009/2010 Student Name: ID: Part 1: Multiple-Choice Questions (17 questions, 1
Normalization in OODB Design
Normalization in OODB Design Byung S. Lee Graduate Programs in Software University of St. Thomas St. Paul, Minnesota [email protected] Abstract When we design an object-oriented database schema, we need
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
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
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
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
Introduction to Databases, Fall 2005 IT University of Copenhagen. Lecture 5: Normalization II; Database design case studies. September 26, 2005
Introduction to Databases, Fall 2005 IT University of Copenhagen Lecture 5: Normalization II; Database design case studies September 26, 2005 Lecturer: Rasmus Pagh Today s lecture Normalization II: 3rd
1. INTRODUCTION TO RDBMS
Oracle For Beginners Page: 1 1. INTRODUCTION TO RDBMS What is DBMS? Data Models Relational database management system (RDBMS) Relational Algebra Structured query language (SQL) What Is DBMS? Data is one
U III 5. networks & operating system o Several competing DOC standards OMG s CORBA, OpenDoc & Microsoft s ActiveX / DCOM. Object request broker (ORB)
U III 1 Design Processes Design Axioms Class Design Object Storage Object Interoperability Design Processes: - o During the design phase the classes identified in OOA must be revisited with a shift in
Part 7: Object Oriented Databases
Part 7: Object Oriented Databases Junping Sun Database Systems 7-1 Database Model: Object Oriented Database Systems Data Model = Schema + Constraints + Relationships (Operations) A logical organization
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
CSCI-GA.2433-001 Database Systems Lecture 7: Schema Refinement and Normalization
CSCI-GA.2433-001 Database Systems Lecture 7: Schema Refinement and Normalization Mohamed Zahran (aka Z) [email protected] http://www.mzahran.com View 1 View 2 View 3 Conceptual Schema At that point we
SQL DDL. DBS Database Systems Designing Relational Databases. Inclusion Constraints. Key Constraints
DBS Database Systems Designing Relational Databases Peter Buneman 12 October 2010 SQL DDL In its simplest use, SQL s Data Definition Language (DDL) provides a name and a type for each column of a table.
Data Analysis 1. SET08104 Database Systems. Copyright @ Napier University
Data Analysis 1 SET08104 Database Systems Copyright @ Napier University Entity Relationship Modelling Overview Database Analysis Life Cycle Components of an Entity Relationship Diagram What is a relationship?
LOGICAL DATABASE DESIGN
MODULE 8 LOGICAL DATABASE DESIGN OBJECTIVE QUESTIONS There are 4 alternative answers to each question. One of them is correct. Pick the correct answer. Do not guess. A key is given at the end of the module
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
Introduction to Object-Oriented and Object-Relational Database Systems
, Professor Uppsala DataBase Laboratory Dept. of Information Technology http://www.csd.uu.se/~udbl Extended ER schema Introduction to Object-Oriented and Object-Relational Database Systems 1 Database Design
How To Manage Data In A Database System
Database Systems Session 2 Main Theme Relational Data Model & Relational Database Constraints Dr. Jean-Claude Franchitti New York University Computer Science Department Courant Institute of Mathematical
Concepts of Database Management Seventh Edition. Chapter 9 Database Management Approaches
Concepts of Database Management Seventh Edition Chapter 9 Database Management Approaches Objectives Describe distributed database management systems (DDBMSs) Discuss client/server systems Examine the ways
CS352 Lecture - Object-Based Databases
CS352 Lecture - Object-Based Databases Objectives: Last revised 10/7/08 1. To elucidate fundamental differences between OO and the relational model 2. To introduce the idea of adding persistence to an
Bridge from Entity Relationship modeling to creating SQL databases, tables, & relations
1 Topics for this week: 1. Good Design 2. Functional Dependencies 3. Normalization Readings for this week: 1. E&N, Ch. 10.1-10.6; 12.2 2. Quickstart, Ch. 3 3. Complete the tutorial at http://sqlcourse2.com/
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
Introduction to normalization. Introduction to normalization
Introduction to normalization Lecture 4 Instructor Anna Sidorova Agenda Presentation Review of relational models, in class exersise Introduction to normalization In-class exercises Discussion of HW2 1
Conceptual Design Using the Entity-Relationship (ER) Model
Conceptual Design Using the Entity-Relationship (ER) Model Module 5, Lectures 1 and 2 Database Management Systems, R. Ramakrishnan 1 Overview of Database Design Conceptual design: (ER Model is used at
Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model
Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Outline Using High-Level Conceptual Data Models for
Java (12 Weeks) Introduction to Java Programming Language
Java (12 Weeks) Topic Lecture No. Introduction to Java Programming Language 1 An Introduction to Java o Java as a Programming Platform, The Java "White Paper" Buzzwords, Java and the Internet, A Short
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
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
Complex Data and Object-Oriented. Databases
Complex Data and Object-Oriented Topics Databases The object-oriented database model (JDO) The object-relational model Implementation challenges Learning objectives Explain what an object-oriented data
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
Database Design. Marta Jakubowska-Sobczak IT/ADC based on slides prepared by Paula Figueiredo, IT/DB
Marta Jakubowska-Sobczak IT/ADC based on slides prepared by Paula Figueiredo, IT/DB Outline Database concepts Conceptual Design Logical Design Communicating with the RDBMS 2 Some concepts Database: an
Unit 2.1. Data Analysis 1 - V2.0 1. Data Analysis 1. Dr Gordon Russell, Copyright @ Napier University
Data Analysis 1 Unit 2.1 Data Analysis 1 - V2.0 1 Entity Relationship Modelling Overview Database Analysis Life Cycle Components of an Entity Relationship Diagram What is a relationship? Entities, attributes,
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
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
Modern Databases. Database Systems Lecture 18 Natasha Alechina
Modern Databases Database Systems Lecture 18 Natasha Alechina In This Lecture Distributed DBs Web-based DBs Object Oriented DBs Semistructured Data and XML Multimedia DBs For more information Connolly
Databases and BigData
Eduardo Cunha de Almeida [email protected] Outline of the course Introduction Database Systems (E. Almeida) Distributed Hash Tables and P2P (C. Cassagnes) NewSQL (D. Kim and J. Meira) NoSQL (D. Kim)
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
Unique column combinations
Unique column combinations Arvid Heise Guest lecture in Data Profiling and Data Cleansing Prof. Dr. Felix Naumann Agenda 2 Introduction and problem statement Unique column combinations Exponential search
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
Normalization for Relational DBs
Chapter 7 Functional Dependencies & Normalization for Relational DBs Truong Quynh Chi [email protected] Spring- 2013 Top-Down Database Design Mini-world Requirements E1 R Relation schemas Conceptual
The ObjectStore Database System. Charles Lamb Gordon Landis Jack Orenstein Dan Weinreb Slides based on those by Clint Morgan
The ObjectStore Database System Charles Lamb Gordon Landis Jack Orenstein Dan Weinreb Slides based on those by Clint Morgan Overall Problem Impedance mismatch between application code and database code
About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer
About the Tutorial Database Management System or DBMS in short refers to the technology of storing and retrieving users data with utmost efficiency along with appropriate security measures. DBMS allows
DATABASE SYSTEMS. Chapter 7 Normalisation
DATABASE SYSTEMS DESIGN IMPLEMENTATION AND MANAGEMENT INTERNATIONAL EDITION ROB CORONEL CROCKETT Chapter 7 Normalisation 1 (Rob, Coronel & Crockett 978184480731) In this chapter, you will learn: What normalization
Chapter 9: Normalization
Chapter 9: Normalization Part 1: A Simple Example Part 2: Another Example & The Formal Stuff A Problem: Keeping Track of Invoices (cont d) Suppose we have some invoices that we may or may not want to refer
The Relational Model. Ramakrishnan&Gehrke, Chapter 3 CS4320 1
The Relational Model Ramakrishnan&Gehrke, Chapter 3 CS4320 1 Why Study the Relational Model? Most widely used model. Vendors: IBM, Informix, Microsoft, Oracle, Sybase, etc. Legacy systems in older models
MODULE 8 LOGICAL DATABASE DESIGN. Contents. 2. LEARNING UNIT 1 Entity-relationship(E-R) modelling of data elements of an application.
MODULE 8 LOGICAL DATABASE DESIGN Contents 1. MOTIVATION AND LEARNING GOALS 2. LEARNING UNIT 1 Entity-relationship(E-R) modelling of data elements of an application. 3. LEARNING UNIT 2 Organization of data
Unit 3.1. Normalisation 1 - V2.0 1. Normalisation 1. Dr Gordon Russell, Copyright @ Napier University
Normalisation 1 Unit 3.1 Normalisation 1 - V2.0 1 Normalisation Overview discuss entity integrity and referential integrity describe functional dependency normalise a relation to first formal form (1NF)
SQL Server. 1. What is RDBMS?
SQL Server 1. What is RDBMS? Relational Data Base Management Systems (RDBMS) are database management systems that maintain data records and indices in tables. Relationships may be created and maintained
THE BCS PROFESSIONAL EXAMINATION Diploma. October 2004 EXAMINERS REPORT. Database Systems
THE BCS PROFESSIONAL EXAMINATION Diploma October 2004 EXAMINERS REPORT Database Systems Question 1 1. a) In your own words, briefly describe why a relational database design must be normalised prior to
TYPICAL QUESTIONS & ANSWERS
TYPICAL QUESTIONS & ANSWERS PART -I OBJECTIVE TYPE QUESTIONS Each Question carries 2 marks. Choosethe correct or the best alternative in the following: Q.1 Which of the following relational algebra operations
OBJECTS AND DATABASES. CS121: Introduction to Relational Database Systems Fall 2015 Lecture 21
OBJECTS AND DATABASES CS121: Introduction to Relational Database Systems Fall 2015 Lecture 21 Relational Model and 1NF 2 Relational model specifies that all attribute domains must be atomic A database
Relational Normalization: Contents. Relational Database Design: Rationale. Relational Database Design. Motivation
Relational Normalization: Contents Motivation Functional Dependencies First Normal Form Second Normal Form Third Normal Form Boyce-Codd Normal Form Decomposition Algorithms Multivalued Dependencies and
Part VI. Object-relational Data Models
Part VI Overview Object-relational Database Models Concepts of Object-relational Database Models Object-relational Features in Oracle10g Object-relational Database Models Object-relational Database Models
Lecture 6. SQL, Logical DB Design
Lecture 6 SQL, Logical DB Design Relational Query Languages A major strength of the relational model: supports simple, powerful querying of data. Queries can be written intuitively, and the DBMS is responsible
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
Boyce-Codd Normal Form
4NF Boyce-Codd Normal Form A relation schema R is in BCNF if for all functional dependencies in F + of the form α β at least one of the following holds α β is trivial (i.e., β α) α is a superkey for R
