Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
10 views24 pages

Lecture1-Introduction To Database Systems

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views24 pages

Lecture1-Introduction To Database Systems

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

Lecture-1: Introduction to Database

Course CSB2204: Database Systems

Assoc. Prof. Mohammed Gadelrab


School of Artificial Intelligence & Data Management
Badr University in Assiut (BUA)
Lecture Overview

Part I: Course Overview
 Course Objectives
 Course Structure
 References & Useful Resources

Part II: Introduction to Database

Spring 2025 BUA-AI & DM School 2


Part I: Overview of the course

Spring 2025 BUA-AI & DM School 3


Course Objectives

This course provides an introduction to the fundamental concepts of database systems. Students will
learn about database design, data modeling, SQL, normalization, and database management systems
(DBMS). The course will also cover the basics of transaction management, concurrency control, and
database security. By the end of the course, students will be able to design and implement a relational
database and write SQL queries to retrieve and manipulate data. Moreover, students will be exposed
briefly to NoSQL databases.


Course Objectives:
 Understand the fundamental concepts of databases and Database Management Systems and its importance.

 Learn to design and normalize relational databases.

 Gain proficiency in SQL for querying and managing data.

 Explore advanced topics like transactions, indexing, and database security.

 Get an overview of emerging trends in database technologies.


Spring 2025 BUA-AI & DM School 4
Course Structure

Lectures: 12 (1 per week)

Practical Sessions: 12 labs (1 per week)

Assessment and Grading:
 Quizzes: 3 quizzes (15%: 5 per each)
 Presence and activities: (5%)
 Projects and deliverables: 5%
 Mid-term exam: 25 %
 Final Exam: 50%
Spring 2025 BUA-AI & DM School 5
References & Useful Resources

Text Books:
 A. Silberschatz, H. F. Korth, S. Sudarshan, Database System Concepts, 7th edition,
McGraw-Hill.
 Ramez ElMasri, Navathe, Fundamentals of Database Systems, 7th edition,
Pearson.

Online Courses & Tutorials:
 Mahara-Tech Free Course: Database Fundamentals
 FreeCodeCamp: Relational Database

Tools:
 Mysql
 Postgresql
 NoSQL: (e.g., MongoDB or Cassandra)
Spring 2025 BUA-AI & DM School 6
Part II: Introduction to Database

Spring 2025 BUA-AI & DM School 7


Outline

What is a Database (DB)? Why ?

What is Database Management Systems (DBMS)? Why?

Simplified DB System Environment

Typical DBMS Functionality

Examples of Database Application Fields

Example of a Simple Database

Main Characteristics of the Database Approach

History of Database System

Recent DB development

Spring 2025 BUA-AI & DM School 8


What is DB?

Data:
– Known and often connected facts that can be
recorded and have an implicit meaning.

Database:
 A collection of related data.
 Databases touch all aspects of our lives

Mini-world:
 Some part of the real world about which data is stored
in a database. For example, student grades and
transcripts at a university.

Spring 2025 BUA-AI & DM School 9


What is DBMS?

Database Management System (D BMS):
– A software package/ system to facilitate the creation and maintenance of a computerized database.

DBMS contains the following:
 A collection of interrelated data
 A set of programs to access the data
 An environment that is both convenient and efficient to use


Database System:
 The DBMS software + the data itself. Sometimes, the applications are also included.
 Database systems are used to manage collections of data that are:

Highly valuable

Relatively large

Accessed by multiple users and applications, often at the same time.

A modern database system is a complex software system whose task is to manage a large, complex collection of data.

Spring 2025 BUA-AI & DM School 10


Why is DB & DBMS?

In the early days, database applications were built directly on top of file systems, which have
several limitations:
 Data redundancy and inconsistency: data was stored in multiple file formats resulting in
duplication of information in different files and sometime unaligned or contradicted
information.
 Difficulty in accessing data:

Need to write a new program to carry out each new task.
 Data isolation:

Multiple files and formats.
 Integrity problems:

Integrity constraints (e.g., account balance > 0) become “buried” in program code
rather than being stated explicitly.

Hard to add new constraints or change existing ones.

Spring 2025 BUA-AI & DM School 11


Why is DB & DBMS? (cont.)

Lack of atomicity of updates:
 Failures may leave database in an inconsistent state with partial updates carried out.
 Example: Transfer of funds from one account to another should either complete or not
happen at all.

Lack of concurrent access by multiple users:
 Concurrent access needed for performance.
 Uncontrolled concurrent accesses can lead to inconsistencies

Ex: Two people reading a balance (say 100) and updating it by withdrawing money (say
50 each) at the same time

Security problems:
 Hard to provide user access to some, but not all, data.
✓ Database systems offer solutions to all the above problems.
Spring 2025 BUA-AI & DM School 12
Simplified Database System Environment

Actual data stored in the Database

Meta-data: that contains database definition

Database Management System (DBMS):
 Software that process queries and
programs
 Software to access stored data

Application program: software the uses and
interacts with the database.

Spring 2025 BUA-AI & DM School 13


Typical DBMS Functionality

Define a particular database in terms of its data types, structures, and constraints.

Construct or Load the initial database contents on a secondary storage medium

