Chapter 9 Database Systems. © 2005 Pearson Addison-Wesley. All rights reserved 9-2 Chapter 9: Database Systems 9.1 Database Fundamentals 9.2 The Relational.

Slides:



Advertisements
Similar presentations
Relational Database and Data Modeling
Advertisements

Chapter 10: Designing Databases
C6 Databases.
Management Information Systems, Sixth Edition
Relational Databases Chapter 4.
Managing Data Resources
Chapter Information Systems Database Management.
Databases Chapter Distinguish between the physical and logical view of data Describe how data is organized: characters, fields, records, tables,
Chapter 9 Database Systems. 2 Chapter 9: Database Systems 9.1 Database Fundamentals 9.2 The Relational Model 9.3 Object-Oriented Databases 9.4 Maintaining.
Database Management: Getting Data Together Chapter 14.
Organizing Data & Information
Chapter 9: Database Systems
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
Database Features Lecture 2. Desirable features in an information system Integrity Referential integrity Data independence Controlled redundancy Security.
Mgt 20600: IT Management & Applications Databases Tuesday April 4, 2006.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
5.1 © 2007 by Prentice Hall 5 Chapter Foundations of Business Intelligence: Databases and Information Management.
Chapter 5 Lecture 2. Principles of Information Systems2 Objectives Understand Data definition language (DDL) and data dictionary Learn about popular DBMSs.
Discovering Computers Fundamentals, 2012 Edition Your Interactive Guide to the Digital World.
© Paradigm Publishing Inc. 9-1 Chapter 9 Database and Information Management.
Objectives Overview Define the term, database, and explain how a database interacts with data and information Define the term, data integrity, and describe.
Chapter 2 CIS Sungchul Hong
Database Technical Session By: Prof. Adarsh Patel.
Organizing Data and Information AD660 – Databases, Security, and Web Technologies Marcus Goncalves Spring 2013.
© Paradigm Publishing Inc. 9-1 Chapter 9 Database and Information Management.
1 Adapted from Pearson Prentice Hall Adapted form James A. Senn’s Information Technology, 3 rd Edition Chapter 7 Enterprise Databases and Data Warehouses.
Discovering Computers Fundamentals Fifth Edition Chapter 9 Database Management.
Professor Michael J. Losacco CIS 1110 – Using Computers Database Management Chapter 9.
Objectives Overview Define the term, database, and explain how a database interacts with data and information Describe the qualities of valuable information.
Lecture2: Database Environment Prepared by L. Nouf Almujally & Aisha AlArfaj 1 Ref. Chapter2 College of Computer and Information Sciences - Information.
Copyright © 2015 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education.
C6 Databases. 2 Traditional file environment Data Redundancy and Inconsistency: –Data redundancy: The presence of duplicate data in multiple data files.
5-1 McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved.
Lecture2: Database Environment Prepared by L. Nouf Almujally 1 Ref. Chapter2 Lecture2.
Lecture # 3 & 4 Chapter # 2 Database System Concepts and Architecture Muhammad Emran Database Systems 1.
Databases Shortfalls of file management systems Structure of a database Database administration Database Management system Hierarchical Databases Network.
6.1 © 2010 by Prentice Hall 6 Chapter Foundations of Business Intelligence: Databases and Information Management.
Chapter 9 Database Systems Introduction to CS 1 st Semester, 2014 Sanghyun Park.
Data resource management
Chapter 9 Database Systems © 2007 Pearson Addison-Wesley. All rights reserved.
Advanced Accounting Information Systems Day 10 answers Organizing and Manipulating Data September 16, 2009.
Programming Logic and Design Fourth Edition, Comprehensive Chapter 16 Using Relational Databases.
Managing Data Resources. File Organization Terms and Concepts Bit: Smallest unit of data; binary digit (0,1) Byte: Group of bits that represents a single.
Physical Database Design Purpose- translate the logical description of data into the technical specifications for storing and retrieving data Goal - create.
Introduction to Database Chapter #9 Sec 9.1. What is a Database? A flat file is considered to be one-dimensional storage system because it presents its.
Databases Chapter Copyright © 2011 by The McGraw-Hill Companies, Inc. All rights reserved.
2/20: Ch. 6 Data Management What is data? How is it stored? –Traditional management storage techniques; problems –DBMS.
Chapter 13.3: Databases Invitation to Computer Science, Java Version, Second Edition.
Data The fact and figures that can be recorded in system and that have some special meaning assigned to it. Eg- Data of a customer like name, telephone.
Copyright © 2012 Pearson Education, Inc. Communication Skills.
1 Management Information Systems M Agung Ali Fikri, SE. MM.
Chapter 3 An Introduction to Relational Databases.
Data Resource Management Chapter 5 McGraw-Hill/IrwinCopyright © 2011 by The McGraw-Hill Companies, Inc. All rights reserved.
Managing Data Resources File Organization and databases for business information systems.
Management Information Systems by Prof. Park Kyung-Hye Chapter 7 (8th Week) Databases and Data Warehouses 07.
Chapter 9 Database Systems
Fundamentals & Ethics of Information Systems IS 201
Ch. 8 File Structures Sequential files. Text files. Indexed files.
Chapter 4 Relational Databases
Chapter 9: Database Systems
MANAGING DATA RESOURCES
Chapter 9: Database Systems
MANAGING DATA RESOURCES
Database management concepts
Chapter 9: Database Systems
Presentation transcript:

