Vous êtes sur la page 1sur 29

Chapter 5

Foundation of Business Intelligence:

Data Bases and Information Management

5.1 3.1

2007 by Prentice Hall

DATA BASE New Words


Database

Table
Relational database Database Management system (DBMS) Field Field data types

Record
Primary key / Foreign key

3.2

2007 by Prentice Hall

DATA BASE

Database - Is an organized collection of related information about any subject. - A DB does not have to be kept on a computer. - For example, telephone directory, train timetable, etc. These are all examples of paper based DB. - One of the most successful databases in modern history is the telephone book. The telephone book is a collection of records on people and businesses who have telephones. The telephone book lists four pieces of information for each phone user: last name, first name, address, and phone number. It also contains information on businesses and business categories, such as auto dealers or plumbing suppliers. Prior to the development of digital databases, a business would use large filing cabinets filled with paper files. You can still find paper-based manual databases in most doctors offices where patient records are stored in thousands of paper files.
3.3
2007 by Prentice Hall

Essentials of Business Information Systems


Chapter 5 Foundation of Business Intelligence: Data Bases and Information Management

The Database Approach to Data Management Needless to say, paper-based databases are extremely inefficient and costly to maintain, often contain inaccurate data, are slow, and make it difficult to access the data in a timely fashion.

Why use an electronic DB? - Storing DB on a computer Electronic DB, enables you to manipulate large quantities of information easily updating, flexibly, quickly, easy searching, DB sharing, etc.

5.3 3.4

2007 by Prentice Hall

DATA BASE New Words


Field A single piece of information about an item or an attribute. It is the space where that information is held. Field data type Controls the kind of data that may be entered into fields. Record One complete set of fields relating to the same item. Each record has a unique identifier known as a PK. Primary key A field (or combination of fields) in a database record that is used to identify that record quickly.
3.5
2007 by Prentice Hall

DATA BASE New Words


Table
A collection of records that contain the same fields. A database contains more than one table.

Foreign key
A field (or combination of fields) in a database record that is used as a primary key for another table.

Relational Database
Databases are made up of a number of related tables.

Database
Is an organized collection of related Files / information about any subject.

3.6

2007 by Prentice Hall

Database Management system (DBMS)


An application such as ORACLE or SQL or M/S Access that enables you to create and manage a database on a computer.

Database Pyramid
- DB holds tables. - Tables hold a number of records. - Each record has a number of fields. - A field contains data and has a data type and a picture.
3.7
2007 by Prentice Hall

Advantages of relating tables in a DB


Imagine a situation where a company wants to keep records of customer orders. In flat DB, full customer details, including the customer name, address, contact person, phone number, etc must be entered into the DB each time an order is received. When thousands of orders come in from customers, their details are duplicated unnecessarily many times in the DB. Imagine also what happens when we need to update the addresses and phone numbers of some customers. We must update them in every record where they occur. When we have related tables relational DB we can cut all this extra work and duplication very easily.

3.8

2007 by Prentice Hall

Advantages of relating tables in a DB


Customers Table;
Cust ID HLT MRD MRT Order ID 1 2 3 4
3.9

contains all customer details.

Cust name Contact pers. Tel. Address Hilton Hotel Noha 123 abcdefgh Mereidian Kareem 456 adasdsd Maryott Mirna 987 bnvccvbv contains all orders details. Ord date 1/1/2013 1/1/2013 8/1/2013 15/1/2013 Required date 1/1/2013 5/1/2013 14/1/2013 25/1/2013 Quantity Item 100 Pepsi 40 Cake 70 7up 10 Milk
2007 by Prentice Hall

Orders Table;
Cust ID HLT MRD HLT MRT

Advantages of relating tables in a DB


Now when ever we enter a new order in the orders table, the the only customer detail we enter is the customer id. When we need to update a customer phone number, we do so just once in the customers table.

This greatly:
Minimizes the size of our DB. Enhance the response time of the DB application. Minimizes the work involved in entering new records. Minimizes the work involved in editing existing records.

3.10

2007 by Prentice Hall

Essentials of Business Information Systems


Chapter 5 Foundation of Business Intelligence: Data Bases and Information Management

The Database Approach to Data Management Entities and Attributes


