41
Introduction to Database Changes and new experience make life delightful. Unanimous

TID Chapter 10 Introduction To Database

Embed Size (px)

Citation preview

Page 1: TID Chapter 10 Introduction To Database

Introduction to Database

Changes and new experience make life delightful.

Unanimous

Page 2: TID Chapter 10 Introduction To Database

Data and Information

How are data and information related?

Next

processing

data stored on diskStep 1. The member data, including a photograph, is entered and stored on the hard disk.

Step 2. The computer extracts the member data from disk.

Step 3. The receipt is created and printed.

Data is raw facts Information is data that is organized

and meaningful

receipt

Computers process data into information

Page 3: TID Chapter 10 Introduction To Database

Add, change,

and delete data

Add, change,

and delete data

CreatedatabaseCreate

database

Sort and

retrieve data

Sort and

retrieve data

Createforms and

reports

Createforms and

reports

Data and Information

What is a database?

Next

Database software allows you to

Database software allows you to

Collection of data organized so

you can access, retrieve, and

use it

Collection of data organized so

you can access, retrieve, and

use it

Database software also called database management system

(DBMS)

Database software also called database management system

(DBMS)

Page 4: TID Chapter 10 Introduction To Database

To create a database, designers must develop a conceptual design and a physical design

Conceptual design: An abstract model of a database from the user or business perspective.

Physical design: Layout that shows how a database is actually arranged on storage devices.

Creating the Database

Page 5: TID Chapter 10 Introduction To Database

Entity-relationship modeling: The process of designing a database by organizing data entities to be used and identifying the relationships among them.

Entity-relationship (ER) diagram: Document that shows data entities and attributes and relationships among them.

Entity classes: A grouping of entities of a given type.Instance: A particular entity within an entity class.

Page 6: TID Chapter 10 Introduction To Database

Identifier: An attribute that identifies an entity instance.

Relationships: The conceptual linking of entities in a database.

The number of entities in a relationship is the degree of the relationship. Relationships between two items are common and are called binary relationships.

Page 7: TID Chapter 10 Introduction To Database

There are three types of binary relationships: In a 1:1 (one-to-one) relationship, a single-entity

instance of one type is related to a single-entity instance of another type.

In a 1: M (one-to-many) relationship, a single-entity instance of one type is related to many-entity instance of another type.

In a M:M (many-to-many) relationship, a single-entity instance of one type is related to many-entity of another type and vice versa.

Page 8: TID Chapter 10 Introduction To Database

Entity- relationship diagram model

Page 9: TID Chapter 10 Introduction To Database

Normalization

A method for analyzing and reducing a relational database to its most streamlined form for minimum redundancy, maximum data integrity, and best processing performance

Page 10: TID Chapter 10 Introduction To Database

Non-normalized relation

Page 11: TID Chapter 10 Introduction To Database

Normalized relation

Page 12: TID Chapter 10 Introduction To Database

Physical view: The plan for the actual, physical arrangement and location of data in the direct access storage devices (DASDs) of a database management system.

Logical view: The user’s view of the data and the software programs that process that data in a database management system.

Page 13: TID Chapter 10 Introduction To Database

The Hierarchy of Data

What is a hierarchy?

Next

Database contains files, file contains records, record contains fields, field contains characters

Page 14: TID Chapter 10 Introduction To Database

The Hierarchy of Data

What is a field?

Next

Combination of one or more characters

Smallest unit of data user accesses Field size defines the maximum

number of characters a field can contain

Field name uniquely identifies each field

Data type specifies kind of data field contains

Page 15: TID Chapter 10 Introduction To Database

Yes/NoYes/No(also called Boolean)

—only the values Yes or No (or True

or False)

HyperlinkHyperlinkWeb address that links to document or Web page

ObjectObject(also called BLOB for binary large object)—photograph, audio, video,

or document created in other application such as word processing or spreadsheet

The Hierarchy of Data

What are common data types?

Next

CurrencyCurrencydollar and cent amounts or

numbers containing decimal values

DateDatemonth, day, year, and

sometimes time

MemoMemolengthy text entries

TextText(also called

alphanumeric)—letters, numbers, or special

characters

NumericNumericnumbers

only