Chapter 9 Database Systems

© 2005 Pearson Addison-Wesley. All rights reserved 9-2 Chapter 9: Database Systems 9.1 Database Fundamentals 9.2 The Relational Model 9.3 Object-Oriented Databases 9.4 Maintaining Database Integrity 9.5 Traditional File Structures 9.6 Data Mining 9.7 Social Impact of Database Technology

© 2005 Pearson Addison-Wesley. All rights reserved 9-3 Definition of a Database Database = a collection of data that is multidimensional, since internal links between its entries make the information accessible from a variety of perspectives Flat File = a traditional one-dimensional file storage system that presents its information from a single point of view

© 2005 Pearson Addison-Wesley. All rights reserved 9-4 Figure 9.1 A file versus a database organization

© 2005 Pearson Addison-Wesley. All rights reserved 9-5 Figure 9.2 The conceptual layers of a database implementation

© 2005 Pearson Addison-Wesley. All rights reserved 9-6 Schemas Schema = a description of the structure of an entire database, used by database software to maintain the database Subschema = a description of only that portion of the database pertinent to a particular user’s needs, used to prevent sensitive data from being accessed by unauthorized personnel

© 2005 Pearson Addison-Wesley. All rights reserved 9-7 Database management systems Database Management System (DBMS) = a software layer that maintains a database and manipulates it in response to requests from applications Distributed Database = a database stored on multiple machines –DBMS will mask this organizational detail from its users Data independence = the ability to change the organization of a database without changing the application software that uses it

© 2005 Pearson Addison-Wesley. All rights reserved 9-8 Database models Database model = conceptual view of a database –Relational database model –Object-oriented database model

© 2005 Pearson Addison-Wesley. All rights reserved 9-9 Relational database model Relation = a rectangular table –Attribute = a column in the table –Tuple = a row in the table

© 2005 Pearson Addison-Wesley. All rights reserved 9-10 Figure 9.3 A relation containing employee information

© 2005 Pearson Addison-Wesley. All rights reserved 9-11 Evaluating a relational design Avoid multiple concepts within one relation –Can lead to redundant data –Deleting a tuple could also delete necessary but unrelated information

© 2005 Pearson Addison-Wesley. All rights reserved 9-12 Improving a relational design Decomposition = dividing the columns of a relation into two or more relations, duplicating those columns necessary to maintain relationships –Lossless or nonloss decomposition = a “correct” decomposition that does not lose any information

© 2005 Pearson Addison-Wesley. All rights reserved 9-13 Figure 9.4 A relation containing redundancy

© 2005 Pearson Addison-Wesley. All rights reserved 9-14 Figure 9.5 An employee database consisting of three relations

© 2005 Pearson Addison-Wesley. All rights reserved 9-15 Figure 9.6 Finding the departments in which employee 23Y34 has worked

© 2005 Pearson Addison-Wesley. All rights reserved 9-16 Figure 9.7 A relation and a proposed decomposition

© 2005 Pearson Addison-Wesley. All rights reserved 9-17 Relational operations Select: choose rows Project: choose columns Join: assemble information from two or more relations

© 2005 Pearson Addison-Wesley. All rights reserved 9-18 Figure 9.8 The SELECT operation

© 2005 Pearson Addison-Wesley. All rights reserved 9-19 Figure 9.9 The PROJECT operation

© 2005 Pearson Addison-Wesley. All rights reserved 9-20 Figure 9.10 The JOIN operation

© 2005 Pearson Addison-Wesley. All rights reserved 9-21 Figure 9.11 Another example of the JOIN operation

© 2005 Pearson Addison-Wesley. All rights reserved 9-22 Figure 9.12 An application of the JOIN operation

© 2005 Pearson Addison-Wesley. All rights reserved 9-23 Structured Query Language (SQL) operations to manipulate tuples –insert –update –delete –select

