Database Fundamentals Chapter 1

Similar documents
Overview of Data Management

Overview of Data Management

Introduction to Databases CS348

What is Data? ANSI definition: Volatile vs. persistent data. Data. Our concern is primarily with persistent data

What is Data? Volatile vs. persistent data Our concern is primarily with persistent data

Outline. Definitions History Basic concepts of DBMS Data Models Relational database Normalization

Database System Concepts and Architecture

Copyright 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2-1

Database System Concepts and Architecture. Copyright 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Course Introduction & History of Database Systems

The functions performed by a typical DBMS are the following:

Several major software companies including IBM, Informix, Microsoft, Oracle, and Sybase have all released object-relational versions of their

B.H.GARDI COLLEGE OF MASTER OF COMPUTER APPLICATION. Ch. 1 :- Introduction Database Management System - 1

Chapter 11 Database Concepts

DATABASE MANAGEMENT SYSTEMS. UNIT I Introduction to Database Systems

Chapter 1 Introduction

System R and the Relational Model

An Introduction to Databases and Database Management Systems.

Databases and Database Management Systems

CSC 4710 / CSC 6710 Database Systems. Rao Casturi

DATABASE TECHNOLOGY - 1DL124

Advanced Database Applications. Object Oriented Database Management Chapter 13 10/29/2016. Object DBMSs

Chapter 1: Introduction

Introduction To Computers

Introduction Database Concepts

DISCUSSION 5min 2/24/2009. DTD to relational schema. Inlining. Basic inlining

File Processing Approaches

CS425 Fall 2016 Boris Glavic Chapter 1: Introduction

Layers. External Level Conceptual Level Internal Level

Databases 1. Daniel POP

Database Technology Introduction. Heiko Paulheim

CSE2004 Database Management Systems

DATABASE SYSTEMS CHAPTER 2 DATA MODELS 1 DESIGN IMPLEMENTATION AND MANAGEMENT INTERNATIONAL EDITION ROB CORONEL CROCKETT

2. An implementation-ready data model needn't necessarily contain enforceable rules to guarantee the integrity of the data.

Announcements. Using Electronics in Class. Review. Staff Instructor: Alvin Cheung Office hour on Wednesdays, 1-2pm. Class Overview

System R cs262a, Lecture 2

Introduction to Relational Database Management Systems

Database Management System

CISC 3140 (CIS 20.2) Design & Implementation of Software Application II

Data, Databases, and DBMSs

6.830/6.814 Notes for Lecture 4: Database Internals Overview

Databases and Database Systems

SE352b: Roadmap. SE352b Software Engineering Design Tools. W5: Database Technology. Database Technology

A database management system (DBMS) is a software package with computer

Chapter 1: Introduction

Chapter 1: Introduction

Meaning & Concepts of Databases

Essay Question: Explain 4 different means by which constrains are represented in the Conceptual Data Model (CDM).

Introduction to Databases CSE 414. Lecture 2: Data Models

Topics covered 10/12/2015. Pengantar Teknologi Informasi dan Teknologi Hijau. Suryo Widiantoro, ST, MMSI, M.Com(IS)

Database Management System

Can you name one application that does not need any data? Can you name one application that does not need organized data?

ADVANCED DATABASES ; Spring 2015 Prof. Sang-goo Lee (11:00pm: Mon & Wed: Room ) Advanced DB Copyright by S.-g.

Strategic Information Systems Systems Development Life Cycle. From Turban et al. (2004), Information Technology for Management.

SQL. History. From Wikipedia, the free encyclopedia.

CHAPTER 2: DATA MODELS

; Spring 2008 Prof. Sang-goo Lee (14:30pm: Mon & Wed: Room ) ADVANCED DATABASES

Chapter 1: Introduction. Chapter 1: Introduction

Outline. Database Management Systems (DBMS) Database Management and Organization. IT420: Database Management and Organization

A bit of Databases history

UNIT I. Introduction

DATABASE MANAGEMENT SYSTEM SHORT QUESTIONS. QUESTION 1: What is database?

Part I What are Databases?

Introduction. Example Databases

Chapter 1: Introduction

CHAPTER 2: DATA MODELS

CSE 544 Principles of Database Management Systems. Lecture 4: Data Models a Never-Ending Story

Review for Exam 1 CS474 (Norton)

CS352 Lecture - Data Models

618 Index. BIT data type, 108, 109 BIT_LENGTH, 595f BIT VARYING data type, 108 BLOB data type, 108 Boolean data type, 109

EECS 647: Introduction to Database Systems

Relational Database Systems Part 01. Karine Reis Ferreira

