C HAPTER 4 INTRODUCTION. Relational Databases FILE VS. DATABASES FILE VS. DATABASES



Similar documents
Database Design. Marta Jakubowska-Sobczak IT/ADC based on slides prepared by Paula Figueiredo, IT/DB

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


SQL, PL/SQL FALL Semester 2013

Foundations of Business Intelligence: Databases and Information Management

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

Oracle 10g PL/SQL Training

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

Foundations of Business Intelligence: Databases and Information Management

Foundations of Business Intelligence: Databases and Information Management

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

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

Fundamentals of Database System

RELATIONAL DATABASE DESIGN

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

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

Course MIS. Foundations of Business Intelligence

SQL Server. 1. What is RDBMS?

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

MODULE 8 LOGICAL DATABASE DESIGN. Contents. 2. LEARNING UNIT 1 Entity-relationship(E-R) modelling of data elements of an application.

1 File Processing Systems

Oracle Database 12c: Introduction to SQL Ed 1.1

Chapter 6 FOUNDATIONS OF BUSINESS INTELLIGENCE: DATABASES AND INFORMATION MANAGEMENT Learning Objectives

ISM 318: Database Systems. Objectives. Database. Dr. Hamid R. Nemati

Chapter 6. Foundations of Business Intelligence: Databases and Information Management

Alexander Nikov. 5. Database Systems and Managing Data Resources. Learning Objectives. RR Donnelley Tries to Master Its Data

Oracle SQL. Course Summary. Duration. Objectives

14 Databases. Source: Foundations of Computer Science Cengage Learning. Objectives After studying this chapter, the student should be able to:

TIM 50 - Business Information Systems

Data Hierarchy. Traditional File based Approach. Hierarchy of Data for a Computer-Based File

7. Databases and Database Management Systems


Chapter 6 8/12/2015. Foundations of Business Intelligence: Databases and Information Management. Problem:

Introduction to Database Systems

Oracle Database 10g: Introduction to SQL

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

Introduction to normalization. Introduction to normalization

Chapter 15 Basics of Functional Dependencies and Normalization for Relational Databases

The Relational Model. Why Study the Relational Model?

Creating Tables ACCESS. Normalisation Techniques

æ A collection of interrelated and persistent data èusually referred to as the database èdbèè.

Using SAS as a Relational Database

Foundations of Business Intelligence: Databases and Information Management

Database Management. Technology Briefing. Modern organizations are said to be drowning in data but starving for information p.

Databases and Information Management

Database Design Basics

CS 377 Database Systems. Database Design Theory and Normalization. Li Xiong Department of Mathematics and Computer Science Emory University

- Eliminating redundant data - Ensuring data dependencies makes sense. ie:- data is stored logically

Normalisation 6 TABLE OF CONTENTS LEARNING OUTCOMES

Normalisation to 3NF. Database Systems Lecture 11 Natasha Alechina

Topic 5.1: Database Tables and Normalization

Maintaining Stored Procedures in Database Application

Foundations of Business Intelligence: Databases and Information Management

Oracle Database: SQL and PL/SQL Fundamentals NEW

CS2Bh: Current Technologies. Introduction to XML and Relational Databases. Introduction to Databases. Why databases? Why not use XML?

COMP 5138 Relational Database Management Systems. Week 5 : Basic SQL. Today s Agenda. Overview. Basic SQL Queries. Joins Queries

The Import & Export of Data from a Database

COSC344 Database Theory and Applications. Lecture 9 Normalisation. COSC344 Lecture 9 1

INFO Koffka Khan. Tutorial 6

DATABASE NORMALIZATION

Normalization in Database Design

IT2305 Database Systems I (Compulsory)

Lecture 6. SQL, Logical DB Design

Databases What the Specification Says

Course: CSC 222 Database Design and Management I (3 credits Compulsory)

Database Query 1: SQL Basics

Normalization of Database

Oracle Database: SQL and PL/SQL Fundamentals

Oracle Database: SQL and PL/SQL Fundamentals

Basic Concepts of Database Systems

Normalization. Reduces the liklihood of anomolies

Types & Uses of Databases

Functional Dependency and Normalization for Relational Databases

DBMS / Business Intelligence, SQL Server

Once the schema has been designed, it can be implemented in the RDBMS.

LOGICAL DATABASE DESIGN

Relational Database Basics Review

Oracle Database: Introduction to SQL

Conventional Files versus the Database. Files versus Database. Pros and Cons of Conventional Files. Pros and Cons of Databases. Fields (continued)

Chapter 5 More SQL: Complex Queries, Triggers, Views, and Schema Modification

Database Normalization. Mohua Sarkar, Ph.D Software Engineer California Pacific Medical Center

Question 1. Relational Data Model [17 marks] Question 2. SQL and Relational Algebra [31 marks]

Oracle Database: Introduction to SQL

1. INTRODUCTION TO RDBMS

Oracle Database 11g SQL

CPS352 Database Systems: Design Project

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

