Chapter 5 – Storing and Organizing Information Information Systems, First Edition John Wiley &...

31
Chapter 5 – Storing and Organizing Information Information Systems, First Edition John Wiley & Sons, Inc by France Belanger and Craig Van Slyke Contributor: Brian West, University of Louisiana at Lafayette 5-1 Copyright 2012 John Wiley & Sons, Inc.

Transcript of Chapter 5 – Storing and Organizing Information Information Systems, First Edition John Wiley &...

Chapter 5 – Storing and Organizing Information

Information Systems, First Edition John Wiley & Sons, Inc

by France Belanger and Craig Van SlykeContributor: Brian West, University of Louisiana

at Lafayette

5-1Copyright 2012 John Wiley & Sons, Inc.

Learning Objectives

• Decide whether it is better to store data using a database management system or a spreadsheet.

• Discuss the purpose of a database management system

• Explain the basic structure and components of relational databases

• Describe the purpose of foreign keys in a relational database

• Discuss the purpose of a relational database schema and explain its notation

• List and describe a number of online databases

5-2Copyright 2012 John Wiley & Sons, Inc.

The database behind FacebookOdds are you are one of the over 500 million active users of Facebook.Keeping track of all of this information requires a very complex database design, in addition to a robust infrastructure. Facebook uses a variety of tools to create and manage their data.•Almost 1 billion objects, such as pages, groups, events and communities•Over thirty billion pieces of content, including links, posts, photos, notes, videos and new stories.•Friend connections among the over 500 million active users. The average user has well over 100 friends.

5-3Copyright 2012 John Wiley & Sons, Inc.

Focusing Questions

• Identify the information elements that are part of a Facebook profile.

• What information do you think Facebook uses to determine what friend suggestions to make?

5-4Copyright 2012 John Wiley & Sons, Inc.

Data for an Amazon order

Suppose you are ordering something from Amazon. What pieces of data does Amazon need to carry out your order. •For example, Amazon would need your name. •What other data elements does Amazon need?

5-5Copyright 2012 John Wiley & Sons, Inc.

Databases vs. spreadsheets

Spreadsheets are fine for very simple data storage tasks, such as keeping simple lists, like a personal contact list or a home inventory, but , spreadsheets have a number of limitations.• • • • •

5-6Copyright 2012 John Wiley & Sons, Inc.

Spreadsheets

Strengths•

• Relatively easy to use • Require less planning •

Weaknesses•

• Formulas could be incorrect• Out of date version • Out of date data

5-7Copyright 2012 John Wiley & Sons, Inc.

Databases

Strengths•

• Data is of higher quality than data stored in spreadsheets

Weaknesses• Requires more planning and

designing• More complicated

5-8Copyright 2012 John Wiley & Sons, Inc.

Databases and Database Management Systems

A ____________ is an organized collection of data. •These databases can store different types of “information” including text, numbers, documents, images and videos. Databases are managed by __________________________ (DBMS). •A database management system provides the means for creating, maintaining and using databases.

5-9Copyright 2012 John Wiley & Sons, Inc.

Database Management Systems (DBMS)

• Professional database designers and administrators handle the creation and maintenance tasks in most organizations.

• Smaller database-oriented tasks can be handled by personal DBMS, such as Microsoft Access

• Larger, more complex databases require enterprise-level DBMS, such as Oracle, MySQL, Microsoft SQL Server, and IBM’s DB2

5-10Copyright 2012 John Wiley & Sons, Inc.

Databases

• Databases are integral elements of information systems.

• Most information systems today use multi-tiered architectures that divide processing into different elements.

• Applications handle the processing of data, while the DBMS is responsible for managing the data.

5-11Copyright 2012 John Wiley & Sons, Inc.

Multi-tiered Architecture

Figure 5.1 – Interaction between Applications and Databases5-12Copyright 2012 John Wiley & Sons, Inc.

Relational Databases

• A _________________ stores data in the form of connected tables. Tables are made up of records (rows) and fields (columns).

• A ____________ is a set of fields that all pertain to the same thing, while the fields represent some characteristic of the thing.

• A _____________ represents some characteristic of the thing

5-13Copyright 2012 John Wiley & Sons, Inc.

Relational Databases

InstructorID LastName FirstName Email

1 Smith Sadie [email protected]

2 Jones Maggie [email protected]

3 Thurman Annie [email protected]

4 Wilson Fred [email protected]

Figure 5.2 – Instructor Table5-14Copyright 2012 John Wiley & Sons, Inc.

Primary Key

In order for database to work, we need some way to uniquely identify each record. •This unique identifier is called the ____________ .•Each table in a database has a primary key.•Sometimes a primary key is made up of more than one field, called a composite primary key.

5-15Copyright 2012 John Wiley & Sons, Inc.

Foreign Keys