Why are you here? Introduction. Course roadmap. Course goals. What do you want from a DBMS? What is a database system? Aren t databases just

U1. Data Base Management System (DBMS) Unit -1. MCA 203, Data Base Management System

Database Management System 2


DATABASE CONCEPTS. Dr. Awad Khalil Computer Science & Engineering Department AUC

Fundamentals of Information Systems, Seventh Edition

Database Principle. Zhuo Wang Spring

Fundamentals of Design, Implementation, and Management Tenth Edition

Data, Information, and Databases

CSE544 Database Architecture

Advanced Topics in Database Systems Performance. System R and the Relational Model

Data Base Concepts. Course Guide 2

Introduction. Who wants to study databases?

Topics. History. Architecture. MongoDB, Mongoose - RDBMS - SQL. - NoSQL

Introduction to the Structured Query Language [ SQL ] (Significant Concepts)

Bonus Content. Glossary

Conceptual Data Modeling and the Entity- Relationship Model. Department of Computer Science Northern Illinois University September 2014

Introduction to Databases

The Entity-Relationship Model (ER Model) - Part 2

Introduction. Course Overview Evolution and History of Database Management Systems Requirements of Object-Oriented Database Management Systems

CS511 Design of Database Management Systems

CS143: Relational Model

CS317 File and Database Systems

745: Advanced Database Systems

Course: Database Management Systems. Lê Thị Bảo Thu

Elena Baralis and Tania Cerquitelli 2013 Politecnico di Torino 1

DBMS. Relational Model. Module Title?

Database System Concepts and Architecture

Transcription:

Database Fundamentals Chapter 1 Class 01: Database Fundamentals 1 What is a Database? The ISO/ANSI SQL Standard does not contain a definition of the term database. In fact, the term is never mentioned in the standard. Most believe this is because vendors already had products on the market using their interpretation of the term. Class 01: Database Fundamentals 2 What is a Database? Vendors have different interpretations: DB2: a logical collection of tables Oracle: a set of files that store database objects; Oracle has a schema that is roughly what DB2 and Sybase/MS SQL call a database Sybase/MS SQL Server: a logical group of database objects MS Access: a single file that contains a group of related database objects MySQL: the terms database and schema are used interchangeably Class 01: Database Fundamentals 3 1

What is a Database? General definition: A database is a collection of interrelated data items that are managed as a single unit. Databases have distinct properties that distinguish them from other data storage mechanisms. In subsequent topics, we will look at properties that help define the difference between databases and other types of file storage systems, such as spreadsheets. Class 01: Database Fundamentals 4 Other Important Terms File: a collection of related records that are stored as a single unit by an operating system. Databases use files for permanent storage of data. Instance: a copy of the database software running in memory. Database object: a named data structure that is stored in a database. For example, in a relational database, tables and views are types of database objects Class 01: Database Fundamentals 5 What is a Database Management System (DBMS)? Software provided by the database vendor Provides basic services: Moving data to/from physical files Managing concurrent access by multiple users Managing transactions so that each is an all or nothing unit of work Support for a query language Provisions for backup and recovery Security mechanisms to prevent unauthorized data access and modification Class 01: Database Fundamentals 6 2

DBMS Layers of Abstraction The DBMS presents users with with distinct views of the data (user views), while storing the data only once. User: any person or application that signs onto the database Application: a set of computer programs designed to solve a particular business problem; e.g. payroll, order entry Class 01: Database Fundamentals 7 DBMS Layers of Abstraction Class 01: Database Fundamentals 8 DBMS Layers of Abstraction Physical Layer: contains the data files that hold the data Logical Layer: First of two layers of abstraction Presents the database schema (tables in an RDBMS) DBMS handles transformation from physical to logical DBMS software automatically issues the appropriate operating system file commands. Database user is unaware of which files are used, or even the existence of the files. Class 01: Database Fundamentals 9 3

ANSI/SPARC Layers External Layer: Second layer of abstraction Composed of user views (predefined or dynamic) DBMS transforms schema objects into views Sometimes called the sub schema These layers separate the presentation of data that application programs and business users see from the physical storage of the data. Class 01: Database Fundamentals 10 User Views Class 01: Database Fundamentals 11 Data Independence Data independence: the ability to make non destructive data structure changes without disrupting existing processes and queries that use the database. Provided by the DBMS layers of abstraction. Data independence is not an absolute have or have not property, but rather a matter of degrees (having more or less data independence compared to another alternative). Two forms: physical and logical (next slides) Class 01: Database Fundamentals 12 4

