0% found this document useful (0 votes)
4 views

Unit-1-Introdcution-to-Advanced-Database-Systems

The document provides an introduction to advanced database systems, explaining their purpose, components, and the importance of database management systems (DBMS) in organizing and managing data efficiently. It outlines key concepts such as data integrity, security, abstraction levels, and various data models, including the Entity-Relationship and relational models. Additionally, it covers SQL's Data Definition Language (DDL) and Data Manipulation Language (DML) for effective database management.

Uploaded by

Ma Arzhellie
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Unit-1-Introdcution-to-Advanced-Database-Systems

The document provides an introduction to advanced database systems, explaining their purpose, components, and the importance of database management systems (DBMS) in organizing and managing data efficiently. It outlines key concepts such as data integrity, security, abstraction levels, and various data models, including the Entity-Relationship and relational models. Additionally, it covers SQL's Data Definition Language (DDL) and Data Manipulation Language (DML) for effective database management.

Uploaded by

Ma Arzhellie
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Introduction to Advanced Database System

Introduction to Advanced
Database System
1
UNIT
.

Introduction

A database system is a software application designed to efficiently store, manage, and


retrieve large amounts of data. It organizes data into structured formats, typically tables,
to facilitate easy access and manipulation. Key components include the database itself,
which holds the data, and a database management system (DBMS) that provides tools
for data handling and querying. Database systems ensure data integrity, security, and
support for multiple users accessing data simultaneously. They are used in various
applications, from business and finance to education and healthcare, enabling
organizations to manage and analyze their information effectively.

Unit Learning Outcomes

At the end of the unit, you will be able to:

a. Analyze the Impact of DBMS on Data Integrity and Security;


b. Design and Compare Database Models for Different Applications;
c. Evaluate the Role of Abstraction Levels in Database Management;
d. Evaluate Query Optimization Techniques; and
e. Assess the Role of SQL in Different User Interactions

Topic
Overview of Database Systems
1
Time Allotment: 5 hours

Learning Objectives

At the end of the session, you will be able to use and execute:

a. Evaluate how transitioning from traditional file systems to a relational DBMS


improves data integrity and security;
b. Construct ER diagrams and relational schemas for various real-world
applications; and
c. Assess how the physical, logical, and view levels of data abstraction in a
DBMS contribute to flexibility and ease of use.
.
Presentation of Content

Database Management System (DBMS)

• Collection of interrelated data


• Set of programs to access the data
• DBMS contains information about a particular enterprise

1
Leaning Guide in Advanced Database System
Introduction to Advanced Database System

• DBMS provides an environment that is both convenient and


• efficient to use.
• Database Applications:
Banking: all transactions
Airlines: reservations, schedules
Universities: registration, grades
Sales: customers, products, purchases
Manufacturing: production, inventory, orders, supply chain
Human resources: employee records, salaries, tax deductions
• Databases touch all aspects of our lives

Purpose of Database System

• In the early days, database applications were built on top of file systems

• Drawbacks of using file systems to store data:


Data redundancy and inconsistency
o Multiple file formats, duplication of information in different files
Difficulty in accessing data
o Need to write a new program to carry out each new task
Data isolation — multiple files and formats
Integrity problems
o Integrity constraints (e.g. account balance > 0) become part of the
program code
o It is hard to add new constraints or change existing ones

• Drawbacks of using file systems (cont.)


Atomicity of updates
o Failures may leave the database in an inconsistent state with partial
updates carried out
o E.g. transfer of funds from one account to another should either complete
or not happen at all
Concurrent access by multiple users
o Concurrent accessed needed for performance
o Uncontrolled concurrent accesses can lead to inconsistencies
- E.g. two people reading a balance and updating it at the same
time
Security problems

• Database systems offer solutions to all the above problems

Levels of Abstraction

• Physical level describes how a record (e.g., customer) is stored.

• Logical level: describes data stored in database, and the relationships among the
data.
type customer = record
name : string;
street : string;
city : integer;
end;

• View level: application programs hide details of data types. Views can also hide
information (e.g., salary) for security purposes.

2
Leaning Guide in Advanced Database System
Introduction to Advanced Database System

View of Data

An architecture for a database system

Instances and Schemas

• Similar to types and variables in programming languages

• Schema – the logical structure of the database


e.g., the database consists of information about a set of customers and
accounts and the relationship between them)
Analogous to type information of a variable in a program
Physical schema: database design at the physical level
Logical schema: database design at the logical level

• Instance – the actual content of the database at a particular point in time


Analogous to the value of a variable

• Physical Data Independence – the ability to modify the physical schema without
changing the logical schema
Applications depend on the logical schema
In general, the interfaces between the various levels and components should
be well defined so that changes in some parts do not seriously influence
others.

Data Models

• A collection of tools for describing


data
data relationships
data semantics
data constraints

• Entity-Relationship model

The Entity-Relationship (ER) Model is a conceptual framework used to describe


the structure of a database in terms of entities, their attributes, and the
relationships between these entities. It serves as a blueprint for designing
databases by providing a clear representation of the data and its interconnections.

3
Leaning Guide in Advanced Database System
Introduction to Advanced Database System

E-R model of real world


Entities (objects)
- E.g. customers, accounts, bank branch
Relationships between entities
- E.g. Account A-101 is held by customer Johnson
- Relationship set depositor associates customers with accounts

Widely used for database design


Database design in E-R model usually converted to design in the relational
model (coming up next) which is used for storage and processing

• Relational model