Unit 3.1. Normalisation 1 - V Normalisation 1. Dr Gordon Russell, Napier University

Normal forms and normalization

5. CHANGING STRUCTURE AND DATA

CSI 2132 Lab 3. Outline 09/02/2012. More on SQL. Destroying and Altering Relations. Exercise: DROP TABLE ALTER TABLE SELECT

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

Oracle Database 10g Express

DATABASE MANAGEMENT SYSTEMS

DATABASE MANAGEMENT SYSTEMS

David Dye. Extract, Transform, Load

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

ETL PROCESS IN DATA WAREHOUSE

The Relational Model. Ramakrishnan&Gehrke, Chapter 3 CS4320 1

Transcription:

INRODUCION C HAPER 4 Relational Databases Questions to be addressed in this chapter: How are s different than file-based legacy systems? Why are s important and what is their advantage? What is the difference between logical and physical views of a? What are the fundamental concepts of systems such as DBMS, schemas, the data dictionary, and DBMS languages? What is a relational, and how does it organize data? How are tables structured to properly store data in a relational? 008 Prentice Hall Business Publishing Accounting Information Systems, /e Romney/Steinbart of 96 008 Prentice Hall Business Publishing Accounting Information Systems, /e Romney/Steinbart of 96 FILE VS. DAABASES FILE VS. DAABASES Master File Fact B Fact C Master File Fact D Fact F Master File Fact B Fact F Enrollment Financial Aid Grades is proliferation of master files created problems: Often the same information was stored in multiple master files. Made it more difficult to effectively integrate data and obtain an organization-wide view of the data. Also, the same information may not have been consistent between files. If a student changed his phone number, it may have been updated in one master file but not another. Enrollment Database Fact B Fact C Fact D Fact E Fact F Database Management System Financial Aid Grades e approach treats data as an organizational resource that should be used by and managed for the entire organization, not just a particular department. A management system (DBMS) serves as the interface between the and the various application programs. 008 Prentice Hall Business Publishing Accounting Information Systems, /e Romney/Steinbart of 96 008 Prentice Hall Business Publishing Accounting Information Systems, /e Romney/Steinbart 4 of 96 IMPORANCE AND ADVANAGES OF As accountants, you are likely to audit or work for companies that use technology to store, process, and report accounting transactions. Many accountants work directly with s and will enter, process, and query s. Some will develop and evaluate internal controls necessary to ensure integrity. Others will be involved in the design and management of s. IMPORANCE AND ADVANAGES OF Database technology provides the following benefits to organizations: Data integration Data sharing Reporting flexibility Relationships can be explicitly defined and Minimal data used redundancy in the preparation and inconsistencies of management reports. Data independence EXAMPLE: Relationship between selling Central management costs and promotional of data campaigns. Cross-functional analysis 008 Prentice Hall Business Publishing Accounting Information Systems, /e Romney/Steinbart of 96 008 Prentice Hall Business Publishing Accounting Information Systems, /e Romney/Steinbart 6 of 96

e data dictionary A key component of a DBMS is the data dictionary. Contains information about the structure of the. For each data element, there is a corresponding record in the data dictionary describing that element. Information provided for each element includes: A description or explanation of the element. e records in which it is contained. Its source. e length and type of the field in which it is stored. e programs in which it is used. e outputs in which it is contained. e authorized users of the element. Other names for the element. 008 Prentice Hall Business Publishing Accounting Information Systems, /e Romney/Steinbart 7 of 96 008 Prentice Hall Business Publishing Accounting Information Systems, /e Romney/Steinbart 8 of 96 Querying a : e set of commands used to query the is known as data query language (DQL). DQL is used to interrogate the, including: Retrieving records Sorting records Ordering records Presenting subsets of the e DQL usually contains easy-to-use, powerful commands that enable users to satisfy their own information needs. Report Writer Many DBMS packages also include a report writer, a language that simplifies the creation of reports. Users typically specify: What elements they want printed How the report should be formatted e report writer then: Searches the Extracts specified data Prints them out according to specified format 008 Prentice Hall Business Publishing Accounting Information Systems, /e Romney/Steinbart 9 of 96 008 Prentice Hall Business Publishing Accounting Information Systems, /e Romney/Steinbart 0 of 96 Advisor No. 49 0 06 Howard Melton Zhang Radowski ADVISORS SUDENS Glen Amy Xi J.D. Office No. 40 6 0 0 Advisor No. A foreign key is an attribute in one table that is a primary key in another 0 ACC-60 ANSI-4 M W 7 F ime :00 PM Suppose changes her phone number. You need to make the change in three places. If you fail to change it in all three places or change it incorrectly in one place, then the records for will be inconsistent. is problem is referred to as an update anomaly. 008 Prentice Hall Business Publishing Accounting Information Systems, /e Romney/Steinbart of 96 008 Prentice Hall Business Publishing Accounting Information Systems, /e Romney/Steinbart of 96

