Object-persistence formats. Files. Object-oriented databases. Data management layer design. Relational databases. Relational Database Example.



Similar documents
Overview RDBMS-ORDBMS- OODBMS

Object Oriented Databases. OOAD Fall 2012 Arjun Gopalakrishna Bhavya Udayashankar

Object Oriented Databases (OODBs) Relational and OO data models. Advantages and Disadvantages of OO as compared with relational

Complex Data and Object-Oriented. Databases


OBJECTS AND DATABASES. CS121: Introduction to Relational Database Systems Fall 2015 Lecture 21

XXI. Object-Oriented Database Design

TIM 50 - Business Information Systems

Physical Database Design and Tuning

1. Physical Database Design in Relational Databases (1)

Databases and BigData

CS352 Lecture - Object-Based Databases

Practical Database Design and Tuning

Demystified CONTENTS Acknowledgments xvii Introduction xix CHAPTER 1 Database Fundamentals CHAPTER 2 Exploring Relational Database Components

MCQs~Databases~Relational Model and Normalization

There are four technologies or components in the database system that affect database performance:

DATABASE MANAGEMENT SYSTEMS. Question Bank:

Fundamentals of Database Design

Chapter 9: Object-Based Databases

Database Design Process. Databases - Entity-Relationship Modelling. Requirements Analysis. Database Design

Physical Database Design Process. Physical Database Design Process. Major Inputs to Physical Database. Components of Physical Database Design

Introduction This document s purpose is to define Microsoft SQL server database design standards.

Data warehousing with PostgreSQL

Database Design Overview. Conceptual Design ER Model. Entities and Entity Sets. Entity Set Representation. Keys

The Entity-Relationship Model

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

SQL Server. 1. What is RDBMS?


Optimum Database Design: Using Normal Forms and Ensuring Data Integrity. by Patrick Crever, Relational Database Programmer, Synergex

NoSQL systems: introduction and data models. Riccardo Torlone Università Roma Tre

1 File Processing Systems

CS2Bh: Current Technologies. Introduction to XML and Relational Databases. The Relational Model. The relational model

Files. Files. Files. Files. Files. File Organisation. What s it all about? What s in a file?

5.5 Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall. Figure 5-2

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

Physical Design. Meeting the needs of the users is the gold standard against which we measure our success in creating a database.

Chapter 1: Introduction. Database Management System (DBMS) University Database Example

not necessarily strictly sequential feedback loops exist, i.e. may need to revisit earlier stages during a later stage

Benchmarking Cassandra on Violin

Topics. Database Essential Concepts. What s s a Good Database System? Using Database Software. Using Database Software. Types of Database Programs

Object Relational Database Mapping. Alex Boughton Spring 2011

Normalization. Functional Dependence. Normalization. Normalization. GIS Applications. Spring 2011

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

CIS 631 Database Management Systems Sample Final Exam

Unit Storage Structures 1. Storage Structures. Unit 4.3

Modern Databases. Database Systems Lecture 18 Natasha Alechina

Re-Design an Operational Database Author: Sovan Sinha (Business Intelligence Architect) May 4 th, 2009

12 File and Database Concepts 13 File and Database Concepts A many-to-many relationship means that one record in a particular record type can be relat

The Relational Model. Why Study the Relational Model? Relational Database: Definitions

Using Multiple Operations. Implementing Table Operations Using Structured Query Language (SQL)

Object-Oriented Databases Course Review

Normalization. Reduces the liklihood of anomolies

Foundations of Business Intelligence: Databases and Information Management

ETL Process in Data Warehouse. G.Lakshmi Priya & Razia Sultana.A Assistant Professor/IT

The Relational Model. Why Study the Relational Model? Relational Database: Definitions. Chapter 3

SQL Simple Queries. Chapter 3.1 V3.0. Napier University Dr Gordon Russell

Microsoft Access Basics

Performance rule violations usually result in increased CPU or I/O, time to fix the mistake, and ultimately, a cost to the business unit.

ICAB4136B Use structured query language to create database structures and manipulate data

ICOM 6005 Database Management Systems Design. Dr. Manuel Rodríguez Martínez Electrical and Computer Engineering Department Lecture 2 August 23, 2001

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

AllegroGraph. a graph database. Gary King gwking@franz.com

Database Systems. Lecture 1: Introduction

Fundamentals of Database System

Relational Databases and SQLite

Course MIS. Foundations of Business Intelligence

CHAPTER SIX DATA. Business Intelligence The McGraw-Hill Companies, All Rights Reserved

Introduction to Computing. Lectured by: Dr. Pham Tran Vu

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

CSC 443 Data Base Management Systems. Basic SQL

Database Design Methodology

Introduction to Object-Oriented and Object-Relational Database Systems

Database Design Standards. U.S. Small Business Administration Office of the Chief Information Officer Office of Information Systems Support

ETL Overview. Extract, Transform, Load (ETL) Refreshment Workflow. The ETL Process. General ETL issues. MS Integration Services

Patterns of Enterprise Application Architecture

1. INTRODUCTION TO RDBMS

How To Improve Performance In A Database

HP Quality Center. Upgrade Preparation Guide

Object Oriented Database Management System for Decision Support System.

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