How do you start thinking about the data for your business and how to manage them? If youre starting up or running a business, youll have to identify the data youll need to run your business.

Typically, youll be using data about focus points such as customers, suppliers, employees, orders, products, shippers, and perhaps parts.
Each of these generalized categories representing a person, place, or thing on which we store and maintain information is called an entity.

Each entity has specific characteristics, called attributes. For example, the entity SUPPLIER has specific attributes, such as the suppliers name and address.
5.5 3.11
2007 by Prentice Hall

Essentials of Business Information Systems


Chapter 5 Foundation of Business Intelligence: Data Bases and Information Management

The Database Approach to Data Management A Relational Database Table

The actual information about a single supplier that resides in a table is called a row. Rows are commonly referred to as records. 5.8 3.12
2007 by Prentice Hall

Essentials of Business Information Systems


Chapter 5 Foundation of Business Intelligence: Data Bases and Information Management

The Database Approach to Data Management Organizing Data in a Relational Database


Note that there is a field for Supplier_Number in this table. This field uniquely identifies each record so that the record can be retrieved, updated, or sorted and it is called a key field. Each table in a relational database has one field that is designated as its primary key. This key field is the unique identifier for all the information in any row of the table and this primary key cannot be duplicated. We could use the suppliers name as a key field. However, if two different suppliers had the same name, supplier name would not uniquely identify each, so it is necessary to assign a special identifier field for this purpose. For example, using a unique Supplier_Number, such confusion is prevented.
5.9 3.13
2007 by Prentice Hall

Essentials of Business Information Systems


Chapter 5 Foundation of Business Intelligence: Data Bases and Information Management

The Database Approach to Data Management Organizing Data in a Relational Database So far the SUPPLIER table doesnt have any information about the parts that a particular supplier provides for your company. PART is a separate entity from SUPPLIER, and

fields with information about parts should be stored in a


separate PART table.

5.12 3.14

2007 by Prentice Hall

Essentials of Business Information Systems


Chapter 5 Foundation of Business Intelligence: Data Bases and Information Management

The Database Approach to Data Management Organizing Data in a Relational Database


Why not keep information on parts in the same table as suppliers? We would be maintaining a great deal of redundant data about suppliers. If we did that, each row of the table would contain the attributes of both PART and SUPPLIER. Because one supplier could supply more than one part, the table would need many extra rows for a single supplier to show all the parts that supplier provided. A separate table, PART, should be created to store these three fields and

solve this problem.

5.14 3.15

2007 by Prentice Hall

Essentials of Business Information Systems


Chapter 5 Foundation of Business Intelligence: Data Bases and Information Management

The Database Approach to Data Management The PART Table


The PART table would also have to contain another field, Supplier_Number, so that you would know the supplier for each part. It would not be necessary to keep repeating all the information about a supplier in each PART record.

Notice that Supplier_Number appears in both the SUPPLIER and PART tables. In the SUPPLIER table, Supplier_Number is the primary key. When the field Supplier_Number appears in the PART table it is called a foreign key. Note that the PART table would itself have its own primary key field, Part_Number, to uniquely identify each part.

5.13 3.16

2007 by Prentice Hall

Essentials of Business Information Systems


Chapter 5 Foundation of Business Intelligence: Data Bases and Information Management

The Database Approach to Data Management Organizing Data in a Relational Database As we organize data into tables, its important to make sure that all the attributes for a particular entity apply only to that entity.

5.18 3.17

2007 by Prentice Hall

Essentials of Business Information Systems


Chapter 5 Foundation of Business Intelligence: Data Bases and Information Management

The Database Approach to Data Management Establishing Relationships Now that weve broken down our data into a SUPPLIER table and a PART table, we must make sure we understand the relationship between them. An entity-relationship diagram is used to clarify table relationships in a relational database. The most important piece of information provided by an entityrelationship diagram is the manner in which two tables are related to each other. Tables in a relational database may have one-to-one, one-to-many, and many-to-many relationships.
5.19 3.18
2007 by Prentice Hall

Essentials of Business Information Systems


Chapter 5 Foundation of Business Intelligence: Data Bases and Information Management

The Database Approach to Data Management A Simple Entity- Relationship Diagram

