Objectives To understand the following concepts: 1.Database 2.Three levels of database views 3.ER diagram 4.SQL 5.DBMS
ITM 625 – [01] DBMS Overview 2
Database A database is a collection of interrelated data stored within a computer environment. Two characteristics are: Large data volume Persistent
Examples: info of students, travel
reservations and banking.
ITM 625 – [01] DBMS Overview 3
Database A database can be viewed in 3 levels: 1.Conceptual modeling 2.Logical modeling 3.Physical modeling
ITM 625 – [01] DBMS Overview 4
Conceptual Level It permits us to model the application of the world which is independent of any particular data (logical) model It provides a framework for developing a database schema from the top to the bottom in the process of a database design Presentations: 1.Entity-relationship (ER) model 2.Object-oriented model 3.Unified modeling technique (UMT) ITM 625 – [01] DBMS Overview 5 Entity-relationship The main components are: – Entity: a thing that exists and is distinguishable. – Attribute: describes properties of entities and relationships. – Relationship: a connection between entities. – Key: differentiates one entity instance from all others in the entity.
ITM 625 – [01] DBMS Overview 6
Entity-relationship Mapping cardinality: indicates the number of instances in entity E1 that can or must be associated with instances in entity E2: 1.One to one relationship 2.Many to one relationship 3.Many to many relationship
ITM 625 – [01] DBMS Overview 7
ER Diagram
ITM 625 – [01] DBMS Overview 8
UML Diagram
ITM 625 – [01] DBMS Overview 9
Logical Level Database schema is defined to describe the structure & constraint of information managed by the application in a Data Definition Language (DDL). Query language is used to insert, update, delete and query the data in a Data Manipulation Language (DML). This level is described as a set of relatively simple structures.
ITM 625 – [01] DBMS Overview 10
SQL SQL (Standard Query Language) is the widely accepted language used in all relational database. Characteristics: 1.Declarative: express what expected, without knowing how it is processed 2.Based on mathematics: relational calculus and algebra But it lacks of iteration.
ITM 625 – [01] DBMS Overview 11
Logical Level
ITM 625 – [01] DBMS Overview 12
Physical Level Storage: efficient organization of data Access Methods: accelerate data retrieval by defining data structures or index. Query Processing: to answer a query Query Optimization: to evaluate of query processing Concurrency and recovery: to manage concurrent access to data and resources
ITM 625 – [01] DBMS Overview 13
Physical Level Examples:
ITM 625 – [01] DBMS Overview 14
DBMS A DBMS (Database Management System) is a collection of software that manages the database structure and controls access. It performs the data: Definition: types, structures & constraints Construction: storage Manipulation Query Update
ITM 625 – [01] DBMS Overview 15
Evolution of Datasets
ITM 625 – [01] DBMS Overview 16
Towards Free DBMS There is a trend that big commercial database vendors release the free license of DBMS (with some limitations) such as: Microsoft SQL Server 2005 Express Edition Oracle 10g
26) Write A Program That Reads The List of Temperatures From A File Called Temps - Txt. Converts Those Temperatures To Fahrenheit, and Writes The Results To A File Called Ftemps - Txt. Sol