Table and field properties Tables and fields also have properties that you can set to control their characteristics or behavior.

Chapter 6: Physical Database Design and Performance. Database Development Process. Physical Design Process. Physical Database Design

IT2305 Database Systems I (Compulsory)

Introduction to Databases

Database System Architecture & System Catalog Instructor: Mourad Benchikh Text Books: Elmasri & Navathe Chap. 17 Silberschatz & Korth Chap.

Database Design Patterns. Winter Lecture 24

Cluster Computing. ! Fault tolerance. ! Stateless. ! Throughput. ! Stateful. ! Response time. Architectures. Stateless vs. Stateful.

Creating and Using Databases with Microsoft Access

BCA. Database Management System

Transcription:

Modelling and Systems Development Lecture 2 Data management layer design Mapping problem-domain objects to object-persistence formats Object-persistence formats Files Sequential and random-access Relational databases Object-oriented databases Object-relational databases Files Directly supported by programming language Example: java.io package Sequential access Optimized for operations on entire file Access to specific objects not efficient Example: java.io.inputstream class Random access Optimized for finding specific objects Entire-file operations not efficient Example: java.io.randomaccessfile Relational databases Primary key an attribute that uniquely identifies a row Foreign key an attribute that is a primary key from a different table in order to simulate associations between objects Referential integrity guarantees that the foreign-key links are valid Structured Query Language (SQL) the standard language for accessing relational database tables Relational Database Example Object-oriented databases Figure 3-3 Goes Here Primary keys are underlined. Foreign keys in are double underlined. Referential integrity is suggested through the red ovals. Two approaches Adding persistence extensions to OO languages Separate DBMS Standards from ODMG (Object Data Management Group): ODL, OML, OQL ODMG finished work in 200

Object-oriented databases Support complex data: MM CAD/CAM, GIS Finance, Healthcare, Telecom Object ID assigned Some support for inheritance Sharp learning curve Object-relational databases Relational databases extended to handle the storage of objects Use of user-defined data types Extended SQL to handle complex object data Inheritance tends to be language dependent Comparing object storage formats Mapping to object-persistence formats Storing the problem domain (PD) objects introduces conversion requirements Put functionality for storing and retrieving in data management (DM) layer DM classes dependent on PD classes, not vice versa Add primary and foreign keys Unless they add too much overhead Appointment System: PD and DM Layers PD Layer Superclass -attribute Mapping to an OODB Superclass2 Superclass -attribute DM Layer DM- DM- contains methods for storing and retrieving objects Class factoring out MI in 2 different ways Class Class Superclass2 Superclass -attribute 2

Mapping PD objects to ORDBMS. Map PD classes to DM classes and tables 2. Map attributes to columns; distinguish. elementary types 2. set types 3. class types (object ID s) 4. derived attributes DM- Class -attr: elem_type -attr2: set_type -attr3: class_type _Table these types of attributes are supported by the ORDBMS tables Mapping PD objects to ORDBMS 3. Map inheritance to associations 4. Map associations to columns (object ID s) Class_Table -Superclass_table[..] -Class2_table[..*] Superclass Class Class_Table..* Class2 Superclass_tbl Class2_Table Mapping PD objects to ORDBMS Person..* Symptom -name: String _Table -Person_Table[..] -s[] -Symptoms[..*] Symptom_Table -name[..] -s[] Also add read/write methods in DM_ and other DM classes Person_Table -name[..] _Table -date[..] Mapping PD objects to RDBMS Get rid of multivalued attributes Replace object ID s by foreign keys Person..* Symptom -name: String _Table Symp_Table -name -Symp_ID Person_Table -name _Table -date Pat_Symp_Table -Symp_ID Navigation is not preserved Building a DM layer Album * Track Very complicated to map to an RDBMS Several design patterns can be used (see link on MSO website) Many tools are now available key «table» Albums «table» Tracks key albumkey 3

Optimizing RDBMS-based object storage Two dimensions for optimization: Storage efficiency (minimizing storage space) Speed of access (minimizing time to retrieve desired information) Optimizing storage efficiency Reduce redundant data Limit null values Multiple possible interpretations can lead to mistakes A well-formed logical data model does not contain redundancy or many null values A model is in first normal form (NF) if it does not lead to multi-valued fields or repeating fields Every row has the same number of columns All fields contain precisely one value Prod_..* NF: repeating product fields in original table are now in a separate table. However, there are still partial dependencies. Customer.. Prod_ 2NF: With partial dependencies removed there only remains a transitive dependency: the Tax rate depends only on the State...* Product Customer.... State Prod_..* Product 3NF: With OO-modelling you would obtain a similar model right away! 4

Optimizing data access speed Optimizing data access speed Denormalize by adding fields: of look-up tables of tables in - relationship -Payment_type -Payment_desc Payment_type -Payment_type.. -Payment_desc Clustering put similar records close together on the hard disk Indexing more space (additional tables) more speed (especially when index is put in memory) when retrieving data less speed when updating data Payment Type Index Guidelines for creating indexes Use indexes sparingly for transaction systems Use many indexes to increase response times in decision support systems For each table Create a unique index based on the primary key Create an index based on the foreign key Create an index for fields used frequently for grouping or sorting 5