This diagram shows the relationship between the entities SUPPLIER and PART.

Figure 5-3
2007 by Prentice Hall

5.23 3.19

Essentials of Business Information Systems


Chapter 5 Foundation of Business Intelligence: Data Bases and Information Management

Database Management System Now that youve started creating the files and identifying the data required by your business, youll need a database management system to help you manage and use the data. A database management system (DBMS) is a specific type of software for creating, storing, organizing, and accessing data from a database.

5.36 3.20

2007 by Prentice Hall

Essentials of Business Information Systems


Chapter 5 Foundation of Business Intelligence: Data Bases and Information Management

Database Management System Microsoft Access is a DBMS for desktop systems, whereas DB2, Oracle Database, and Microsoft SQL Server are DBMS for large mainframes and midrange computers. MYSQL is a popular DBMS, and Oracle Database Lite is a DBMS for small handheld computing devices. All of these products are relational DBMS that support a relational database.

5.37 3.21

2007 by Prentice Hall

Essentials of Business Information Systems


Chapter 5 Foundation of Business Intelligence: Data Bases and Information Management

Database Management System The DBMS relieves the end user or programmer from the

task of understanding where and how the data are actually


stored by separating the logical and physical views of the data. data are The logical view presents data as end users or business specialists would perceive them, whereas the

physical view shows how actually organized and


structured on physical storage media, such as a hard disk.
5.38 3.22
2007 by Prentice Hall

Essentials of Business Information Systems


Chapter 5 Foundation of Business Intelligence: Data Bases and Information Management

Database Management System

The database management software makes the

physical database available for different logical


views required by users. For example, for the human resources database illustrated in Figure 5-7, a benefits specialist might require a view consisting of the employees name, social security

number, and health insurance coverage.

5.39 3.23

2007 by Prentice Hall

Essentials of Business Information Systems


Chapter 5 Foundation of Business Intelligence: Data Bases and Information Management

Database Management System

A payroll department member might need data such as the employees name, social security number, gross pay, and net pay. The data for all of

these views are stored in a single database, where it


can be more easily managed by the organization.

5.40 3.24

2007 by Prentice Hall

Essentials of Business Information Systems


Chapter 5 Foundation of Business Intelligence: Data Bases and Information Management

Database Management System Human Resources Database with Multiple Views

A single human resources database provides many different views of data, depending on the information requirements of the user. Illustrated here are two possible views, one of interest to a benefits specialist and one of interest to a member of the companys payroll department.

Figure 5-7
2007 by Prentice Hall

5.41 3.25

Essentials of Business Information Systems


Chapter 5 Foundation of Business Intelligence: Data Bases and Information Management

Database Management System Capabilities of Database Management Systems Querying and Reporting Most DBMS have a specialized language called a data manipulation language that is used to add, change, delete, and retrieve the data in the database. This language contains commands that permit end users and programming specialists to extract data from the database to satisfy information requests and develop applications. The most prominent data manipulation language today is Structured Query Language, or SQL.
5.52 3.26
2007 by Prentice Hall

Essentials of Business Information Systems


Chapter 5 Foundation of Business Intelligence: Data Bases and Information Management

Database Management System Example of an SQL Query

Illustrated here are the SQL statements for a query to select suppliers for parts 137 or 150. They produce a list with the same results as Figure 5-8.

Figure 5-10
2007 by Prentice Hall

5.54 3.27

Essentials of Business Information Systems


Chapter 5 Foundation of Business Intelligence: Data Bases and Information Management

Database Management System Object-Oriented Databases Many applications today and in the future require databases

that can store and retrieve not only structured numbers and
characters but also drawings, images, photographs, voice, and full-motion video. DBMS designed for organizing structured data into rows and columns are not well suited to handling graphics-based or multimedia applications.
Object-oriented databases are better suited for handling graphics-based or multimedia applications.
5.61 3.28
2007 by Prentice Hall

Essentials of Business Information Systems


Chapter 5 Foundation of Business Intelligence: Data Bases and Information Management

Database Management System Object-Oriented Databases

Hybrid object-relational DBMS are now available to provide capabilities of both object-oriented and relational DBMS.

5.63 3.29

2007 by Prentice Hall

Vous aimerez peut-être aussi