Sie sind auf Seite 1von 19

Chapter 1: Introduction to Databases

INFT 2301: Fundamentals of Databases, School of

Chapter 1: Introduction to Databases


What is a database?
Why a database is necessary?
Advantages of the DBMS
How a database stores application data
Data manipulation and retrieval
Not use cases of DBMS

2/1

INFT 2301: Fundamentals of Databases, School of

Databases
Database is a collection of data which is
Interrelated
Organized

Database Applications
Sales
Banks
Online orders
Human Resources
Mobile Operators
High Schools
Government Organizations

Databases are different in size and structure


Databases are everywhere

3/1

INFT 2301: Fundamentals of Databases, School of

Example of Mobile Database


The interface allows
Add new customers
Keep track of incoming and outgoing messages
Advertise new services
Accept miscellaneous payments

4/1

INFT 2301: Fundamentals of Databases, School of

Database Features
Redundancy
Storing entity information once

Eliminated inconsistency
Multiple versions of an entity

Data isolation
Single entry point

Data integrity
Forced data constraints

Data concurrency
Two processes accessing the same data

Data security
Sensitive data protection

5/1

INFT 2301: Fundamentals of Databases, School of

Database Management System


Software which provides
Storage of data
Manipulation of data
Query of data

DBMS components
Storage Manager
Interface between DBMS and OS
Query Processor
Query Translation and Optimization
Transaction Manager
Prevents inconsistencies in case of failures

6/1

INFT 2301: Fundamentals of Databases, School of

DBMS Storage Manager


Storage Manager is a piece of software which resides

between data in the database and the queries accessing data


Responsibilities are
OS interaction

7/1

INFT 2301: Fundamentals of Databases, School of

DBMS Query Processor


Translates and optimizes query

8/1

INFT 2301: Fundamentals of Databases, School of

DBMS Transaction Manager


Transaction Managers responsibility is to make sure that the

database remains in consistent state no matter what


Concurrency Control mechanism ensures that interactions

among transaction are valid

9/1

INFT 2301: Fundamentals of Databases, School of

Database Management System Architecture

10/1

INFT 2301: Fundamentals of Databases, School of

Data Model
Model that describes data
Relational Model
ER (Entity-Relationship) data model
Semi-structured model
Object oriented model
Network model
Hierarchical model

11/1

INFT 2301: Fundamentals of Databases, School of

Relational Data Model


All information is stored in tables (Ted Codd, 1970)
Visually is a two dimensional matrix

Columns are fields


Rows are records

12/1

INFT 2301: Fundamentals of Databases, School of

THE STRUCTURED QUERY LANGUAGE (SQL)


A query language used to retrieve and manipulate data
Currently the most spread
Applications query database using
Embedded SQL
JDBC
ODBC
Stored Procedures

Example of a SQL statement

SELECT BDATE, ADDRESS


FROM EMPLOYEE
WHERE FNAME='John' AND MINIT='B
AND LNAME='Smith

13/1

INFT 2301: Fundamentals of Databases, School of

Data Definition Language (DDL)


Create, drop and modify database objects
Creating a table
Dropping an index
Altering table/index attributes
Creating triggers, views, synonyms and etc.

Any object addition/removal/modification is reflected in the data dictionary


Table columns and their data types
Index information height, clustering factor and etc.
Free and used space in tables/indexes
Timestamps and etc.

14/1

INFT 2301: Fundamentals of Databases, School of

Data Definition Language (Cont.)


Example of a DDL

16/1

INFT 2301: Fundamentals of Databases, School of

Data Manipulation Language (DML)


A language for manipulating data in the database
Adding data
Removing data
Modifying data

Example of a DML

17/1

INFT 2301: Fundamentals of Databases, School of

Database Design
Conceptual Design
Requirement analysis

Logical Design
Implementation of the previous model in DBMS

Physical Design
File organizations
Indexes
Physical storage parameters

18/1

INFT 2301: Fundamentals of Databases, School of

Life Without Databases


Huge Investments
DBMS features overhead
DBMS generality

19/1

INFT 2301: Fundamentals of Databases, School of

End of Chapter 1

20/1

INFT 2301: Fundamentals of Databases, School of

Das könnte Ihnen auch gefallen