AutoNumberAutoNumberunique number automatically assigned to each new record

Page 16: TID Chapter 10 Introduction To Database

The Hierarchy of Data

What is a record?

Next

Group of related fields

Key field, or primary key, uniquely identifies each record

Page 17: TID Chapter 10 Introduction To Database

The Hierarchy of Data

What is a data file?

Next

Collection of related records stored on disk

key field

records fields

22 Fifth Avenue

P.O. Box 45

15 Duluth Street

33099 Clark Street

1029 Wolf Avenue

Address

Auburn

Clanton

Prattville

Montgomery

Montgomery

City

ALWeinbergJonah3928

ALMarcus4872

ALValesquezAdrian3376

ALMurrayShannon2928

ALVandenbergDonna2295

StateLast NameFirst NameMember ID

Green

Page 18: TID Chapter 10 Introduction To Database

Isolated data—data stored

in separate files so it is difficult to

access

Isolated data—data stored

in separate files so it is difficult to

access

File Processing Versus DatabasesWhat is a file processing system?

Next

Data redundancy—

same fields stored in

multiple files

Data redundancy—

same fields stored in

multiple files

Each department or

area within organization

has own set of files

Each department or

area within organization

has own set of files

May have weaknessesMay have

weaknesses

Records in one file may not relate to

records in any other file

Records in one file may not relate to

records in any other file

Page 19: TID Chapter 10 Introduction To Database

File Processing Versus DatabasesWhat is the database approach?

Next

Many programs and users can share data in database Secures data so only authorized users can access

certain data

Page 20: TID Chapter 10 Introduction To Database

File Processing Versus DatabasesWhat are the strengths of the database approach?

Next

Reduced data

redundancy

Reduced data

redundancy Improved data

integrity

Improved data

integrityShared

dataShared

dataEasier accessEasier access

Reduced development

time

Reduced development

time

Page 21: TID Chapter 10 Introduction To Database

File Processing Versus DatabasesHow do a database application and a file processing application differ in the way they store data?

Next

Page 22: TID Chapter 10 Introduction To Database

Database Management Systems

What are popular database management systems (DBMSs)?

Next

Personal computer, midrange server, mainframe

IBM CorporationDB2

Personal computer, midrange server, mainframe

IBM CorporationInformix

ServerMicrosoft CorporationSQL Server

Personal computer, midrange server, PDA

Sybase Inc.Sybase

Personal computer, midrange server, mainframe, PDA

Oracle CorporationOracle

Personal computer, midrange server, mainframe

Computer Associates International, Inc.

Ingres

Personal computer, server, PDAMicrosoft CorporationAccess

Computer TypeManufacturerDatabase

Page 23: TID Chapter 10 Introduction To Database

Database Management Systems

What is a data dictionary?

Next

Contains data about each file in database and each field within those files

Page 24: TID Chapter 10 Introduction To Database

Database Management Systems

What is Structured Query Language (SQL)?

Next

Allows you to manage, update, and retrieve data Has special keywords and rules included in SQL

statementsSQL statement

SQL statement results

Page 25: TID Chapter 10 Introduction To Database

Database Management Systems

What is a query?

Next

Request for specific data from a database

Query language consists of simple, English-like statements that allow users to specify data to display, print, or store

Step 1. Select the fields you want to display in the resulting query.

Step 2. Assign a name to the query, so you can open it later.

Step 3. View query on the screen.

Page 26: TID Chapter 10 Introduction To Database

Database Management Systems

What is a query by example (QBE)?

Next

Program retrieves records that match criteria entered in form fields

Query by example screen

criteriaQuery results

Has a graphical user interface that assists users with retrieving data

Page 27: TID Chapter 10 Introduction To Database

Database Management Systems

What is a form?

Next

Window on screen that provides areas for entering or changing data in database

Used to retrieve and maintain data in a database

Form that sends data across network or Internet is called e-form, short for electronic form

Page 28: TID Chapter 10 Introduction To Database

Database Management Systems

What is a report generator?

p. 532 Fig. 10-16 Next

Allows user to design a report on screen, retrieve data into report design, then display or print reports

Also called report writer

Page 29: TID Chapter 10 Introduction To Database