The relational model is a foundational framework for structuring and querying data in
a database. Proposed by Edgar F. Codd in 1970, it organizes data into tables, which
are formally known as relations. The relational model is widely used due to its
simplicity, flexibility, and the power of its query language, SQL (Structured Query
Language).

Key Concepts of the Relational Model

1. Relations (Tables):
o Definition: A relation is a table with columns and rows. Each table
represents a set of entities with attributes.
o Example: A table named Students might include columns for StudentID,
Name, and Age.
2. Tuples (Rows):
o Definition: A tuple is a single row in a table, representing a single
instance of the entity.
o Example: In the Students table, a row could be (1, 'Alice', 20).
3. Attributes (Columns):
o Definition: Attributes are the properties or characteristics of the entities
represented in the table.
o Example: In the Students table, the columns StudentID, Name, and Age
are attributes.
4. Domains:
o Definition: A domain is a set of allowable values for one or more
attributes.
o Example: The domain for the Age attribute might be all non-negative
integers.
5. Primary Key:
o Definition: A primary key is a unique identifier for each tuple in a table. It
ensures that each record can be uniquely identified.
o Example: In the Students table, StudentID could be the primary key.
6. Foreign Key:
o Definition: A foreign key is an attribute in one table that links to the
primary key of another table, creating a relationship between the two
tables.
o Example: If there is an Enrollments table, the StudentID in this table
would be a foreign key referencing the Students table.

4
Leaning Guide in Advanced Database System
Introduction to Advanced Database System

7. Integrity Constraints:
o Entity Integrity: Ensures that the primary key of a table is unique and not
null.
o Referential Integrity: Ensures that a foreign key value always points to
an existing, valid tuple in the referenced table.

• Other models:
object-oriented model
semi-structured data models
Older models: network model and hierarchical model

Data Definition Language (DDL)

DDL is a subset of SQL (Structured Query Language) used to define the database
structure or schema. It includes commands such as:

1. CREATE: To create a new database, table, index, or view.


2. ALTER: To modify an existing database object, such as adding or removing
columns from a table.
3. DROP: To delete a database, table, index, or view.
4. TRUNCATE: To remove all records from a table, but not the table itself.

Data Manipulation Language (DML)

DML is a subset of SQL used for managing data within schema objects. It includes
commands such as:

1. SELECT: To retrieve data from one or more tables.


2. INSERT: To add new rows of data into a table.
3. UPDATE: To modify existing data in a table.
4. DELETE: To remove rows of data from a table.

5
Leaning Guide in Advanced Database System
Introduction to Advanced Database System

Topic
Overview of Database System Components
2
Time Allotment 5 hours

Learning Objectives

At the end of the session, you will be able to use and execute

a. Analyze and compare various SQL query optimization strategies to


improve performance; and
b. Investigate how different types of database users utilize SQL and
embedded SQL in their interactions with the database.
.
Presentation of Content

Structured Query Language (SQL)

• SQL widely used non-procedural language


E.g. find the name of the customer with customer-id 192-83-7465
select customer.customer-name
from customer
where customer.customer-id = ‘192-83-7465’
E.g. find the balances of all accounts held by the customer with customer-id
192-83-7465
select account.balance
from depositor, account
where depositor.customer-id = ‘192-83-7465’ and
depositor.account-number = account.account-number
• Application programs generally access databases through one of
Language extensions to allow embedded SQL
Application program interface (e.g. ODBC/JDBC) which allow SQL queries to
be sent to a database

Database Users

• Users are differentiated by the way they expect to interact with the system
- Application programmers – interact with system through DML calls
- Sophisticated users – form requests in a database query language
- Specialized users – write specialized database applications that do not fit
into the traditional data processing framework
- Naive users – invoke one of the permanent application programs that
have been written previously
E.g. people accessing database over the web, bank tellers, clerical staff

Database Administrator

• Coordinates all the activities of the database system; the database administrator
has a good understanding of the enterprise’s information resources and needs.
• Database administrator's duties include
Schema definition
Storage structure and access method definition
Schema and physical organization modification
Granting user authority to access the database
Specifying integrity constraints
Acting as liaison with users

6
Leaning Guide in Advanced Database System
Introduction to Advanced Database System

Monitoring performance and responding to changes in requirements

Transaction Management

• A transaction is a collection of operations that performs a single logical function


in a database application

• Transaction-management component ensures that the database remains


consistent (correct) despite system failures (e.g., power failures and operating
system crashes) and transaction failures.

• Concurrency-control manager controls the interaction among the concurrent


transactions, to ensure the consistency of the database.

Storage Management

• Storage manager is a program module that provides the interface between the
low-level data stored in the database and the application programs and queries
submitted to the system.

• The storage manager is responsible to the following tasks


interaction with the file manager
efficient storing, retrieving and updating of data

Summary Unit

A Database Management System (DBMS) organizes and manages data efficiently using
a collection of interrelated data and a set of programs for access. It provides a structured
environment for data handling, crucial in sectors like banking, airlines, and universities.
Unlike file systems, DBMS resolves issues of data redundancy, isolation, and integrity,
offering solutions through levels of abstraction, including physical, logical, and view levels.
Key components include Entity-Relationship (ER) and relational models for data structure,
and SQL’s Data Definition Language (DDL) and Data Manipulation Language (DML) for
database management.

7
Leaning Guide in Advanced Database System
Introduction to Advanced Database System

References

Phannarith (2010). Advanced Database System - Chapter 01. Retrieved on June2024


from https//www.scribd.com/presentation/32565194/Advanced-Database-System-
Chapter-01

8
Leaning Guide in Advanced Database System

You might also like