Foundations of Relational Implementation (1) IS 240 – Database Management Lecture #13 – 2004-04-01 Prof. M. E. Kabay, PhD, CISSP Norwich University

Slides:



Advertisements
Similar presentations
1 Senn, Information Technology, 3 rd Edition © 2004 Pearson Prentice Hall James A. Senns Information Technology, 3 rd Edition Chapter 7 Enterprise Databases.
Advertisements

Analysis of Computer Algorithms
The Relational Model and Normalization (3) IS 240 – Database Management Lecture # Prof. M. E. Kabay, PhD, CISSP Norwich University
The Relational Model and Normalization (1)
Foundations of Relational Implementation (2) IS 240 – Database Management Lecture #14 – Prof. M. E. Kabay, PhD, CISSP Norwich University
Introduction to Database Processing IS 240 – Database Management Lecture #1 – Prof. M. E. Kabay, PhD, CISSP Norwich University
Database Design (1) IS 240 – Database Management Lecture #10 – Prof. M. E. Kabay, PhD, CISSP Norwich University
Application Design (2) Database – IS 240 Lecture #23 – M. E. Kabay, PhD, CISSP Dept of Computer Information Systems Norwich University
Database Design (3) IS 240 – Database Management Lecture #12 – Prof. M. E. Kabay, PhD, CISSP Norwich University
The Relational Model and Normalization (2) IS 240 – Database Management Lecture # Prof. M. E. Kabay, PhD, CISSP Norwich University
1 Copyright © 2004 M. E. Kabay. All rights reserved. Database Design (2) IS 240 – Database Management Lecture #11 – Prof. M. E. Kabay, PhD,
Introduction to Database Development (1) IS 240 – Database Management Lecture #3 – Prof. M. E. Kabay, PhD, CISSP Norwich University
Managing Multi-User Databases (2) IS 240 – Database Management Lecture #19 – Prof. M. E. Kabay, PhD, CISSP Norwich University
SQL IS 240 – Database Management Lecture #15 – Prof. M. E. Kabay, PhD, CISSP Norwich University
E-R Model (1) IS 240 – Database Management Lecture #5 – Prof. M. E. Kabay, PhD, CISSP Norwich University
Managing Multi-User Databases (1) IS 240 – Database Management Lecture #18 – Prof. M. E. Kabay, PhD, CISSP Norwich University
Working with MS-ACCESS IS 240 – Database Management Lecture #2 – Assoc. Prof. M. E. Kabay, PhD, CISSP Norwich University
1 Note content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved. Software Testing IS301 – Software.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Copyright © 2006 by The McGraw-Hill Companies,
Relational Database and Data Modeling
Data Definition and Integrity Constraints
1 Lecture 5: SQL Schema & Views. 2 Data Definition in SQL So far we have see the Data Manipulation Language, DML Next: Data Definition Language (DDL)
Information Systems Today: Managing in the Digital World
Database Performance Tuning and Query Optimization
1 Web-Enabled Decision Support Systems Access Introduction: Touring Access Prof. Name Position (123) University Name.
Chapter Information Systems Database Management.
Implementation of the Relational Model
Creating Tables. 2 home back first prev next last What Will I Learn? List and provide an example of each of the number, character, and date data types.
Database System Concepts and Architecture
Introduction to Databases
Stephen C. Hayne 1 Database System Components The Database and the DBMS.
What is a Database By: Cristian Dubon.
Chapter 15 A Table with a View: Database Queries.
Chapter 13 The Data Warehouse
Computer Concepts BASICS 4th Edition
Foundations of Relational Implementation n Defining Relational Data n Relational Data Manipulation n Relational Algebra.
Management Information Systems, Sixth Edition
Midterm Review Lecture 14b. 14 Lectures So Far 1.Introduction 2.The Relational Model 3.Disks and Files 4.Relational Algebra 5.File Org, Indexes 6.Relational.
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 8 Foundations of Relational Implementation.
3-1 Chapter 3 Data and Knowledge Management
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 8 Foundations of Relational Implementation.
Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database Processing.
Introduction to Database Management
The Relational Model Codd (1970): based on set theory Relational model: represents the database as a collection of relations (a table of values --> file)
Database Design Overview. 2 Database DBMS File Record Field Cardinality Keys Index Pointer Referential Integrity Normalization Data Definition Language.
Mgt 20600: IT Management & Applications Databases Tuesday April 4, 2006.
Data at the Core of the Enterprise. Objectives  Define of database systems  Introduce data modeling and SQL  Discuss emerging requirements of database.
IST Databases and DBMSs Todd S. Bacastow January 2005.
Database System Concepts and Architecture Lecture # 3 22 June 2012 National University of Computer and Emerging Sciences.
Data at the Core of the Enterprise. Objectives  Define of database systems.  Introduce data modeling and SQL.  Discuss emerging requirements of database.
CS370 Spring 2007 CS 370 Database Systems Lecture 2 Overview of Database Systems.
Copyright © 2003 by Prentice Hall Module 4 Database Management Systems 1.What is a database? Data hierarchy and data organization Field, record, file,
Chapter 1 Introduction to Databases Pearson Education ©
Chapter 15 Relational Implementation with DB2 David M. Kroenke Database Processing © 2000 Prentice Hall.
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
MIS 327 Database Management system 1 MIS 327: DBMS Dr. Monther Tarawneh Dr. Monther Tarawneh Week 2: Basic Concepts.
1 Database Concepts 2 Definition of a Database An organized Collection Of related records.
Lecture # 3 & 4 Chapter # 2 Database System Concepts and Architecture Muhammad Emran Database Systems 1.
IS 325 Notes for Wednesday August 28, Data is the Core of the Enterprise.
Chapter 8 Foundations of Relational Implementation David M. Kroenke Database Processing © 2000 Prentice Hall.
Data resource management
INTRODUCTION TO DBS Database: a collection of data describing the activities of one or more related organizations DBMS: software designed to assist in.
Implementation of the Relational Model There is no substitute for the comfort supplied by the utterly taken-for-granted relationship. Iris Murdoch.
Database Systems Lecture 1. In this Lecture Course Information Databases and Database Systems Some History The Relational Model.
Chapter 3: Relational Databases
LECTURE TWO Introduction to Databases: Data models Relational database concepts Introduction to DDL & DML.
Understanding Core Database Concepts Lesson 1. Objectives.
Databases and DBMSs Todd S. Bacastow January
Database.
Understanding Core Database Concepts
Presentation transcript:

Foundations of Relational Implementation (1) IS 240 – Database Management Lecture #13 – Prof. M. E. Kabay, PhD, CISSP Norwich University

2 Copyright © 2004 M. E. Kabay. All rights reserved. Topics Review of Relational Terminology Define DB Using DDL Allocate Disk Space Plan for Maintenance Loading the DB DML Interfaces

3 Copyright © 2004 M. E. Kabay. All rights reserved. Review of Relational Terminology Relation / table / file / dataset Tuple / row / record / entry Attribute / column / field Domain Uniqueness

4 Copyright © 2004 M. E. Kabay. All rights reserved. Key – Two Meanings Design: unique identifier(s) of row Implementation: performance tool Logical key: unique identifier Physical key: column with an index for faster performance

5 Copyright © 2004 M. E. Kabay. All rights reserved. Indexes Kroenke reserves word key for logical key Uses word index for physical key Indexes are useful Find rows fast Retrieve rows in a sorted order Enforce uniqueness

6 Copyright © 2004 M. E. Kabay. All rights reserved. Example of Indexes in a Database Compare # I/Os required to read all the order #9890 Without index With index on OrdNo With packing* on index * 1 block

7 Copyright © 2004 M. E. Kabay. All rights reserved. Implementing RDB Having designed a DB using the relational model, theres no problem in defining a DB using todays DBMS products Use the Data Definition Language (DDL) of the DBMS Formalized language for describing what we need Varies a bit from DBMS to DBMS Easy to learn once youre mastered any one of them