Manipulating the database:
 Retrieval: Querying, generating reports
 Modification: Insertions, deletions and updates to its content
 Accessing the database through Web applications

Processing and Sharing by a set of concurrent users and application programs –
yet, keeping all data valid and consistent

Spring 2025 BUA-AI & DM School 14


Example of Database Application Fields (1 of 2)

Universities: students, courses, registration, grades, etc.

Enterprise Information:
– Sales: customers, products, purchases.
– Accounting: payments, receipts, assets.
– Human Resources: Information about employees, salaries, payroll taxes.

Manufacturing: management of production, inventory, orders, supply chain.

Banking and finance:
– customer information, accounts, loans, and banking transactions.
– Credit card transactions.

Finance: sales and purchases of financial instruments (e.g., stocks and bonds;
storing real-time market data
Spring 2025 BUA-AI & DM School 15
Example of Database Application Fields (2 of 2)

Airlines: reservations, schedules.

Telecommunication: records of calls, texts, and data usage, generating
monthly bills, maintaining balances on prepaid calling cards.

Web-based services:
– Online retailers: order tracking, customized recommendations.
– Online advertisements.

Navigation systems: For maintaining the locations of various places of
interest along with the exact routes of roads, train systems, buses, etc.

Social Media sites: such as Facebook:
– Posts, reactions, messages, friends, groups, reels.
Spring 2025 BUA-AI & DM School 16
Example of a Simple Database (1 of 5)

Mini-world for the example:
– Part of a UNIVERSITY environment.

Some mini-world entities:
– STUDENTs
– COURSEs
– SECTIONs (of COURSEs)
– (academic) DEPARTMENTs
– INSTRUCTORs

Spring 2025 BUA-AI & DM School 17


Example of a Simple Database (2 of 5)

Some mini-world relationships:
– SECTIONs are of specific COURSEs
– STUDENTs take SECTIONs
– COURSEs have prerequisite COURSEs
– INSTRUCTORs teach SECTIONs
– COURSEs are offered by DEPARTMENTs
– STUDENTs major in DEPARTMENTs

Spring 2025 BUA-AI & DM School 18


Example of a Simple Database (3 of 5)

COURSE: Course_name Course_numb Credit_hours Department
er
Intro to Computer Science C S1310 4 CS
Data Structures C S3320 4 CS
Discrete Mathematics MATH2410 3 MATH
Database C S3380 3 CS

Student_number Section_identifier Grade



GRADE_REPORT:
17 112 B
17 119 C
8 85 A
8 92 A
8 102 B
8 135 A
Spring 2025 BUA-AI & DM School 19
Main Characteristics of the Database Approach (1 of 2)

Data Abstraction:
– A data model is used to hide storage details and present the users with a conceptual view of the database.
– Programs refer to the data model constructs rather than data storage details.


Support of multiple views of the data:
– Each user may see a different view of the database, which describes only the data of interest to that us


Self-describing nature of a database system:
– A DBMS catalog stores the description of a particular database (e.g. data structures, types, and constraints)
– The description is called meta-data.
– This allows the DBMS software to work with different database applications.


Insulation between programs and data:
– Called program-data independence.
– Allows changing data structures and storage organization without having to change the DBMS access programs.

Spring 2025 BUA-AI & DM School 20


Main Characteristics of the Database Approach (2 of 2)

Sharing data and multi-user transaction processing:
– Allowing a set of concurrent users to retrieve from and to update the
database.

Concurrency control within the DBMS guarantees that each
transaction is correctly executed or aborted

Recovery subsystem ensures each completed transaction has its effect
permanently recorded in the database

OLTP (Online Transaction Processing) is a major part of database
applications. This allows hundreds of concurrent transactions to execute
per second.

Spring 2025 BUA-AI & DM School 21


History of Database Systems

1950s and early 1960s:

1980s:

– – SQL becomes industrial standard


Data processing using magnetic tapes for storage
– Tapes provided only sequential access – Parallel and distributed database systems

– Punched cards for input – Object-oriented database systems


Late 1960s and 1970s: ●
1990s:
– Hard disks allowed direct access to data – Large decision support and data-mining applications
– Network and hierarchical data models in widespread – Large multi-terabyte data warehouses
use
– Emergence of Web commerce
– Ted Codd defines the relational data model

2000s:

Would win the ACM Turing Award for this work
– Big data storage systems: Google BigTable, Yahoo PNuts, Amazon,

IBM Research begins System R prototype
– “NoSQL” systems: Big data analysis: beyond SQL

UC Berkeley (Michael Stonebraker) begins Ingres
prototype – Map reduce and friends

Oracle releases first commercial relational
database ●
2010s:
– High-performance (for the era) transaction processing – Massively parallel database systems

– Multi-core main-memory databases

Spring 2025 BUA-AI & DM School 22


Recent Development

Traditional Applications:
 Numeric and Textual Databases

More Recent Applications:
 Multimedia Databases
 Geographic Information Systems (G IS)
 Biological and Genome Databases
 Data Warehouses
 Mobile databases
 Real-time and Active Databases

Spring 2025 BUA-AI & DM School 23


???

BUA-AI & DM School 24

You might also like