Lecture 3 Note
Lecture 3 Note
&
Information
Data
Data
A necessity for almost any enterprise to carry out its
Personel file
Database
Database Department file (Project database)
Payroll file
Characters
Characters
(bytes) 1000100 (Letter ‘F’ in ASCII)
(bytes)
Terminology
Database
A collection of integrated and related files
File
A collection of related records
Record
A collection of related fields
Field
A group of characters
Character
Basic building block of information, represented by a byte
Data Entities, Attributes, and Keys
Entity
A generalized class of people, places, or things (objects) for
which data are collected, stored, and maintained
E.g., Customer, Employee
Attribute
A characteristic of an entity; something the entity is identified
by
E.g., Customer name, Employee name
Keys
A field or set of fields in a record that is used to identify the
record
Keys and Attributes
Schematic
The Traditional Approach
Data Files Application programs Users
Payroll Reports
Payroll programs
Invoicing Reports
Invoicing programs
Inventory
Inventory control Reports
control programs
Management
Management inquiries Reports
inquiries programs
Drawbacks
Data redundancy
Duplication of data in separate files
accurate
Program-data dependence
A situation in which program and data organized for
Schematic
Database Approach
Payroll Reports
program
Payroll data
Inventory Inventory
program Reports
data Database
management
Invoicing system
Data Invoicing
Reports
program
Other
data
Other Reports
programs
Data model
A map or diagram of entities and their relationships
Schematic
Attributes
Last name Colour
Entities
First 1 N
Customer Order Product Name
name
1:N one-to-many
relationship
Identification Identification
number number
Hierarchical Database Model
Hierarchical database model
A data model in which data are organized in a top-down, or
inverted tree structure
Projects
Schematic
Relational Data Model
Selecting
Data manipulation that eliminates rows according to
certain criteria
Projecting
Data manipulation that eliminates columns in a
table
Joining
Data manipulation that combines two or more tables
Linked
Linking Data Tables to Answer an Inquiry
Project Number Description Dept. Number
155 Payroll 257
498 Widgets 632
226 Sales manager 598
Schema
A description of the entire database
Subschema
A file that contains a description of a subset of the
Schematic
Schemas and Subschemas
DBMS
Schema
examples:
CREATE - to create objects in the database
ALTER - alters the structure of the database
DROP - delete objects from the database
TRUNCATE - remove all records from a table, including all spaces
allocated for the records are removed
COMMENT - add comments to the data dictionary
RENAME - rename an object
Data Manipulation Language (DML)
records remain
MERGE - UPSERT operation (insert or update)
CALL - call a PL/SQL
command
Transaction Control (TCL) statements are used to manage the
changes made by DML statements. It allows statements to be
grouped together into logical transactions.
COMMIT - save work done
SAVEPOINT - identify a point in a transaction to which you can
elements
Assist programmers in designing and writing
programs
Simplify database modification
Reduce data redundancy
Increase data reliability
Faster program development
Easier modification of data and information
Logical and Physical Access Paths
Schematic
Data on
storage
devices
DBMS
Concurrency control
A method of dealing with a situation in which two or
in a database
Structured query language (SQL)
A standardized data manipulation language
Structured Query Language (SQL)
“Invented” at IBM’s Almaden Research Centre
(San Jose, CA) in the 1970s
E.g.,
Integration
Features
The vendor
Cost
Distributed Databases
Distributed database…
A database in which the actual data may be spread
‘Pretty’ picture
Data Warehouse
Data warehouse
A relational database management system designed
specifically to support management decision making
Current evolution of Decision Support Systems (DSSs)
Data mart
A subset of a data warehouse for small and medium-size
Schematic
Relational
databases
Data
Hierarchical extraction
databases process
Network
databases Data
cleanup
process
Flat files
Spreadsheets Data
End user access warehouse
Query and
analysis
tools
Designing a Customer Data Warehouse
Sharply define your goals and objectives before you
in a data warehouse
Data mining applications
Market segmentation
Customer queries
Fraud detection
Direct marketing
Market basket analysis
On-Line Analytical Processing (OLAP)
Schematic
dBASE
ODBC Import
ODBC Link