8 Copyright © 2004 M. E. Kabay. All rights reserved. Define DB Using DDL Text-file (schema) DDL Specific syntax Name all the elements Name all the tables Name all the indexes and links Graphical systems MS-Access uses tables and also graphics Easy to define details using text Structures can be linked using graphics Menus provide guidance, limits

9 Copyright © 2004 M. E. Kabay. All rights reserved. Allocate Disk Space PC-based products generally allocate space dynamically DB grows as needed Dont have to worry about defining maximum size Mainframe / server DBs generally require size definitions Need to reserve space in advance Performance issues become important Multiple disk drives or controllers Try to avoid thrashing of disk heads

10 Copyright © 2004 M. E. Kabay. All rights reserved. DB Performance Issues Computer system performance always depends on 5 factors Access to & speed of CPU Access to & speed of RAM Amount & speed of disk I/O Communications speed Application design DB performance often affected by Presence / absence of indexes Good / bad packing of records Locking strategies (coming in later lecture)

11 Copyright © 2004 M. E. Kabay. All rights reserved. Plan for Maintenance Databases often central components of production systems Plan for Backups Diagnostics to find corrupted data Child records without parents Record counters that are incorrect Pointers to non-existent records Data that violate business rules Archiving inactive records Compaction of data files

12 Copyright © 2004 M. E. Kabay. All rights reserved. Loading the DB Have to get data somewhere Most DBs get historical data Older DBs Special programs written to read old DB, write into new DB with correct format Often get exceptions – write to exception file May have large-scale data entry from paper records – need careful verification Some critical systems use dual data entry Compare records

13 Copyright © 2004 M. E. Kabay. All rights reserved. Types of Data Manipulation Languages (DMLs) Relational algebra Relational calculus Transform-oriented languages Graphical interfaces

14 Copyright © 2004 M. E. Kabay. All rights reserved. Relational Algebra Operators function on records Union / intersection etc. Much like set theory Procedural language Step-by-step changes in collections of data Not used in commercial DBs Useful to understand as preparation for SQL Will study in next lesson

15 Copyright © 2004 M. E. Kabay. All rights reserved. Relational Calculus Non-procedural theoretical framework for dealing with relations E.g., De Morgan's law, The complement of a union is equal to the union of the complements." Learned in mathematics and advanced theory of programming and data structures Not used in commercial DB processing Not part of this course

16 Copyright © 2004 M. E. Kabay. All rights reserved. Transform-Oriented Languages Non-procedural Change relations into a single relation Thus define conditions for selecting records and end up with a set of records that satisfy the conditions SQL is most important example of this kind of language Will study in detail in this course

17 Copyright © 2004 M. E. Kabay. All rights reserved. Graphical Interfaces (1) Query-by-Example (QBE) User sees place to enter specific values or ranges Generates SQL without bothering user

18 Copyright © 2004 M. E. Kabay. All rights reserved. Graphical Interfaces (2) Query-by-Form (QBF) Allows more complex queries Still generates underlying SQL

19 Copyright © 2004 M. E. Kabay. All rights reserved. DML Interfaces to the DBMS Forms (e.g., in MS-Access) Query languages (e.g., SQL) Stored procedures (incl. triggers) API = application program interface

20 Copyright © 2004 M. E. Kabay. All rights reserved. Homework For Thu 8 April 2004: REQUIRED Reread chapter 8, pp thoroughly using Read-Recite-Review phases of SQ3R Do exercises for 34 points For next Tuesday: Read onwards in chapter 8 from page 221 through 231 Continue working on MS-Access lab work

21 Copyright © 2004 M. E. Kabay. All rights reserved. DISCUSSION