Connections are implemented by foreign keys•_______________ are fields that reference a primary key in a related table. •This cross-referencing is called a relationship. •Cross-referencing foreign keys make it easy to combine data contained in multiple tables.

5-16Copyright 2012 John Wiley & Sons, Inc.

Related Tables

Figure 5.3 – A small Database5-17Copyright 2012 John Wiley & Sons, Inc.

Normal Forms

There are some rules that govern relational database design called “normal forms”•These rules are in place to ensure data consistency by eliminating unnecessary redundancy. •A particular row in a table can be related to at most one row in a related table.•For example, in most businesses a specific order can only be related to one customer.

5-18Copyright 2012 John Wiley & Sons, Inc.

Normal Forms

Copyright 2012 John Wiley & Sons, Inc. 5-19

SectionID CourseID CourseTitle InstructorID LastName FirstName

1001 IT101 Introduction to IT 1 Smith Sadie

1002 IT101Introduction to Computers 3 Thurman Maggie

1003 IT320Database Administration 1 Jackson Sadie

1004 IT400 Systems Analysis 4 Wilson Fred

1005 IT600 IT Management 4 Wilson Fred

Figure 5.4 – Redundancy Example

Normal Forms

• What is Instructor #1’s last name? • This instructor’s last name is “Smith” in the

first row, and Jackson in the third row. • This inconsistency, which we call an anomaly,

results from storing the instructor’s name in multiple rows.

• If you only store a data element in one place, you cannot have inconsistent values.

Copyright 2012 John Wiley & Sons, Inc. 5-20

Relationships

• Many-to-many relationships also exist• In many-to-many relationships a specific row

can be related to multiple rows in a related table.

• In contrast to the one-to-many relationship, this is true in both directions.

• Many-to-many relationships require creating a new table that links the two related tables.

• These are called linking or intersection tables.

Copyright 2012 John Wiley & Sons, Inc. 5-21

Linking Tables

Copyright 2012 John Wiley & Sons, Inc. 5-22

Figure 5.5 – Many-to-many, linking table example

Relationships

• Although they are more unusual, one-to-one relationships also exist.

• These relationships a specific row in a table can be related to at most one row in a related table

• This is true in both directions of the relationship

Copyright 2012 John Wiley & Sons, Inc. 5-23

Database Diagrams

As you might imagine, using the actual data to show the structure of a database only works for very small databases. For larger databases, we illustrate structure using database schema diagrams.• •

Copyright 2012 John Wiley & Sons, Inc. 5-24

Database Diagrams

Copyright 2012 John Wiley & Sons, Inc. 5-25

Figure 5.6 – Database Diagram

Finding business databases online

Your campus library likely has a variety of business-related online databases. . Identify and briefly describe one database for each of the related purposes.•Economic statistics•Industry information•Demographic statistics•Business-related news articles.

Copyright 2012 John Wiley & Sons, Inc. 5-26

Online databases

We have primarily discussed relational databases that store text and numeric data related to business operations. •Online databases that are quite useful for performing research•Databases serve a different purpose than the databases we discussed earlier•These online databases contain pointers to sources of information.•Most of these resources are available through libraries.

Copyright 2012 John Wiley & Sons, Inc. 5-27

Online databases• Career research– The United States Bureau of Labor Statistics (

http://www.bls.gov/data/)• Preparing for a job interview– Article databases such as ABI/Inform and LexisNexis

Academic are useful for finding news articles about the company and its executives

• Gathering information on customers or competitors– Hoovers.com provides extensive information about

companies and industries.

Copyright 2012 John Wiley & Sons, Inc. 5-28

Summary• Spreadsheets are good for storing simple lists of

information. • Database management systems provides the

means for creating, maintaining and using databases.

• A relational database stores data in the form of connected tables. Tables are made up of records and fields.

• In a relational database a record is a set of fields that all pertain to the same thing, while the fields represent some characteristic of the thing.

Copyright 2012 John Wiley & Sons, Inc. 5-29

Summary

• In a relational database, foreign keys are fields that reference the primary keys in related tables.

• A database diagram shows the logical structure of a relational database, including its tables, fields and the relationships among tables.

• The are many online databases that store a vast array of information. These databases include article databases, market and economic databases and databases of demographic and governmental information, among other topics

Copyright 2012 John Wiley & Sons, Inc. 5-30

Copyright 2012 John Wiley & Sons, Inc. All rights reserved. Reproduction or translation of this work beyond that permitted in section 117 of the 1976 United States Copyright Act without express permission of the copyright owner is unlawful. Request for further information should be addressed to the Permissions Department, John Wiley & Sons, Inc. The purchaser may make back-up copies for his/her own use only and not for distribution or resale. The Publisher assumes no responsibility for errors, omissions, or damages caused by the use of these programs or from the use of the information herein.

5-31Copyright 2012 John Wiley & Sons, Inc.