1. Click on Insert > new slide to choose
your cover, then delete this page.
HIT234 Database Concepts
Week 1: Overview and Introduction to Database
2. Click on Insert > new slide to choose
your cover, then delete this page.
Introduction to Databases
• Data-information
• Problem using spreadsheet
• Databases
• Database Management Systems
• Types of databases
• Database Models
• Entity Relationship Diagrams
3. Click on Insert > new slide to choose
your cover, then delete this page.
Data and Information
• What is data?
• Information is processed data
• Decision making
4. Click on Insert > new slide to choose
your cover, then delete this page.
Hierarchy of data organization
5. Click on Insert > new slide to choose
your cover, then delete this page.
An Example
Last name First name Student # Mark
Adams John 12345 72
Brown Cathy 87891 81
Conner Chris 24671 65
Data item
Field
record
6. Click on Insert > new slide to choose
your cover, then delete this page.
Processing Changes – a comparison
• Two styles of data management
• Traditional
• Database
• What happens if we wanted to make changes to
data?
7. Click on Insert > new slide to choose
your cover, then delete this page.
Traditional Data Processing
• Old (legacy) systems
• Data organized in files (flat files)
• Applications often not interfaced
• Data and programs closely linked
• Some of these systems are still in use.
8. Click on Insert > new slide to choose
your cover, then delete this page.
Problems with Traditional Approach?
• Changes difficult
• File structure imbedded in programs
• Separated and isolated data
• Same data in multiple places
• Much duplication and redundancy
• Errors and inconsistencies – data integrity
9. Click on Insert > new slide to choose
your cover, then delete this page.
Example-Problem Using Spreadsheet
• Redundancy is the main problem
• Redundancy is the duplication of data or the storing of
the same data in more than one place.
10. Click on Insert > new slide to choose
your cover, then delete this page.
Example of Redundancy
Cust
Number
Customer
Name
Order
Number
Order Date Part
Number
Part
Description
Number
Ordered
Quoted
Price
Ware
house
Rep
Number
148 AI’s Appliance
and Sport
21608 10/20/2007 AT94 Iron 11 $21.95 3 20
148 AI’s Appliance
and Sport
21619 10/23/2007 DR93 Gas Range 1 $495.00 2 20
282 Brookings
Direct
21614 10/21/2007 KT03 Dishwasher 2 $595.00 3 35
356 Ferguson’s 21610 10/20/2007 DR93 Gas Range 1 $495.00 2 65
356 Ferguson’s 21610 10/20/2007 DW11 Washer 1 $399.99 3 65
408 The Everything
Shop
21613 10/21/2007 KL62 Dryer 4 $329.95 1 35
608 Johnson’s
Dept Store
21617 10/21/2007 BV06 Howe Gym 2 $794.95 2 65
608 Johnson’s
Dept Store
21617 10/21/2007 CD52 Microware
Oven
4 $150.00 1 65
608 Johnson’s
dept Store
21623 10/21/2007 KV29 Threadmill 2 $1,290.00 2 65
11. Click on Insert > new slide to choose
your cover, then delete this page.
What problems does redundancy cause?
• Wastes space
• Same data in multiple places
• Require more space in memory and disk
• Update
• Inconsistent data
• Time consuming
• Difficulty accessing related data
• Limit security features
• Access by unauthorized users in one spreadsheet at the same
time
• How to solve those problems?
• Database approach
12. Click on Insert > new slide to choose
your cover, then delete this page.
Database System vs. File System
Database Systems: Design, Implementation, & Management: Rob & Coronel
13. Click on Insert > new slide to choose
your cover, then delete this page.
Database approach
• A Solution to Traditional approach
• Eliminates separation and isolation of data
• Reduces data redundancy
• Eliminates dependence between programs and data
• Increases data flexibility
• Representation of users view of data
• Reports, queries
14. Click on Insert > new slide to choose
your cover, then delete this page.
What is a Database?
• is collection of related data and its metadata
organized in a structured format
• “A database is a structure that can store information
about multiple types of entities, the attributes of
those entities, and the relationships among the
entities.” (Pratt & Adamski)
• Often abbreviated to DB
15. Click on Insert > new slide to choose
your cover, then delete this page.
What is a database?
• A database is a collection of data that is of value to
someone or some organization
• Relationships exist between the data (or entities)
• Structured
• Managed by a Database Management System
(DBMS)
16. Click on Insert > new slide to choose
your cover, then delete this page.
DBMS and DBS
• Database Management System (DBMS)
• is a software that enables easy creation, access, and modification of
databases
• for efficient and effective database management
• Database System
• is an integrated system of hardware, software, people, procedures, and data
• that define and regulate the collection, storage, management, and use of
data within a database environment
17. Click on Insert > new slide to choose
your cover, then delete this page.
Examples
• Computers use DBMS to collect, store and retrieve data
• What are some real life examples of databases?
• Address books
• Warehouses
• Search engines (Google, Yahoo)
• eBay
• Each day NASA stores terabytes of data scanned by various satellites.
• What type of entities would they have?
• What relationships may exist?
• Example: The CDU student enrolment database
• Entities?
• student, unit, unit enrolment
• Relationships?
• a student would be enrolled in a number of units.
18. Click on Insert > new slide to choose
your cover, then delete this page.
Who uses DBMS
Various organisations use DBMS to store your personal
records...
• your electorate and tax records
• your drivers' licence, car insurance, car mechanic
records
• your student records
• your phone, gas, water and electricity records
• your health records (doctor, chemist, hospital)
• your bank records (visa, mortgage, savings)
• your video rental records
• even your pizza shop
19. Click on Insert > new slide to choose
your cover, then delete this page.
Enters a DMBS
Data files
Database server
(someone else’s
C program) Applications
connection
(ODBC, JDBC)
“Two tier database system”
20. Click on Insert > new slide to choose
your cover, then delete this page.
Database Systems
• The big commercial database vendors:
• Oracle
• IBM (with DB2) bought Informix recently
• Microsoft (SQL Server)
• Sybase
• Some free database systems (Unix) :
• Postgres
• Mysql
• Predator
• In HIT234 we use Oracle SQL Developer. You may
use something else, but you are on your own.
21. Click on Insert > new slide to choose
your cover, then delete this page.
Characteristics of database approach
• Self-describing – Metadata
• the structure describes the real data.
• Metadata : is data about the structure of the data
• Program - data independence
• Data abstraction
• physical organization of data is hidden from the user
22. Click on Insert > new slide to choose
your cover, then delete this page.
DBMS
• Stand for Database Management System
• A DBMS consists of:
• Programs that enable the creation and maintenance
of databases
• May contain more than one database
• Many different functions including control of access,
protect data and design tools
23. Click on Insert > new slide to choose
your cover, then delete this page.
Characteristics
• A good DBMS has the following:
• Data integrity
• Security
• Concurrency control
• Transaction processing
• Recovery functions
24. Click on Insert > new slide to choose
your cover, then delete this page.
Hierarchical Database:
Database Systems: Design, Implementation, & Management: Rob & Coronel
25. Click on Insert > new slide to choose
your cover, then delete this page.
Network Database
Database Systems: Design, Implementation, & Management: Rob & Coronel
26. Click on Insert > new slide to choose
your cover, then delete this page.
Relational Database
• Problems with legacy database systems
• Required excessive effort to maintain
• Data manipulation (programs) too dependent on physical file structure
• Hard to manipulate by end-users
• No capacity for ad-hoc query (must rely on DB programmers).
• Evolution in Data Organization
• E. F. Codd’s Relational Model proposal
• Separated the notion of physical representation (machine-view)
from logical representation (human-view)
• Considered ingenious but computationally impractical in 1970
• Relational Database Model
• Dominant database model of today
• Eliminated pointers and used tables to represent data
• Tables
• flexible logical structure for data representation
• a series of row/column intersections
• related by sharing common entity characteristic(s)
27. Click on Insert > new slide to choose
your cover, then delete this page.
Relational Database: Example
◼ Provides a logical “human-level” view of the data and associations
among groups of data (i.e., tables)
Customer_ID Customer_Account Agent_ID
1224 4556 23
1225 4558 25
Agent_ID Last_Name First_Name Phone
23 Sturm David 334-5678
25 Long Kyle 556-3421
Customer_ID Last_Name First_Name Phone Account_Balance
1224 Vira Dyne 678-9987 1223.95
1225 Davies Tricia 556-3342 234.25
28. Click on Insert > new slide to choose
your cover, then delete this page.
Structured Query Language (SQL)
• Standardised language used by all relational databases
• Can be used to
• Create databases (DDL)
Data Definition Language
• Change, enter and retrieve information (DML)
Data Manipulation Language
• Control access to database (DCL)
Data Control Language
29. Click on Insert > new slide to choose
your cover, then delete this page.
How the Programmer Sees the DBMS
• Start with DDL to create tables:
• Continue with DML to populate tables:
CREATE TABLE Students (
Name CHAR(30)
SSN CHAR(9) PRIMARY KEY NOT NULL,
Category CHAR(20)
) . . .
INSERT INTO Students
VALUES(‘Charles’, ‘123456789’, ‘undergraduate’)
. . . .
30. Click on Insert > new slide to choose
your cover, then delete this page.
• Tables:
• Still implemented as files, but behind the scenes
can be quite complex
SSN Name Category
123-45-6789 Charles undergrad
234-56-7890 Dan grad
… …
SSN CID
123-45-6789 CSE444
123-45-6789 CSE444
234-56-7890 CSE142
…
Students: Takes:
CID Name Quarter
CSE444 Databases fall
CSE541 Operating systems winter
Courses:
“data independence” = separate logical view
from physical implementation
31. Click on Insert > new slide to choose
your cover, then delete this page.
SELECT statement
• Retrieves information from tables in the database
SELECT columnlist
FROM tablename;
• Find ItemDesc for each Item
SELECT ItemDesc
FROM Item;
• Or for all the columns
SELECT *
FROM Item;
32. Click on Insert > new slide to choose
your cover, then delete this page.
CDU Oracle set up
• Oracle is on the server redstart
on a tablet or PC
Use SQL Developer
or PuTTY to log on
to database
redstart: home of
Oracle DBMS
33. Click on Insert > new slide to choose
your cover, then delete this page.
Thank you