Physical Data Independence The ability to make changes in the physical layer without disrupting existing database users and operations. Examples: Moving a file from one disk to another Moving a database object from one file to another Not a have or have not property All computer systems have it to some degree Achieved in DBMS by the transformation from the physical layer to the logical layer Class 01: Database Fundamentals 13 Logical Data Independence The ability to make changes in the logical layer without disrupting existing database users and operations. Examples: Adding a new database object, such as a table Modifying an existing object, such as adding a new column Not a have or have not property Not found outside of DBMSs Achieved in DBMS by the transformation from the logical layer to the external layer Class 01: Database Fundamentals 14 Historically Significant Database Models Flat Files Hierarchical Model Network Model Relational Model Object Oriented Model Object Relational Model Class 01: Database Fundamentals 15 5

Flat File Database Model Consists of one or more readable files Technically not databases Data can be accessed in only one form the way it is physically stored Drawbacks: No relationships among files Difficult to ensure accuracy Redundant data usually necessary Physical location of data must be known User/application must manage any relationships Class 01: Database Fundamentals 16 Flat File Model (Nothwind) Class 01: Database Fundamentals 17 Hierarchical Data Model Record types organized into a hierarchy that appears as an inverted tree Parent record may have many child record types, but child may have only one parent type Related records connected via a physical address pointer (typically relative byte address, or RBA) A relative byte address refers to a location within a file in terms of how many bytes it is from the beginning of a file. Alternatively, address can be a block/record number. Child records may only be accessed via their parents Class 01: Database Fundamentals 18 6

Hierarchical Data Model (Northwind) Red dotted lines represent relationships that cannot be directly implemented in a pure hierarchical DBMS Class 01: Database Fundamentals 19 Hierarchical DBMS Pointer Chains Class 01: Database Fundamentals 20 Hierarchical Data Model Advantages (compared to flat files): Faster data retrieval Data integrity easier to manage Drawbacks: Users must know and understand data structure Redundant data may be required to work around the one parent restriction Class 01: Database Fundamentals 21 7

Network Data Model Similar to Hierarchical except that child ( member ) record types may have multiple parent ( owner ) record types Relationships (called sets ) are named Data access involves walking the sets Class 01: Database Fundamentals 22 Network Data Model (Northwind) Class 01: Database Fundamentals 23 Network Data Model Relationships are implemented as sets, with each set being implemented as a chain of pointers (similar to the pointers used in hierarchical databases) Each set is given a unique name within the database and database users must know the names of the sets in order to navigate the data structures. In diagrams, sets are shown as lines that connect owner and member, with an arrowhead pointing towards the member of the set. Class 01: Database Fundamentals 24 8

Network Model Data Access Data access requires walking the sets by issuing commands (e.g. get next member ) against sets Class 01: Database Fundamentals 25 Network Data Model Benefits: Fast data access Can start access with any record type Models more complex data structures Easier to develop complex queries Drawbacks: Data structure difficult to modify Changes to data structure often affect the applications User must understand complex data structure Class 01: Database Fundamentals 26 Relational Data Model Developed in response to inflexible data structures Primary unit of storage is the table Each table may be used independently or joins may be used to combine tables Relationships defined using primary and foreign keys instead of pointers Easily defined integrity constraints Class 01: Database Fundamentals 27 9

Relational Data Model (Northwind) Class 01: Database Fundamentals 28 Relationship Definition Relationships can be formally defined in the DBMS DBMS ensures that foreign key values always have a matching primary key in the parent table Class 01: Database Fundamentals 29 Relational Database Model Benefits: Very fast retrieval in most cases Data structure easily changed Users need no awareness of physical storage Complex queries easily developed Data usually more accurate Easier application programming Standard query language (SQL) Class 01: Database Fundamentals 30 10

Relational Database Model Drawbacks: Tables must be joined to retrieve related data (joins can be hidden in views, however) Users must understand relationships between tables Users must learn SQL or a front end query tool Class 01: Database Fundamentals 31 Object Oriented (OO) Data Model Primary tenet: data (variables) should not be freely accessed because doing so compromises the the independence of data from the processes. Program modules called methods perform all data access Object oriented language (e.g. C++, Java) allows programmers to access abstract objects containing both processing methods and data Pure OO database stores objects in a specialized database for persistence Earliest OO system was Smalltalk, developed in the 1970s Class 01: Database Fundamentals 32 The Anatomy of an Object Class 01: Database Fundamentals 33 11

