My Research: Adding More Support for Relationships to DBMSs by Dr. Bryon K. Ehlmann Computer Science Department Southern Illinois University Edwardsville.

Slides:



Advertisements
Similar presentations
Data Definition and Integrity Constraints
Advertisements

Chapter 10: Designing Databases
Relational Database. Relational database: a set of relations Relation: made up of 2 parts: − Schema : specifies the name of relations, plus name and type.
SQL Lecture 10 Inst: Haya Sammaneh. Example Instance of Students Relation  Cardinality = 3, degree = 5, all rows distinct.
Overview Begin 6:00 Quiz15 mins6:15 Review Table Terms25 mins6:40 Short Break10 mins6:50 SQL: Creating Tables60 mins7:50 Break10 mins8:00 Lab – Creating.
Management Information Systems, Sixth Edition
Advantage Data Dictionary. agenda Creating and Managing Data Dictionaries –Tables, Indexes, Fields, and Triggers –Defining Referential Integrity –Defining.
SPRING 2004CENG 3521 The Relational Model Chapter 3.
Fundamentals, Design, and Implementation, 9/e Chapter 11 Managing Databases with SQL Server 2000.
RELATIONSHIP  THE WAY TABLES ARE RELATED  A TABLE MUST PARTICIPATE IN AT LEAST ONE RELATIONSHIP  IN A BINARY RELATIONSHIP TWO ENTITIES PARTICIPATE 
Mgt 20600: IT Management & Applications Databases Tuesday April 4, 2006.
Lecture Two Database Environment Based on Chapter Two of this book:
Working with SQL and PL/SQL/ Session 1 / 1 of 27 SQL Server Architecture.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Transforming Data Models into Database Designs
Chapter 14 & 15 Conceptual & Logical Database Design Methodology
Database Environment 1.  Purpose of three-level database architecture.  Contents of external, conceptual, and internal levels.  Purpose of external/conceptual.
Chapter 4: Organizing and Manipulating the Data in Databases
Database System Concepts and Architecture Lecture # 3 22 June 2012 National University of Computer and Emerging Sciences.
Information storage: Introduction of database 10/7/2004 Xiangming Mu.
Project Implementation for COSC 5050 Distributed Database Applications Lab2.
6-1 DATABASE FUNDAMENTALS Information is everywhere in an organization Information is stored in databases –Database – maintains information about various.
Chapters 17 & 18 Physical Database Design Methodology.
Web Application Development. Define ER model in QSEE Generate SQL Create Database mySQL Write Script to use TableEditor class Process to create A simple.
Web Application Development. Tools to create a simple web- editable database QSEE MySQL (or PHPMyAdmin) PHP TableEditor.
I Copyright © 2004, Oracle. All rights reserved. Introduction.
Chapter 2 CIS Sungchul Hong
CSC271 Database Systems Lecture # 4.
An Investigation of Oracle and SQL Server with respect to Integrity, and SQL Language standards Presented by: Paul Tarwireyi Supervisor: John Ebden Date:
Introduction to Accounting Information Systems
Learningcomputer.com SQL Server 2008 – Entity Relationships in a Database.
RDB/1 An introduction to RDBMS Objectives –To learn about the history and future direction of the SQL standard –To get an overall appreciation of a modern.
Database Technical Session By: Prof. Adarsh Patel.
STORING ORGANIZATIONAL INFORMATION— DATABASES CIS 429—Chapter 7.
I Copyright © Oracle Corporation, All rights reserved. Introduction.
1 Chapter 2 Database Environment Transparencies © Pearson Education Limited 1995, 2005.
Chapter 10 – Database Creation1 IT238: Data Modeling and Database Design Unit 6: Database Creation Instructor: Qing Yan, M.D., Ph.D.
Lecture 7 Integrity & Veracity UFCE8K-15-M: Data Management.
SQL Server 7.0 Maintaining Referential Integrity.
1 CS 430 Database Theory Winter 2005 Lecture 17: Objects, XML, and DBMSs.
SQL Structured Query Language Programming Course.
10/17/2012ISC471/HCI571 Isabelle Bichindaritz 1 Technologies Databases.
1.1 CAS CS 460/660 Relational Model. 1.2 Review E/R Model: Entities, relationships, attributes Cardinalities: 1:1, 1:n, m:1, m:n Keys: superkeys, candidate.
Lecture2: Database Environment Prepared by L. Nouf Almujally 1 Ref. Chapter2 Lecture2.
Relational Database. Database Management System (DBMS)
Lecture # 3 & 4 Chapter # 2 Database System Concepts and Architecture Muhammad Emran Database Systems 1.
FEN Introduction to the database field:  The Relational Model Seminar: Introduction to relational databases.
SQL: DDL. SQL Statements DDL - data definition language –Defining and modifying data structures (metadata): database, tables, views, etc. DML - data manipulation.
DataBase Management System What is DBMS Purpose of DBMS Data Abstraction Data Definition Language Data Manipulation Language Data Models Data Keys Relationships.
Data Driven Designs 99% of enterprise applications operate on database data or at least interface databases. Most common DBMS are Microsoft SQL Server,
Chapter 4 Constraints Oracle 10g: SQL. Oracle 10g: SQL 2 Objectives Explain the purpose of constraints in a table Distinguish among PRIMARY KEY, FOREIGN.
CMPT 258 Database Systems The Relationship Model PartII (Chapter 3)
Chapter 5 : Integrity And Security  Domain Constraints  Referential Integrity  Security  Triggers  Authorization  Authorization in SQL  Views 
CS34311 The Relational Model. cs34312 Why Relational Model? Currently the most widely used Vendors: Oracle, Microsoft, IBM Older models still used IBM’s.
1 Database Environment. 2 Objectives of Three-Level Architecture u All users should be able to access same data. u A user’s view is immune to changes.
Chapter 3: Relational Databases
ASET 1 Amity School of Engineering & Technology B. Tech. (CSE/IT), III Semester Database Management Systems Jitendra Rajpurohit.
1 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Chapter 10 Designing Databases.
Chapter 1: Introduction. 1.2 Database Management System (DBMS) DBMS contains information about a particular enterprise Collection of interrelated data.
Database Environment Chapter 2. The Three-Level ANSI-SPARC Architecture External Level Conceptual Level Internal Level Physical Data.
Introduction to Core Database Concepts Getting started with Databases and Structure Query Language (SQL)
LECTURE TWO Introduction to Databases: Data models Relational database concepts Introduction to DDL & DML.
Welcome: To the fifth learning sequence “ Data Models “ Recap : In the previous learning sequence, we discussed The Database concepts. Present learning:
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Relational Model Chapter 3.
1 CS122A: Introduction to Data Management Lecture #4 (E-R  Relational Translation) Instructor: Chen Li.
Fundamentals of DBMS Notes-1.
COP Introduction to Database Structures
The Relational Model Relational Data Model
Data Model.
Chapter 11 Managing Databases with SQL Server 2000
Presentation transcript:

My Research: Adding More Support for Relationships to DBMSs by Dr. Bryon K. Ehlmann Computer Science Department Southern Illinois University Edwardsville Edwardsville, IL USA

Overview The problem of mapping relationships in database models into database definition languages (DDLs) –i.e., the problem in implementing associations (the majority of relationships) in DBMSs The Object Relationship Notation (ORN) Extending Data Models with ORN –ORN-extended UML Class Diagrams Extending Object Databases with ORN –Object Relater Plus and the ORN Simulator Extending Relational Databases with ORN –ORN Additive Conclusion –Questions –A two minute quiz

Problem of Mapping Database Models into DDLs ( 1-to-* Association) → SQL: Where is the “1” ? Where is the many ( “*”)?

Problem of Mapping Database Models into DDLs ( 1-to-1..* Association) → SQL:

Problem of Mapping Database Models into DDLs ( |~ Association) → Continued on Next Page… | ~ SQL:

Problem of Mapping Database Models into DDLs ( |~ Association) … Continued from Previous Page

Problem of Mapping Database Models into DDLs ( |~ Association) → | ~ ODMG ODL: class Department { d_String deptNum; … // other attributes relationship set employees inverse Employee::department; … // methods (must enforce association semantics) }; class Employee { d_String SSN; … // other attributes relationship Department department inverse Department::employees; … // methods (must enforce association semantics) };

Overview of the Object Relationship Notation (ORN) A declarative scheme for defining a variety of binary relationships, i.e. associations, between entities, i.e., classes Can be used during requirements analysis and database definition –Graphical representation integrated into modeling diagrams –Linear representation integrated into data definition languages like SQL Independent of database type, object or relational Extends UML multiplicities with bindings –Indicate what action system should take when update operations cause multiplicities to be violated –More powerful than the referential actions of SQL

Syntax of ORN

Semantics of ORN …

Extending Data Models with ORN Example of an ORN-Extended UML Class Diagram Semantics for |~ binding for “belongs to” association: On delete of an employee object, an employee  carpool link can be destroyed, but if this violates the multiplicity 2..*, the related carpool object must be implicitly deleted

If an employee  carpool link is destroyed, the related carpool object is implicitly deleted if there are just two employees in a carpool ( X~ binding). If an employee is deleted, the link to the employee’s organization is implicitly destroyed (default binding and * multiplicity). If an organization is deleted, all descendant organizations are implicitly deleted. Any descendant organization, however, will not be deleted in this complex operation if it has any employees ( ' binding and default binding with 1 multiplicity for Organization in “works for” association). If a link between organizations is destroyed, the child organization and all its descendant organizations are implicitly deleted; however, again, an organization is not deleted if it has any employees ( ' binding and default binding with 1 multiplicity for Organization in “works for” association). Additional Association Semantics Captured in Previous Model

Extending Object Databases with ORN Example of an ORN-extended ODDL (ODMG 3.0 ODL)

Object Relater Plus (OR+) and the ORN Simulator OR+ is a prototype, object DBMS that implements ORN –Built on top of Object Store, a commercial ODBMS –Implemented on Unix using C++ –Provides an ORN-extended, ODMG 3.0 standard façade to Object Store ORN Simulator is a prototype, Web-accessible database modeling tool built using OR+ –an OR+ application –Server implemented on Unix using C++ –Client implemented as an applet using Java –Accessible at –“Simulates” the modeled database by allowing the user to create and update a prototype database in the context of an ER or UML class diagram – Provides a instructional tool for learning database modeling, ORN, and transaction processing

Extending Relational Databases with ORN Example of an ORN-Extended UML Class Diagram

Extending Relational Databases with ORN Example of an ORN-extended, standard SQL CREATE TYPE ORG_TYPE AS ( IDCHAR(5), PARENTREF(ORG_TYPE), ); CREATE TABLE ORGANIZATION OF ORG_TYPE ( REF IS ORG_REF SYSTEM GENERATED, PARENT WITH OPTIONS SCOPE ORGANIZATION ’... ); CREATE TABLE EMPLOYEE ( SSNCHAR(11) PRIMARY KEY,... CARPOOL_ID CHAR(8) REFERENCES CARPOOL |~X~ ON UPDATE CASCADE, ORGREF(ORG_TYPE) SCOPE(ORGANIZATION) ); CREATE TABLE CARPOOL ( IDCHAR(8) PRIMARY KEY,... );

ORN Additive A (prototype?) tool that essentially adds ORN to Microsoft’s SQL Server –Currently being developed on Windows platform using Visual C++ and Transact SQL –Consists of a DDL Utility postprocessor to allow s to be given for foreign key constraints Generates triggers and stored procedures to enforce ORN –Consists of a DML Utility preprocessor to allow for ORN- required transaction processing (e.g., checks on lowerbound multiplicities at transaction commit)

T-SQL w/ ORN Additive (Database Definition) CREATE TABLE Employee ( ssnCHAR(11) PRIMARY KEY,... carpoolId VARCHAR(8) CONSTRAINT BelongsTo REFERENCES Carpool(id), --+<> BelongsTo |~X~ ; -- Upperbound added orgVARCHAR(15) CONSTRAINT WorksFor REFERENCES Organization(name), --+<> WorksFor ; ); CREATE TABLE Carpool ( idVARCHAR(8) PRIMARY KEY,... ); CREATE TABLE Organization ( nameVARCHAR(15) PRIMARY KEY, parent VARCHAR(15) CONSTRAINT ChildParent REFERENCES Organization(name), --+<> ChildParent ' ON UPDATE CASCADE;... );

T-SQL w/ ORN Additive (Database Manipulation) -- Contents of the ORN header file for the CompanyDB must be included -- here. USE CompanyDB; DELETE Employee WHERE ssn = ' '; -- May result in the deletion of a row in Carpool. UPDATE Employee SET carpoolId = ′West End′ WHERE ssn = ′ ′; -- Will result in an exception if six employees already belong to -- the West End carpool. DELETE Organization WHERE name = ′DP Services′; -- May result in the deletion of a hierarchy of employeeless -- organizations. GO

Questions?

Conclusion: Two Minute Quiz 1. Dr. Ehlmann’s research deals with enhancing DBMSs to better support a) security b) objects c) relationships d) queries e) video and sound 2. The following notation includes multiplicities and bindings that define the semantics of associations. a) OR+ b) ORN c) ORN Additive d) ORN Simulator e) ODDL 3. The following prototype implements an extended object DBMS on Unix and is built on top of Object Store. a) OR+ b) ORN c) ORN Additive d) ORN Simulator e) ODDL 4. The following prototype provides enhanced database modeling and allows a prototype database to be created and updated in the context of the model. a) OR+ b) ORN c) ORN Additive d) ORN Simulator e) ODDL 5.The following tool will enhance Microsoft’s SQL Server and is being developed using Visual C++. a) OR+ b) ORN c) ORN Additive d) ORN Simulator e) ODDL

Conclusion: Answers to Two Minute Quiz 1. Dr. Ehlmann’s research deals with enhancing DBMSs to better support a) security b) objects c) relationships d) queries e) video and sound 2. The following notation includes multiplicities and bindings that define the semantics of associations. a) OR+ b) ORN c) ORN Additive d) ORN Simulator e) ODDL 3. The following prototype implements an extended object DBMS on Unix and is built on top of Object Store. a) OR+ b) ORN c) ORN Additive d) ORN Simulator e) ODDL 4. The following prototype provides enhanced database modeling and allows a prototype database to be created and updated in the context of the model. a) OR+ b) ORN c) ORN Additive d) ORN Simulator e) ODDL 5.The following tool will enhance Microsoft’s SQL Server and is being developed using Visual C++. a) OR+ b) ORN c) ORN Additive d) ORN Simulator e) ODDL