Top Banner
Chapter 5 Database Concepts
30

Chapter 5

Mar 15, 2016

Download

Documents

ulric-stone

0. Chapter 5. Database Concepts. Why Study Databases?. All most all Information Systems use an underlying Database to store information Because Databases are v astly superior to spreadsheets and file processing systems. Why Study Databases?. - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Chapter 5

Chapter 5Database Concepts

Page 2: Chapter 5

Why Study Databases?

All most all Information Systems use an underlying Database to store information

Because Databases are vastly superior to spreadsheets and file processing systems

Page 3: Chapter 5

Why Study Databases?

Databases have NOT changed much in almost 40 years. Because it is a great framework for storing data

Overtime, the entire world has embraced the same standard framework Databases will not go away anytime soon.

Page 4: Chapter 5

Foundation Data Concepts

Abstract Concepts Entity – person, place, object or event

– stored as a record or a table row

Attribute – characteristic of an entity

– stored as field or table column

Page 5: Chapter 5

Foundation Data Concepts

Database Concepts Database – a collection of related tables Tables – a collection of related records

– collection of related entities Record – collection of fields (table row)

–represents an entity Field – collection of characters (table column)

– represents an attribute Character – single alphabetic, numeric or other symbol

Large

Small

Page 6: Chapter 5

Fields

Characters “B R E I M E R” form a field

A field is an attribute of an entity

Last Name

Breimer

Page 7: Chapter 5

Records

A bunch of fields form a record

A record is an entity

Last Name

Breimer

First Name

Eric

Sex

Yes

Weight

263

Page 8: Chapter 5

Tables

A bunch of records forms a table

A table is a group of related entities

First Name Last Name Sex Age

Eric Breimer M 46

Joseph Kim M 20

Allie Primo F 21

Page 9: Chapter 5

Databases

A bunch of tables form a database

A database can represent a single business or an entire market

Customer Table

Product Table

Order Table

Page 10: Chapter 5

Databases But, databases are not just a bunch of

tables

A database also includes relationships between the different tables

CustomersCID FName LName Address508 Eric Breimer ...

509 Andrew Zych ...

510 Greg Smith ...

ProductsPID Description Cost199 Viagra $45.99

200 Tooth Paste $2.58

201 Hair Gel $5.99

OrdersOID CID PID Quantity001 508 199 500,000

002 508 201 2

003 510 201 1

Page 11: Chapter 5

Types of Relationships

One to One Examples? Analysis Technique

Consider ThingA and ThingB Can ThingA be related to more than one ThingB? Can ThingB be related to more than one ThingA? If the two answers are NO, then it is a one to one

relationship.

ThingA ThingBRelationship

Man WomanMarried

Page 12: Chapter 5

Types of Relationships

One to Many Examples? Analysis Technique

Consider ThingA and ThingB Can ThingA be related to more than one ThingB? Can ThingB be related to more than one ThingA? If only one answer is yes, then you have a one to

many relationship

FacultyStudentStudentStudent

Advises

Get Advisement

Page 13: Chapter 5

Types of Relationships

Many to Many Examples? Analysis Technique

Consider ThingA and ThingB Can ThingA be related to more than one ThingB? Can ThingB be related to more than one ThingA? If the answers are yes and yes, then the relationship

is many to many.

course has a student

student takes course

CourseStudentStudentStudentCourseStudent

Page 14: Chapter 5

How to Model Relationships

CustomersCID FName LName Address508 Eric Breimer ...

509 Andrew Zych ...

510 Greg Smith ...

ProductsPID Description Cost199 Viagra $45.99

200 Tooth Paste $2.58

201 Hair Gel $5.99

OrdersOID CID PID Quantity001 508 199 500,000

002 508 201 2

003 510 201 1

Page 15: Chapter 5

Find the name and hire date of the manager working on the sales manual project

Page 16: Chapter 5

Traditional File Processing Sucks

File Processing: Data is organized, stored, and processed

in independent files of data records Sometimes the files are spreadsheets Sometimes they can can even be Word or

Text Documents (eeeck!)

Page 17: Chapter 5

Problems of File Processing Data Redundancy –

duplicate data requires update to many files

Lack of Integration – data stored in

separate fileshard to combine data

Data Dependence – changing the file format requires changing the

program…

Page 18: Chapter 5

Database Management Approach Consolidates data records into one CENTRAL

database that can be accessed by many different application programs.

Page 19: Chapter 5
Page 20: Chapter 5

Database Management Software (DBMS)

Definition: Software that controls the creation,

maintenance, and use of databases

Page 21: Chapter 5

DBMS Software Components

Database Definition Language and graphical tools to define

entities, relationships, integrity constraints, and authorization rights

Application Development Graphical tools to develop menus, data entry

forms, and reports

Page 22: Chapter 5

DBMS Software Components

Transaction Processing Controls to prevent interference from

simultaneous users and Controls to recover lost data after a failure

Database Tuning Tools to monitor and improve database

performance

Page 23: Chapter 5

Database Interrogation

Definition: Capability of a DBMS to report information from

the database in response to end users’ requests

Query Language – allows easy, immediate access to ad hoc data requests

Report Generator - allows quick, easy specification of a report format for information users have requested

Page 24: Chapter 5

Natural Language vs. SQL Queries

Page 25: Chapter 5

Schemas

Schema - A description of the database

Subschema – describes a subset of the database and which users have access to this subset

Page 26: Chapter 5

Data Definition Language

Language Used to describe Schemas and Subschemas

Describes relationships between different data

Provides a Logical view of the data

Page 27: Chapter 5

Data Dictionary Entry

A more detailed description of the data in a database

Specifies data types and ranges

Assists programmers in understanding the data

Page 28: Chapter 5

Physical vs. Logical

DBMS concentrate on Physical access to the underlying tables Concurrency control Query’s Creating/deleting

tables

Page 29: Chapter 5

Physical vs. Logical

MIS systems are (Logically) interface with a DBMS monthly reports charts automated inquiries

Page 30: Chapter 5

Application Development

Today, even non-technical staff can use tools to build little programs that use a database. Database Management Systems have all

kinds of tools to develop custom application programs and interfaces.

Example: The College’s MIS (Banner) is actually an application built on top of a Oracle Database.