OO Data Model Benefits Programmers need to understand only OO concepts Objects can inherit from a class structure Potentially highly automated application development Easier to manage (at least in theory) More compatible with OO languages and tools than Object Relational Disadvantages Database user must understand OO concepts Niche market products up to now General lack of industry standards Class 01: Database Fundamentals 34 Object Relational (OR) Database Model Combines OO and Relational DBMS concepts, supposedly taking the best of both SQL3 (SQL99) incorporated object operations Class 01: Database Fundamentals 35 OR Data Model Benefits Better OO language support (less need to translate tables to objects and back) Adds User Defined Types to relational Drawbacks: Database user must understand relational and OO concepts Currently no support for object inheritance Object purists don t accept it Class 01: Database Fundamentals 36 12

Database Model Comparison Class 01: Database Fundamentals 37 Why Use Relational? Most stable Well established ANSI and ISO standards Many vendors from which to choose Relatively easy to convert between vendor implementations Easy to define, maintain and manipulate data with SQL Simple ad hoc queries Data is well protected using defined integrity constraints Class 01: Database Fundamentals 38 History of Database Management Systems GUAM (Generalized Update Access Method from North American Aviation) provided the first hierarchical structure In the mid 60 s, IBM joined NAA to develop GUAM into IMS (Information Management System), the first commercial hierarchical DBMS Class 01: Database Fundamentals 39 13

History of DBMSs IDS (Integrated Data Store) from General Electric as the first network DBMS IBM extended IMS to include some network capabilities, overcoming the single parent restriction CODASYL (Conference on Data Systems Languages) and the DBTG (Database Task Group) published standards in 1969 1971 Class 01: Database Fundamentals 40 History of DBMSs Dr. E.F. (Ted) Codd delivers pioneering white paper "A Relational Model of Data for Large Shared Data Banks" in June, 1970. CODASYL published specifications for a standard Network DBMS in 1971. This began 5 years of heated controversy between a group of Network DBMS advocates (including Charles Bachman) and a group of Relational advocates. Class 01: Database Fundamentals 41 CODASYL Camp" Position Relational Model too mathematical; programmers would not be able to understand the new manipulation languages. An efficient implementation of Relational could not be built. Online transaction processing applications want to do record at a time processing. Class 01: Database Fundamentals 42 14

Relational Camp Position Nothing as complicated as the DBTG proposal could possibly be the right way to do data management. Set oriented queries are too difficult to program using the DBTG language. CODASYL has no formal underpinnings with which to define the semantics of the complex operations of the model. Class 01: Database Fundamentals 43 CODASYL vs. Relational The debate came to head at the 1975 ACM SIGMOD conference in a debate where Codd and 2 others squared off against Bachman and 2 others. The audience was more confused at the end of the two talks and ensuing discussion than at the outset. Several years of debate followed. Class 01: Database Fundamentals 44 CODASYL vs. Relational By the late 1970's, interest in CODASYL began to decline. Michael Stonebraker believes this was because of 2 factors: Easier to use relational languages such as QUEL and SQL were developed. Prototype Relational RDBMS's were developed that proved that implementations could be done with reasonable efficiency: Class 01: Database Fundamentals 45 15

Prototype Relational DBMSs System R, developed by 15 IBM researchers in San Jose under the direction of Frank King from 1974 to 1978. INGRES developed by a pickup team of UC Berkeley students under the direction of Michael Stonebraker and Eugene Wong from 1973 to 1977. Class 01: Database Fundamentals 46 Early Commercial Relational DBMSs System R was built commercially and became the basis for HP ALLBASE and IDMS/SQL. A bit later, Larry Ellison started Oracle and independently implemented the external specifications for System R. IBM, with some rewriting, developed System R into SQL/DS and DB2. Class 01: Database Fundamentals 47 Early Commercial Relational RDBMS s INGRES also went commercial and was very successful. Since Bob Epstein moved from INGRES to Britton Lee and then to startup SYBASE, there are some INGRES roots in these products. Source: "Readings in Database Systems" (second edition), edited by Michael Stonebraker, Morgan Kaufmann Publishers, 1994. Class 01: Database Fundamentals 48 16

History of DBMSs Object Oriented systems emerged in the 1970 s, but were not commercially successful until the 1980 s. Object Relational systems emerged in the the 1990 s and many RDBMS products added objectlike features XML databases showed promise for a time and subsequently faded. NoSQL databases (mostly column and document oriented) are emerging quickly. Class 01: Database Fundamentals 49 History of DBMSs In 1976, Peter Chen presented the Entity Relationship model, bolstering modeling weaknesses in the relational model. Many other modeling techniques followed. Class 01: Database Fundamentals 50 Class 01: Database Fundamentals 51 17