Relational Database Schema Designer: CASE tool

Slides:



Advertisements
Similar presentations
Chapter 9 -- Simplification of Sequential Circuits.
Advertisements

Schema Refinement: Normal Forms
Schema Refinement: Canonical/minimal Covers
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Relational Database Design Algorithms and Further Dependencies.
Logical Database Design (3 of 3) John Ortiz. Lecture 7Logical Database Design (2)2 Normalization  If a relation is not in BCNF or 3NF, we refine it by.
CS 440 Database Management Systems Practice problems for normalization.
Review for Final Exam Lecture Week 14. Problems on Functional Dependencies and Normal Forms.
Normalization theory exercises Dr. Shiyong Lu Department of Computer Science Wayne State University ©copyright 2007, all rights reserved.
1 Design Theory. 2 Minimal Sets of Dependancies A set of dependencies is minimal if: 1.Every right side is a single attribute 2.For no X  A in F and.
Properties of Armstrong’s Axioms Soundness All dependencies generated by the Axioms are correct Completeness Repeatedly applying these rules can generate.
CS Algorithm : Decomposition into 3NF  Obviously, the algorithm for lossless join decomp into BCNF can be used to obtain a lossless join decomp.
Classroom Exercise: Normalization
Normalization DB Tuning CS186 Final Review Session.
Normalization DB Tuning CS186 Final Review Session.
Normal Form Design addendum by C. Zaniolo. ©Silberschatz, Korth and Sudarshan7.2Database System Concepts Normal Form Design Compute the canonical cover.
Design Theory.
Decomposition By Yuhung Chen CS157A Section 2 October
Schema Refinement and Normalization Nobody realizes that some people expend tremendous energy merely to be normal. Albert Camus.
CS 3630 Database Design and Implementation. First Normal Form (1NF) No multi-value attributes Done when mapping E-R model to relational schema DBDL 2.
Cs3431 Normalization Part II. cs3431 Attribute Closure : Example Consider R (A, B, C, D, E) with FDs A  B, B  C, CD  E Does A  E hold ? (Is A  E.
1 Triggers: Correction. 2 Mutating Tables (Explanation) The problems with mutating tables are mainly with FOR EACH ROW triggers STATEMENT triggers can.
CS 405G: Introduction to Database Systems 16. Functional Dependency.
Normal Forms1. 2 The Problems of Redundancy Redundancy is at the root of several problems associated with relational schemas: Wastes storage Causes problems.
Chapter 8: Relational Database Design First Normal Form First Normal Form Functional Dependencies Functional Dependencies Decomposition Decomposition Boyce-Codd.
DAVID DENG CS157B MARCH 23, 2010 Dependency Preserving Decomposition.
CS143 Review: Normalization Theory Q: Is it a good table design? We can start with an ER diagram or with a large relation that contain a sample of the.
SCUJ. Holliday - coen 1784–1 Schedule Today: u Normal Forms. u Section 3.6. Next u Relational Algebra. Read chapter 5 to page 199 After that u SQL Queries.
THIRD NORMAL FORM (3NF) A relation R is in BCNF if whenever a FD XA holds in R, one of the following statements is true: XA is a trivial FD, or X is.
Normal Forms through BCNF CPSC 356 Database Ellen Walker Hiram College (Includes figures from Database Systems by Connolly & Begg, © Addison Wesley 2002)
Rensselaer Polytechnic Institute CSCI-4380 – Database Systems David Goldschmidt, Ph.D.
Chapter 8 Relational Database Design. 2 Relational Database Design: Goals n Reduce data redundancy (undesirable replication of data values) n Minimize.
CSC 411/511: DBMS Design Dr. Nan Wang 1 Schema Refinement and Normal Forms Chapter 19.
Case tool Relational Database Schema Designer Cai Xinlei Tang Ning Xu Chen Zhang Yichuan CS4221 P06.
Relational Database Schema Designer Using Bernstein’s Algorithm
Relational Database Schema Designer using Bernstein’s Algorithm
Relational Normalization CASE tool for Database Design
CS 440 Database Management Systems
Schedule Today: Next After that Normal Forms. Section 3.6.
CS 3630 Database Design and Implementation
Relational Database Design (Discussion Session)
Schema Refinement and Normal Forms
CS4221 Database Design Group P05 Name Matriculation Number
Normalization First Normal Form (1NF) Boyce-Codd Normal Form (BCNF)
Canonical Cover & Normal Forms
Normal Forms.
Relational Database Design
CS 480: Database Systems Lecture 22 March 6, 2013.
3.1 Functional Dependencies
Digital Logic and Design
CS4221 Project Relational Database Schema using Bernstein’s Algorithm
Functional Dependencies and Normalization
Canonical Cover & Normal Forms
Lecture 6: Design Theory
Digital Logic & Design Dr. Waseem Ikram Lecture 12.
CS 3630 Database Design and Implementation
Optimization Algorithm
Lecture 09: Functional Dependencies, Database Design
CSCI 6315 Applied Database Systems – Exercise (4)
Normalization Part II cs3431.
CSCI 4333 Database Design and Implementation – Exercise (4)
Some slides are from Dr. Sara Cohen
3-Variable K-map AB/C AB/C A’B’ A’B AB AB’
CSCI 4333 Database Design and Implementation – Exercise (4)
Instructor: Mohamed Eltabakh
Database.
Chapter 3: Design theory for relational Databases
Functional Dependencies and Normalization
Functional Dependencies and Normalization
CS4222 Principles of Database System
Presentation transcript:

Relational Database Schema Designer: CASE tool Teaching Aid for Bernstein’s Algorithm 02 April 2015 CS4221 project presentation - by Group 03 Liu Wei Ran Lu Nan Wu Long Zhao Yue

Agenda Objective Bernstein’s Algorithm and its shortcomings Implementation New Features Future work Demo

Objective Implementation of enhanced Bernstein’s Algorithm Teaching aid with interactive user interface

Bernstein’s Algorithm Bernstein’s Algorithm was invented by Bernstein Philip in 1976 The algorithm consists of 6 steps Produce 3NF with the fewest number of relations

Bernstein’s Algorithm Given a relational schema R and a set of functional dependencies F Step 1: Eliminate extraneous attributes from the left side of each FD in F to produce G. Step 2: Find a non-redundant covering of G. Step 3: Partition G into groups such that all FDs have identical left side in each group. Step 4: Merge equivalent keys if left sides have the bijection relation to create J. Step 5: Eliminate transitive dependencies. Step 6: Construct relation consisting of all the attributes appearing in each group.

Shortcomings It does not guarantee losslessness. It does not find all the keys. It does not remove all the superfluous attributes. Relations produced depends on the non-redundant covering found. BCNF schema may contain superfluous attributes.

Implementation Step 1 [find_minimal_cover] : Step one and two, eliminate extraneous attributes and find covering. INPUT : <__G>, the set of functional dependencies RETURN : <__H>, the minimum cover of the input functional dependencies

Implementation Step 2 [partition] : Step three, partition the minimum cover <__H> into groups that has identical left sides INPUT : <__H>, the minimum cover RETURN : <__partitioned_fds_list>, all the groups of partitioned functional dependency list

Implementation Step 3 [merge_keys] : Step four, merge equivalent keys. INPUT : <__partitioned_fds_list> and <__H> RETURN : <__merged_fds_list>, all merged groups of functional dependency list

Implementation Step 4 [eliminate_transitive_fds] : Step five, find and remove transitive dependencies for the input. INPUT : <__merged_fds_list> RETURN : <__final_fds_list>, the finalized group of functional dependency list

Implementation Step 5 [contruct_relations] : Step six, construct relational schema for each groups. INPUT : <__final_fds_list> RETURN : <__relations>, all the relational schemas

New Features Losslessness Checker Superfluous Attribute Checker Candidate Key Finder

Losslessness Checker AB -> CD, A -> CD Schema A C B D

Candidate Key Finder AD -> B, B -> C, C -> D, AB -> E, AC -> F Left Middle Right [‘A’] [‘B’, ‘C’, ‘D’] [‘E’, ‘F’] ‘A’, ‘AB’, ‘AC’, ‘AD’, ‘ABC’, ‘ABD’, ‘ACD’

Superfluous Attribute Checker [superfluous_attribute_detection_algorithm] : Check whether a given attribute is a superfluous in a relational schema. INPUT : <relations> : The input relational schemas <G> : The original functional dependency list <test_relation> : A relation that is in the input relational schemas <relations> <test_attribute> : The attribute that need to be tested for <test_relation> RETURN : True if the <test_attribute> is superfluous in <test_relation>, False if it is not

Future work UI improvement Solve shortcoming 4 by using superfluous attribute checker to check every attributes in all possible covers found, to get the best relations results.

Demo

Q&A Presentation by Zhao Yue Wu Long Liu Wei Ran Lu Nan

Thank You! Presentation by Zhao Yue Wu Long Liu Wei Ran Lu Nan