Database Management Systems

Slides:



Advertisements
Similar presentations
Relational Database and Data Modeling
Advertisements

Database Management Systems
Introduction to Database Management  Department of Computer Science Northern Illinois University January 2001.
Client/Server Databases and the Oracle 10g Relational Database
Database Design Conceptual –identify important entities and relationships –determine attribute domains and candidate keys –draw the E-R diagram Logical.
Introduction to Databases Transparencies
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
Mgt 20600: IT Management & Applications Databases Tuesday April 4, 2006.
Chapter 1 Introduction to Databases
Database Management Systems
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Hall, Accounting Information Systems, 7e ©2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly.
PHASE 3: SYSTEMS DESIGN Chapter 7 Data Design.
1 DATABASE TECHNOLOGIES BUS Abdou Illia, Fall 2007 (Week 3, Tuesday 9/4/2007)
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.1.
Chapter 1 Overview of Database Concepts Oracle 10g: SQL
Database Technical Session By: Prof. Adarsh Patel.
© 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Database Management Systems Accounting Information Systems, 5 th edition James A. Hall COPYRIGHT © 2007 Thomson South-Western, a part of The Thomson Corporation.
Concepts and Terminology Introduction to Database.
Lecture 2 An Overview of Relational Database IST 318 – DB Admin.
I Information Systems Technology Ross Malaga 4 "Part I Understanding Information Systems Technology" Copyright © 2005 Prentice Hall, Inc. 4-1 DATABASE.
Lecture # 3 & 4 Chapter # 2 Database System Concepts and Architecture Muhammad Emran Database Systems 1.
DataBase Management System What is DBMS Purpose of DBMS Data Abstraction Data Definition Language Data Manipulation Language Data Models Data Keys Relationships.
Copyright 2006 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Third Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
1 Chapter 1 Introduction to Databases Transparencies.
Programming Logic and Design Fourth Edition, Comprehensive Chapter 16 Using Relational Databases.
Database Management Supplement 1. 2 I. The Hierarchy of Data Database File (Entity, Table) Record (info for a specific entity, Row) Field (Attribute,
Hall, Accounting Information Systems, 7e ©2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly.
Introduction to Databases Transparencies © Pearson Education Limited 1995, 2005.
Management Information Systems by Prof. Park Kyung-Hye Chapter 7 (8th Week) Databases and Data Warehouses 07.
ACCOUNTING INFORMATION SYSTEMS
Introduction to Databases Transparencies
Introduction to Databases Transparencies
Introduction to Databases
Databases and DBMSs Todd S. Bacastow January
Database Management.
Client/Server Databases and the Oracle 10g Relational Database
Information Systems Today: Managing in the Digital World
Database Management System
Introduction to Databases Transparencies
Introduction to Databases
Introduction to Databases Connolly and Begg
Introduction to Information Technology
Introduction to Databases
Modern Systems Analysis and Design Third Edition
Chapter 4 Relational Databases
Chapter 9 Designing Databases
Introduction to Database Management System
Chapter 2 Database Environment Pearson Education © 2009.
Basic Concepts in Data Management
Accounting System Design
Data Base System Lecture 2: Introduction to Database
Database Fundamentals
File Systems and Databases
Managing data Resources:
Chapter 12 Designing Databases
Dr. Awad Khalil Computer Science Department AUC
Data Resource Management
Introduction to Databases
MANAGING DATA RESOURCES
Data Model.
Accounting System Design
Introduction to Databases
Accounting Information Systems 9th Edition
Introduction to Databases Transparencies
Chapter 17 Designing Databases
Data Resource Management
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management
Database management systems
Presentation transcript:

Database Management Systems Accounting Information Systems, 5th edition James A. Hall COPYRIGHT © 2007 Thomson South-Western, a part of The Thomson Corporation. Thomson, the Star logo, and South-Western are trademarks used herein under license

Flat-File Versus Database Environments Computer processing involves two components: data and instructions (programs). Conceptually, there are two methods for designing the interface between program instructions and data: file-oriented processing: A specific data file was created for each application data-oriented processing: Create a single data repository to support numerous applications. Disadvantages of file-oriented processing include redundant data and programs and varying formats for storing the redundant data.

Flat-File Environment Data User 1 Transactions Program 1 A,B,C User 2 Transactions Program 2 X,B,Y User 3 Transactions Users access data via computer programs that process the data and present information to the users. Users own their data files. Data redundancy results as multiple applications maintain the same data elements. Files and data elements used in more than one application must be duplicated, which results in data redundancy. As a result of redundancy, the characteristics of data elements and their values are likely to be inconsistent. Outputs usually consist of preprogrammed reports instead of ad-hoc queries provided upon request. This results in inaccessibility of data. Changes to current file-oriented applications cannot be made easily, nor can new developments be quickly realized, which results in inflexibility. Program 3 L,B,M 3

Data Redundancy & Flat-File Problems Data Storage - creates excessive storage costs of paper documents and/or magnetic form Data Updating - any changes or additions must be performed multiple times Currency of Information - potential problem of failing to update all affected files Task-Data Dependency - user’s inability to obtain additional information as his or her needs change 4

Database Approach Database Program 1 A, B, D C, B X, M Y, S L, User 1 Transactions Program 1 A, B, C, X, Y, L, M D B M S User 2 Transactions Program 2 User 3 Transactions Solves the following problems of the flat file approach no data redundancy - except for primary keys, data is only stored once single update current values task-data independence - users have access to the full domain of data available to the firm A database is a set of computer files that minimizes data redundancy and is accessed by one or more application programs for data processing. The database approach to data storage applies whenever a database is established to serve two or more applications, organizational units, or types of users. A database management system (DBMS) is a computer program that enables users to create, modify, and utilize database information efficiently. Program 3 6

Advantages of the Database Approach Data sharing/centralize database resolves flat-file problems: No data redundancy - Data is stored only once, eliminating data redundancy and reducing storage costs. Single update - Because data is in only one place, it requires only a single update, reducing the time and cost of keeping the database current. Current values - A change to the database made by any user yields current data values for all other users. Task-data independence - As users’ information needs expand, the new needs can be more easily satisfied than under the flat-file approach.

Disadvantages of the Database Approach Can be costly to implement additional hardware, software, storage, and network resources are required Can only run in certain operating environments may make it unsuitable for some system configurations Because it is so different from the file-oriented approach, the database approach requires training users may be inertia or resistance

Elements of the Database Approach Administrator System Development Process System Requests Applications User Programs DBMS Transactions Data Definition Language Host Operating System U S E R Transactions User Programs Data Manipulation Language Transactions User Programs Query Language Physical Database User Queries 8

DBMS Features User Programs - makes the presence of the DBMS transparent to the user Direct Query - allows authorized users to access data without programming Application Development - user created applications Backup and Recovery - copies database Database Usage Reporting - captures statistics on database usage (who, when, etc.) Database Access - authorizes access to sections of the database 10

Internal Controls and DBMS The purpose of the DBMS is to provide controlled access to the database. The DBMS is a special software system programmed to know which data elements each user is authorized to access and deny unauthorized requests of data. 7

Data Definition Language (DDL) DDL is a programming language used to define the database to the DBMS. The DDL identifies the names and the relationship of all data elements, records, and files that constitute the database. Viewing Levels: internal view - physical arrangement of records (1) conceptual view - representation of database (1) user view - the portion of the database each user views (many) 11

Data Manipulation Language (DML) DML is the proprietary programming language that a particular DBMS uses to retrieve, process, and store data. Entire user programs may be written in the DML, or selected DML commands can be inserted into universal programs, such as COBOL and FORTRAN. 12

Query Language The query capability permits end users and professional programmers to access data in the database without the need for conventional programs. ANSI’s Structured Query Language (SQL) is a fourth-generation language that has emerged as the standard query language. 13

Functions of the DBA

Logical Data Structures A particular method used to organize records in a database is called the database’s structure. The objective is to develop this structure efficiently so that data can be accessed quickly and easily. Four types of structures are: hierarchical (tree structure) network relational object-oriented

The Relational Model The relational model portrays data in the form of two dimensional tables: relation - the database table attributes (data elements) - form columns tuples (records) - form rows data - the intersection of rows and columns 31

PROJECT - filtering out columns, such as the light blue RESTRICT - filtering out rows, such as the dark blue JOIN X1 Y1 Z1 X1 Y1 Y1 Z1 X2 Y2 Y2 Z2 X2 Y2 Z2 X3 Y1 Y3 Z3 X3 Y1 Z1 35

Properly Designed Relational Tables No repeating values - All occurrences at the intersection of a row and column are a single value. The attribute values in any column must all be of the same class. Each column in a given table must be uniquely named. Each row in the table must be unique in at least one attribute, which is the primary key. 32

Crow’s Feet Cardinalities (1:0,1) (1:1) (1:0,M) (1:M) (M:M) 23

Relational Model Data Linkages (>1 table) No explicit pointers are present. The data are viewed as a collection of independent tables. Relations are formed by an attribute that is common to both tables in the relation. Assignment of foreign keys: if 1 to 1 association, either of the table’s primary key may be the foreign key. if 1 to many association, the primary key on one of the sides is embedded as the foreign key on the other side. if many to many association, may embed foreign keys or create a separate linking table. 33

Three Types of Anomalies Insertion Anomaly: A new item cannot be added to the table until at least one entity uses a particular attribute item. Deletion Anomaly: If an attribute item used by only one entity is deleted, all information about that attribute item is lost. Update Anomaly: A modification on an attribute must be made in each of the rows in which the attribute appears. Anomalies can be corrected by creating relational tables. 79

Advantages of Relational Tables Removes all three anomalies Various items of interest (customers, inventory, sales) are stored in separate tables. Space is used efficiently. Very flexible. Users can form ad hoc relationships. 38

The Normalization Process A process which systematically splits unnormalized complex tables into smaller tables that meet two conditions: all nonkey (secondary) attributes in the table are dependent on the primary key all nonkey attributes are independent of the other nonkey attributes When unnormalized tables are split and reduced to third normal form, they must then be linked together by foreign keys. 38

Steps in Normalization Table with repeating groups Remove repeating groups First normal form 1NF Remove partial dependencies Second normal form 2NF Remove transitive dependencies Third normal form 3NF Remove remaining anomalies Higher normal forms 86

Accountants and Data Normalization Update anomalies can generate conflicting and obsolete database values. Insertion anomalies can result in unrecorded transactions and incomplete audit trails. Deletion anomalies can cause the loss of accounting records and the destruction of audit trails. Accountants should understand the data normalization process and be able to determine whether a database is properly normalized. 40

Six Phases in Designing Relational Databases Identify entities identify the primary entities of the organization construct a data model of their relationships Construct a data model showing entity associations determine the associations between entities model associations into an ER diagram

Six Phases in Designing Relational Databases Add primary keys and attributes assign primary keys to all entities in the model to uniquely identify records every attribute should appear in one or more user views Normalize and add foreign keys remove repeating groups, partial and transitive dependencies assign foreign keys to be able to link tables

Six Phases in Designing Relational Databases Construct the physical database create physical tables populate tables with data Prepare the user views normalized tables should support all required views of system users user views restrict users from have access to unauthorized data