What is a data model?

p. 534 Fig. 10-18 Next

Rules and standards that define how database organizes data

Defines how users view organization of data

The three most common data models are hierarchical, network, and relational.

Other types of data models include multidimensional, object-relational, hypermedia, embedded, and virtual

DATA MODELS FOR POPULAR DBMSs

Data model

Page 30: TID Chapter 10 Introduction To Database

Relational database

What is a relational database?

Next

Stores data in tables that consist of rows and columns Each row has primary key Each column has unique name

Stores data relationships Uses specialized terminology

DATA TERMINOLOGY

Page 31: TID Chapter 10 Introduction To Database

Relational database

What is a relationship?

Next

Connection within data

Page 32: TID Chapter 10 Introduction To Database

Hierarchical database model rigidly structures data into an inverted “tree” in which each record contains two elements, a single root or master field, often called a key, and a variable number of subordinate fields.

The strongest advantage of the hierarchical database approach is the speed and efficiency with which it can be searched for data.

The hierarchical model does have problems: Access to data in this model is predefined by the database administrator before the programs that access the data are written. Programmers must follow the hierarchy established by the data structure.

Hierarchical Database Model

Page 33: TID Chapter 10 Introduction To Database

Hierarchical Database model

Page 34: TID Chapter 10 Introduction To Database

Data model that creates relationships among data in which subordinate records can be linked to more than one data element.

Network Database Model

Page 35: TID Chapter 10 Introduction To Database
Page 36: TID Chapter 10 Introduction To Database

Advantages and Disadvantages of Logical Data Models

Model Advantages Disadvantages

Hierarchical database Searching is fast and efficient. Access to data is predefined by exclusively hierarchical relationships, predetermined by

administrator. Limited search/query

flexibility. Not all data are naturally

hierarchical.

Network Many more relationships can be defined. There is greater speed and efficiency than with relational database models.

This is the most complicated database model to design, Implement, and maintain.Greater query flexibility than withhierarchical model, but less than with relational model.

Relational database Conceptual simplicity; there are no predefined relationships among data. High flexibility in ad-hoc querying. New data and records can be added easily.

Processing efficiency and speed are lower. Data redundancy is common, requiring additional maintenance.

Page 37: TID Chapter 10 Introduction To Database

Emerging Data Models

Two emerging data models are the object-relational and hypermedia models Object-relational database model: Data model that adds

new object storage capabilities to relational databases. Hypermedia database model: Data model that stores

chunks of information in nodes that can contain data in a variety of media; users can branch to related data in any kind of relationship.

Page 38: TID Chapter 10 Introduction To Database

Specialized Database Models

Geographical information database: Data model that contains locational data for overlaying on maps or images.

Knowledge database: Data model that can store decision rules that can be used for expert decision making.

Page 39: TID Chapter 10 Introduction To Database

Small-footprint database: The subset of a larger database provided for field workers.

Embedded database: A database built into devices or into applications; designed to be self-sufficient and to require little or no administration.

Virtual database: A database that consists only of software; manages data that can physically reside anywhere on the network and in a variety of formats.

Page 40: TID Chapter 10 Introduction To Database

What is an object-oriented database (OODB)?

Next

Advantages

Often uses object query language (OQL)

Stores data in objectsObject is item that contains data, as well as actions that read or process data

Can store more types of dataCan access data faster

Page 41: TID Chapter 10 Introduction To Database

What are examples of applications appropriate for an object-oriented database?

Next

Multimedia databasesMultimedia databases

Store images, audio clips, and/or video clips

Store images, audio clips, and/or video clips

Groupware databasesGroupware databases

Store documents such as schedules, calendars, manuals,

memos, and reports

Store documents such as schedules, calendars, manuals,

memos, and reportsComputer-aided design (CAD) databasesComputer-aided design (CAD) databases

Store data about engineering, architectural,

and scientific designs

Store data about engineering, architectural,

and scientific designs

Hypertext databasesHypertext databases

Contain text links to other documentsContain text links to other documents

Hypermedia databasesHypermedia databases

Contain text, graphics, video, and sound

Contain text, graphics, video, and sound

Web databasesWeb databases

Link to e-form on Web pageLink to e-form on Web page