© 2005 Pearson Addison-Wesley. All rights reserved 9-24 SQL examples select EmplId, Dept from ASSIGNMENT, JOB where ASSIGNMENT.JobId = JOB.JobId and ASSIGNMENT.TermData = “*” insert into EMPLOYEE values (‘43212’, ‘Sue A. Burt’, ‘33 Fair St.’, ‘ ’)

© 2005 Pearson Addison-Wesley. All rights reserved 9-25 SQL examples (continued) delete from EMPLOYEE where Name = ‘G. Jerry Smith’ update EMPLOYEE set Address = ‘1812 Napoleon Ave.’ where Name = ‘Joe E. Baker’

© 2005 Pearson Addison-Wesley. All rights reserved 9-26 Object-oriented databases Object-oriented database = a database constructed by applying the object-oriented paradigm –Each data entity stored as a persistent object –Relationships indicated by links between objects –DBMS maintains inter-object links

© 2005 Pearson Addison-Wesley. All rights reserved 9-27 Figure 9.13 The associations between objects in an object- oriented database

© 2005 Pearson Addison-Wesley. All rights reserved 9-28 Advantages of object-oriented databases Matches design paradigm of object-oriented applications Intelligence can be built into attribute handlers –Example: names of people Can handle exotic data types –Example: multimedia Can store intelligent entities

© 2005 Pearson Addison-Wesley. All rights reserved 9-29 Maintaining database integrity Transaction = a sequence of operations that must all happen together –Example: transferring money between bank accounts Transaction log = non-volatile record of each transaction’s activities, built before the transaction is allowed to happen –Commit point = point at which transaction has been recorded in log –Roll-back = procedure to undo a failed, partially completed transaction

© 2005 Pearson Addison-Wesley. All rights reserved 9-30 Maintaining database integrity (continued) Simultaneous access problems –Incorrect summary problem –Lost update problem Locking = preventing others from accessing data being used by a transaction –Shared lock: used when reading data –Exclusive lock: used when altering data

© 2005 Pearson Addison-Wesley. All rights reserved 9-31 Sequential files Sequential file = file whose contents can only be read in order –Reader must be able to detect end-of-file (EOF) –Data can be stored in logical records, sorted by a key field Greatly increases the speed of batch updates

© 2005 Pearson Addison-Wesley. All rights reserved 9-32 Figure 9.14 A procedure for merging two sequential files

© 2005 Pearson Addison-Wesley. All rights reserved 9-33 Figure 9.15 Applying the merge algorithm (Letters are used to represent entire records. The particular letter indicates the value of the record’s key field.)

© 2005 Pearson Addison-Wesley. All rights reserved 9-34 Figure 9.16 The structure of a simple employee file implemented as a text file

© 2005 Pearson Addison-Wesley. All rights reserved 9-35 Indexed files Index = list of (key, location) pairs –Sorted by key values –location = where the record is stored

© 2005 Pearson Addison-Wesley. All rights reserved 9-36 Figure 9.17 Opening an indexed file

© 2005 Pearson Addison-Wesley. All rights reserved 9-37 Hashing Each record has a key The master file is divided into buckets A hash function computes a bucket number for each key value Each record is stored in the bucket corresponding to the hash of its key

© 2005 Pearson Addison-Wesley. All rights reserved 9-38 Figure 9.18 Hashing the key field value 25X3Z to one of 41 buckets

© 2005 Pearson Addison-Wesley. All rights reserved 9-39 Figure 9.19 The rudiments of a hashing system

© 2005 Pearson Addison-Wesley. All rights reserved 9-40 Collisions in Hashing Collision = when two keys hash to the same bucket –Major problem when table is over 75% full –Solution: increase number of buckets and rehash all data

© 2005 Pearson Addison-Wesley. All rights reserved 9-41 Data mining Data mining = a set of techniques for discovering patterns in collections of data –Relies heavily on statistical analyses Data warehouse = static data collection to be mined –Data cube = data presented from many perspectives to enable mining Raises significant ethical issues when it involves personal information

© 2005 Pearson Addison-Wesley. All rights reserved 9-42 Data mining strategies Class description Class discrimination Cluster analysis Association analysis Outlier analysis Sequential pattern analysis

© 2005 Pearson Addison-Wesley. All rights reserved 9-43 Social impact of database technology Problems –Massive amounts of personal data are being collected Often without knowledge or meaningful consent of affected people –Data merging produces new, more invasive information –Errors are widely disseminated and hard to correct Remedies –Existing legal remedies largely ineffective –Negative publicity may be more effective