ime ime ACC-60 M ACC-60 M :00 PM :00 PM W W ANSI-4 7 F ANSI-4 7 F What happens if you have a new student to add, but he hasn t signed up for any courses yet? Or what if there is a new class to add, but there are no students enrolled in it yet? In either case, the record will be partially blank. is problem is referred to as an insert anomaly. If withdraws from all his classes and you eliminate all three of his rows from the table, then you will no longer have a record of. If is planning to take classes next semester, then you probably didn t really want to delete all records of him. is problem is referred to as a delete anomaly. 008 Prentice Hall Business Publishing Accounting Information Systems, /e Romney/Steinbart of 96 008 Prentice Hall Business Publishing Accounting Information Systems, /e Romney/Steinbart 4 of 96 Phone No. Class Class Class Class 4 ACC-60 ANSI-4 is approach is also fraught with problems: How many classes should you allow in building the table? e above table is quite simplified. In reality, you might need to allow for 0 or more classes (assuming a student could take many -hour classes). Also, more information than just the course number would be stored for each class. ere would be a great deal of wasted space for all the students taking fewer than the maximum possible number of classes. Also, if you wanted a list of every student taking, notice that you would have to search multiple attributes. 008 Prentice Hall Business Publishing Accounting Information Systems, /e Romney/Steinbart of 96 Every column in a row must be single valued. In other words, every cell can have one and only one value. In the student table, you couldn t have an attribute named Phone Number if a student could have multiple phone numbers. ere might be an attribute named local phone number and an attribute named permanent phone number. You could not have an attribute named Class in the student table, because a student could take multiple classes. 008 Prentice Hall Business Publishing Accounting Information Systems, /e Romney/Steinbart 6 of 96 e primary key cannot be null. e primary key uniquely identifies a specific row in the table, so it cannot be null, and it must be unique for every record. is rule is referred to as the entity integrity rule. A foreign key must either be null or correspond to the value of a primary key in another is rule is referred to as the referential integrity rule. e rule is necessary because foreign keys are used to link rows in one table to rows in another 008 Prentice Hall Business Publishing Accounting Information Systems, /e Romney/Steinbart 7 of 96 008 Prentice Hall Business Publishing Accounting Information Systems, /e Romney/Steinbart 8 of 96

All non-key attributes in a table should describe a characteristic of the object identified by the primary key. Could nationality be a non-key attribute in the student table? Could advisor s nationality be a non-key attribute in the student table? e preceding four constraints produce a wellstructured (normalized) in which: Data are consistent. Redundancy is minimized and controlled. In a normalized, attributes appear multiple times only when they function as foreign keys. e referential integrity rule ensures there will be no update anomaly problem with foreign keys. 008 Prentice Hall Business Publishing Accounting Information Systems, /e Romney/Steinbart 9 of 96 008 Prentice Hall Business Publishing Accounting Information Systems, /e Romney/Steinbart 0 of 96 An important feature is that data about various things of interest (entities) are stored in separate tables. Makes it easier to add new data to the system. You add a new student by adding a row to the student You add a new course by adding a row to the course Means you can add a student even if he hasn t signed up for any courses. And you can add a class even if no students are yet enrolled in it. Makes it easy to avoid the insert anomaly. Space is also used more efficiently than in the other schemes. ere should be no blank rows or attributes. ere are two basic ways to design wellstructured relational s. Normalization Semantic data modeling 008 Prentice Hall Business Publishing Accounting Information Systems, /e Romney/Steinbart of 96 008 Prentice Hall Business Publishing Accounting Information Systems, /e Romney/Steinbart of 96 Normalization Starts with the assumption that everything is initially stored in one large A set of rules is followed to decompose that initial table into a set of normalized tables. Objective is to produce a set of tables in thirdnormal form (NF) because such tables are free of update, insert, and delete anomalies. Approach is beyond the scope of this book but can be found in any textbook. Semantic data modeling (covered in detail in Chapter ) Database designer uses knowledge about how business processes typically work and the information needs associated with transaction processing to draw a graphical picture of what should be included in the. e resulting graphic is used to create a set of relational tables that are in NF. 008 Prentice Hall Business Publishing Accounting Information Systems, /e Romney/Steinbart of 96 008 Prentice Hall Business Publishing Accounting Information Systems, /e Romney/Steinbart 4 of 96 4

Advantages over simply following normalization rules: Semantic data modeling uses the designer s knowledge about business processes and practices; it therefore facilitates efficient design of transaction processing s. e resulting graphical model explicitly represents information about the organization s business processes and policies and facilitates communication with intended users. AND HE FUURE OF ACCOUNING Database systems may profoundly affect the fundamental nature of accounting: May lead to abandonment of double-entry accounting, because the redundancy of the double entry is not necessary in computer data processing. May also alter the nature of external reporting. EXAMPLE: External users could have access to the company s and manipulate the data to meet their own reporting needs. 008 Prentice Hall Business Publishing Accounting Information Systems, /e Romney/Steinbart of 96 008 Prentice Hall Business Publishing Accounting Information Systems, /e Romney/Steinbart 6 of 96