Top Banner
Databases
18
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: Databases

Databases

Page 2: Databases

2

IntroductionDatabase: an organized collection of dataDatabase management system (DBMS):

group of programs to manage databaseManipulates databaseProvides an interface between database and

the user of the database and other application programs

Database administrator (DBA): skilled IS professional who directs all activities related to an organization’s database

Page 3: Databases

3

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

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: Databases

4

The Database Approach“Traditional” (ie-OLD) approach to database

management: separate data files are created for each applicationResults in data redundancy (duplication)Data redundancy conflicts with data integrity

Database approach to database management: pool of related data is shared by multiple applicationsSignificant advantages over traditional

approach

Page 5: Databases

5

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 System

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 6: Databases

6

Strengths of the database approach

Reduced data

redundancy

Reduced data

redundancy Improved data

integrity

Improved data

integrityShared

dataShared

dataEasier access

Easier access

Reduced development

time

Reduced development

time

Page 7: Databases

7

The Hierarchy of DataField: typically a name, number, or

combination of characters that describes an aspect of a business object or activity

Record: a collection of related data fieldsFile: a collection of related recordsDatabase: a collection of integrated and

related files

Hierarchy of data: Fields records files

databases

Page 8: Databases

8

Relational DatabasesMS-Access is an example of a relational

database

Some terminology differences in relational databases:

Record equates to a RowField equates to a Column

Page 9: Databases

9

File KeysKey: field or set of fields in a record that is

used to identify the recordPrimary key: field or set of fields that

uniquely identifies the record

Page 10: Databases

10

3. Design the records and fields for each table

2. Design the tables

1. Determine the purpose of the database1. Determine the purpose of the database

4. Determine the relationships among the tables

4. Determine the relationships among the tables

Design tables on paper first Each table should contain

data about one subject

Database Administration

Be sure every record has a unique primary key

Use separate fields for logically distinct items

Do not create fields for information that can be derived from entries in other fields

Allow enough space for each field Set default values for frequently

entered data

Page 11: Databases

11

Data Integrity

Degree to which data is correct

Garbage in, garbage out (GIGO)—computer phrase that means you cannot create correct information from incorrect data

Garbage out

Garbage in

Data integrity is lost

Page 12: Databases

12

UsefulUsefulAccessibleAccessible

OrganizedOrganized

Qualities of Valuable Information

TimelyTimely

VerifiableVerifiable

AccurateAccurate

Cost-effectiveCost-effective

Page 13: Databases

13

Manipulating Data and Generating ReportsQuery-By-Example (QBE): a visual

approach to developing database queries or requests

Structured Query Language (SQL): standard query language for relational databases

Database programs can produce reports, documents, and other outputs

Page 14: Databases

14

Queries 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 15: Databases

15

Structured Query Language (SQL)?• Allows you to manage, update, and retrieve data

• Has special keywords and rules included in SQL statements

SQL statement

SQL statement results

Page 16: Databases

16

Database Security

Read-only privileges -

user can view data, but cannot change it

Read-only privileges -

user can view data, but cannot change it

DBMS provides means to ensure only authorized users can access

data

DBMS provides means to ensure only authorized users can access

data

Access privileges

define activities that specific user or group of users

can perform

Access privileges

define activities that specific user or group of users

can perform

Full-update privileges -

user can view and

change data

Full-update privileges -

user can view and

change data

Page 17: Databases

17

Data Warehouse/Data Mining/Data Mart

Data mart is smaller version of data warehouse

Uses multidimensional databases

Often uses a process called data mining to find patterns and relationships among data

Data warehouse: database system that stores and manages data required to analyze historical and current transactions

Quick and efficient way to access large amounts of data

Page 18: Databases

18

Quote

Alice came to a fork in the road. "Which road do I take?" she asked.

"Where do you want to go?" responded the Cheshire cat.

"I don't know," Alice answered.

"Then," said the cat, "it doesn't matter.“

~Lewis Carroll, Alice in Wonderland