0% found this document useful (0 votes)
33 views21 pages

AIMP339 Material 1

Uploaded by

Mitche Galecia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views21 pages

AIMP339 Material 1

Uploaded by

Mitche Galecia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

ER Diagrams, SQL and

Data Management Systems

© 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or
duplicated, or posted to a publicly accessible website, in whole or in part.
Flat-File Versus Database
Environments
� Computer processing involves two components: data and
instructions (programs).
� Conceptually, there are two methods for designing the
interface between program instructions and data:
◦ File-oriented processing: A specific data file was created
for each application.
◦ Data-oriented processing: Create a single data repository
to support numerous applications.
� Disadvantages of file-oriented processing include
◦ redundant data and programs
◦ varying formats for storing the redundant data

© 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or
duplicated, or posted to a publicly accessible website, in whole or in part. Hall, 3e 1
Data Redundancy and Flat-File Problems
Data Storage - creates excessive storage costs of
paper documents and/or magnetic form.
Data Updating - any changes or additions must be
performed multiple times.
Currency of Information – has the potential
problem of failing to update all affected files.
Task-Data Dependency - user unable to obtain
additional information as his or her needs change

© 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or
duplicated, or posted to a publicly accessible website, in whole or in part. Hall, 3e 2
Flat-File Data Management
User 1 Data
Transactions
Program 1
A,B,C
User 2
Transactions
Program 2
X,B,Y
User 3
Transactions
Program 3
L,B,M

© 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or
duplicated, or posted to a publicly accessible website, in whole or in part. Hall, 3e 3
Traditional Flat File

© 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or
duplicated, or posted to a publicly accessible website, in whole or in part. Hall, 3e 4
© 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or
duplicated, or posted to a publicly accessible website, in whole or in part. 5
The Database Concept
User 1
Database
Transactions
Program 1
A,
User 2
D B,
Transactions B C,
Program 2 M X,
S Y,
User 3 L,
Transactions M
Program 3

© 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or
duplicated, or posted to a publicly accessible website, in whole or in part. Hall, 3e 6
Elements of the Database Environment

© 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or
duplicated, or posted to a publicly accessible website, in whole or in part. Hall, 3e 7
Overview of DBMS Operation

© 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or
duplicated, or posted to a publicly accessible website, in whole or in part. Hall, 3e 8
© 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or
duplicated, or posted to a publicly accessible website, in whole or in part. Hall, 3e 9
Human Resource Database

© 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or
duplicated, or posted to a publicly accessible website, in whole or in part. Hall, 3e 10
© 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or
duplicated, or posted to a publicly accessible website, in whole or in part. Hall, 3e 11
Database Terminology
� Data Attribute/ Field: a single item of data
� Entity: database representation of an individual
resource, event, or agent about which we choose to
collect data
� Record Type: table or file
� Database: the set of record types that an organization
needs to support its business processes

© 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or
duplicated, or posted to a publicly accessible website, in whole or in part. Hall, 3e 12
• Relational DBMS
– Represent data as two-dimensional tables
– Each table contains data on entity and attributes

• Table: grid of columns and rows


– Rows (tuples): Records for different entities
– Fields (columns): Represents attribute for entity
– Key field: Field used to uniquely identify each record
– Primary key: Field in table used for key fields
– Foreign key: Primary key used in second table as look-up field to
identify records from original table
• Operations of a Relational DBMS
– Three basic operations used to develop useful
sets of data
• SELECT: Creates subset of data of all records that
meet stated criteria
• JOIN: Combines relational tables to provide user with
more information than available in individual tables
• PROJECT: Creates subset of columns in table,
creating tables with only the information specified
© 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or
duplicated, or posted to a publicly accessible website, in whole or in part. Hall, 3e 15
Advantages of the Database Approach
Data sharing/centralized database resolves flat-file problems:
No data redundancy: Data is stored only once, eliminating data
redundancy and reducing storage costs.
Single update: Because data is in only one place, it requires
only a single update, reducing the time and cost of keeping the
database current.
Current values: A change to the database made by any user
yields current data values for all other users.
Task-data independence: As users’ information needs expand,
the new needs can be more easily satisfied than under the
flat-file approach.

© 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or
duplicated, or posted to a publicly accessible website, in whole or in part. Hall, 3e 16
Creating a Table

© 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or
duplicated, or posted to a publicly accessible website, in whole or in part. Hall, 3e 17
Query Language
� The query capability permits end users and
professional programmers to access data in the
database without the need for conventional
programs.
◦ Can be an internal control issue since users may be making
an ‘end run’ around the controls built into the conventional
programs
� IBM’s structured query language (SQL) is a
fourth-generation language that has emerged as the
standard query language.
◦ Adopted by ANSI as the standard language for all
relational databases

© 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or
duplicated, or posted to a publicly accessible website, in whole or in part. Hall, 3e 18
© 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or
duplicated, or posted to a publicly accessible website, in whole or in part. Hall, 3e 19
Aggregate

© 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or
duplicated, or posted to a publicly accessible website, in whole or in part. Hall, 3e 20

You might also like