SlideShare uma empresa Scribd logo
1 de 16
SEIYUN UNIVERSITY
College of Applied Science – CS department
Instructor: Dr. Mazin Md. Alkathiri
Information technology Department
Faculty of Applied Sciences
Seiyun University – Yemen
Jan 2024
SEIYUN UNIVERSITY
College of Applied Science – CS department
2
SEIYUN UNIVERSITY
College of Applied Science – CS department
•What is a database ?
•Boring answer
• A structured collection of data
Example: A telephone directory
•Insightful answer
• A data-centered mirror of an organization’s business
processes
Structure of data reflects organizational processes
Content of data reflects organization’s history
3
Database
SEIYUN UNIVERSITY
College of Applied Science – CS department
• Is a computerized system that enables users to create and maintain
a database.
• The DBMS is a general-purpose software system that facilitates the
processes of
• defining,
• constructing,
• manipulating,
• and sharing databases among various users and applications.
• An application program accesses the database by sending queries
or requests for data to the DBMS.
Database Management System (DBMS)
4
SEIYUN UNIVERSITY
College of Applied Science – CS department
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
5
SEIYUN UNIVERSITY
College of Applied Science – CS department
• In the early days, database applications were built on top of file systems
• Drawbacks of using file systems to store data:
1. Data redundancy and inconsistency
• Multiple file formats, duplication of information in different files
2. Difficulty in accessing data
• Need to write a new program to carry out each new task
3. Data isolation — multiple files and formats
4. Integrity problems
• Integrity constraints (e.g. account balance > 0) become part of program code
• Hard to add new constraints or change existing ones
Purpose of Database System
6
SEIYUN UNIVERSITY
College of Applied Science – CS department
5. Atomicity of updates
• Failures may leave database in an inconsistent state with partial updates carried out
• E.g. transfer of funds from one account to another should either complete or not
happen at all
6. Concurrent access by multiple users
• Concurrent accessed needed for performance
• Uncontrolled concurrent accesses can lead to inconsistencies
• E.g. two people reading a balance and updating it at the same time
7. Security problems
• Database systems offer solutions to all the above problems
Purpose of Database Systems (Cont.)
7
SEIYUN UNIVERSITY
College of Applied Science – CS department
• Database systems comprise complex data-structures.
• In order to make the system efficient in terms of retrieval of data, and reduce
complexity, developers use abstraction i.e. hide irrelevant details from the users.
• There are mainly 3 levels of data abstraction:
1. Physical level: describes how a record (e.g., customer) is stored.
2. Logical level: describes data stored in database, and the relationships among the data.
type customer = record
name : string;
street : string;
city : integer;
end;
3. View level: application programs hide details of data types. Views can also hide
information (e.g., salary) for security purposes.
Levels of Abstraction
8
SEIYUN UNIVERSITY
College of Applied Science – CS department
• An architecture for a database system
View of Data
9
SEIYUN UNIVERSITY
College of Applied Science – CS department
• An entity represents a real-world object or concept,
• such as an employee or a project from the mini-world that is described in the
database.
• An attribute represents some property of interest that further describes an entity,
• such as the employee’s name or salary.
• A relationship among two or more entities represents an association among the
entities,
• for example, a works-on relationship between an employee and a project.
• Other examples:
 Customer - Orders - Product(s)
 Order - Serviced by - Employee
entities, attributes, and relationships
10
SEIYUN UNIVERSITY
College of Applied Science – CS department
• A relational DB supports storage of data as a set of inter-related tables
 Each table stores data about a set of Entities
 Each table row is a record about one such Entity
 Each record column is a field specifying an attribute of this Entity
 Each record has a field that acts as a unique identifier of an entity
 Relationships among entities are specified by referring to this unique
identifier from other tables
Relational Databases
11
SEIYUN UNIVERSITY
College of Applied Science – CS department
A Sample Relational Database
12
SEIYUN UNIVERSITY
College of Applied Science – CS department
DBMS Languages
13
SEIYUN UNIVERSITY
College of Applied Science – CS department
Data Definition Language (DDL)
• Specification notation for defining the database schema
• E.g.
create table account (
account-number char(10),
balance integer)
• DDL compiler generates a set of tables stored in a data dictionary
• Data dictionary contains metadata (i.e., data about data)
• database schema
SEIYUN UNIVERSITY
College of Applied Science – CS department
Data Manipulation Language (DML)
• Language for accessing and manipulating the data organized by the
appropriate data model
• retrieval, insertion, deletion, and modification of the data.
• DML also known as query language
• Two classes of languages
• Procedural – user specifies what data is required and how to get those data
• FORTRAN, COBOL, ALGOL, are examples of Procedural languges
• Nonprocedural – user specifies what data is required without specifying how to
get those data
• SQL is the most widely used query language
SEIYUN UNIVERSITY
College of Applied Science – CS department
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

Mais conteúdo relacionado

Semelhante a ESSENTIAL of (CS/IT/IS) class 06 (database)

Education Data Warehouse System
Education Data Warehouse SystemEducation Data Warehouse System
Education Data Warehouse System
daniyalqureshi712
 
01-Database Administration and Management.pdf
01-Database Administration and Management.pdf01-Database Administration and Management.pdf
01-Database Administration and Management.pdf
TOUSEEQHAIDER14
 
PPT Lecture 1.1 and 1.2(Database concepts and database system architecture) (...
PPT Lecture 1.1 and 1.2(Database concepts and database system architecture) (...PPT Lecture 1.1 and 1.2(Database concepts and database system architecture) (...
PPT Lecture 1.1 and 1.2(Database concepts and database system architecture) (...
AbhiGrover10
 
Utsav Mahendra : Introduction to Database and managemnet
Utsav Mahendra : Introduction to Database and managemnetUtsav Mahendra : Introduction to Database and managemnet
Utsav Mahendra : Introduction to Database and managemnet
Utsav Mahendra
 
Module 1 - Chapter1.pptx
Module 1 - Chapter1.pptxModule 1 - Chapter1.pptx
Module 1 - Chapter1.pptx
SoniaDevi15
 

Semelhante a ESSENTIAL of (CS/IT/IS) class 06 (database) (20)

Database Systems(DBS) Or DATABASE MANAGEMENT SYSTEM
Database Systems(DBS) Or DATABASE MANAGEMENT SYSTEMDatabase Systems(DBS) Or DATABASE MANAGEMENT SYSTEM
Database Systems(DBS) Or DATABASE MANAGEMENT SYSTEM
 
Database part1-
Database part1-Database part1-
Database part1-
 
DBMS introduction and functionality of of dbms
DBMS introduction and functionality of  of dbmsDBMS introduction and functionality of  of dbms
DBMS introduction and functionality of of dbms
 
1_DBMS_Introduction.pdf
1_DBMS_Introduction.pdf1_DBMS_Introduction.pdf
1_DBMS_Introduction.pdf
 
Education Data Warehouse System
Education Data Warehouse SystemEducation Data Warehouse System
Education Data Warehouse System
 
01-Database Administration and Management.pdf
01-Database Administration and Management.pdf01-Database Administration and Management.pdf
01-Database Administration and Management.pdf
 
Introduction to Database system
Introduction to Database systemIntroduction to Database system
Introduction to Database system
 
PPT Lecture 1.1 and 1.2(Database concepts and database system architecture) (...
PPT Lecture 1.1 and 1.2(Database concepts and database system architecture) (...PPT Lecture 1.1 and 1.2(Database concepts and database system architecture) (...
PPT Lecture 1.1 and 1.2(Database concepts and database system architecture) (...
 
Database Systems - Lecture Week 1
Database Systems - Lecture Week 1Database Systems - Lecture Week 1
Database Systems - Lecture Week 1
 
Unit 1: Introduction to DBMS Unit 1 Complete
Unit 1: Introduction to DBMS Unit 1 CompleteUnit 1: Introduction to DBMS Unit 1 Complete
Unit 1: Introduction to DBMS Unit 1 Complete
 
unit 1.pdf
unit 1.pdfunit 1.pdf
unit 1.pdf
 
Database & Database Users
Database & Database UsersDatabase & Database Users
Database & Database Users
 
Unit1 dbms
Unit1 dbmsUnit1 dbms
Unit1 dbms
 
Dbms_class _14
Dbms_class _14Dbms_class _14
Dbms_class _14
 
6846222.pdf
6846222.pdf6846222.pdf
6846222.pdf
 
DBMS
DBMS DBMS
DBMS
 
Ch1_Intro-95(1).ppt
Ch1_Intro-95(1).pptCh1_Intro-95(1).ppt
Ch1_Intro-95(1).ppt
 
Unit 1.pptx
Unit 1.pptxUnit 1.pptx
Unit 1.pptx
 
Utsav Mahendra : Introduction to Database and managemnet
Utsav Mahendra : Introduction to Database and managemnetUtsav Mahendra : Introduction to Database and managemnet
Utsav Mahendra : Introduction to Database and managemnet
 
Module 1 - Chapter1.pptx
Module 1 - Chapter1.pptxModule 1 - Chapter1.pptx
Module 1 - Chapter1.pptx
 

Mais de Dr. Mazin Mohamed alkathiri

Mais de Dr. Mazin Mohamed alkathiri (20)

Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Advance Mobile Application Development class 05
Advance Mobile Application Development class 05Advance Mobile Application Development class 05
Advance Mobile Application Development class 05
 
ESSENTIAL of (CS/IT/IS) class 05 (Software concepts)
ESSENTIAL of (CS/IT/IS) class 05 (Software concepts)ESSENTIAL of (CS/IT/IS) class 05 (Software concepts)
ESSENTIAL of (CS/IT/IS) class 05 (Software concepts)
 
OS-operating systems- ch03
OS-operating systems- ch03OS-operating systems- ch03
OS-operating systems- ch03
 
OS-operating systems - ch02 - part-2-2024
OS-operating systems - ch02 - part-2-2024OS-operating systems - ch02 - part-2-2024
OS-operating systems - ch02 - part-2-2024
 
Advance Mobile Application Development class 04
Advance Mobile Application Development class 04Advance Mobile Application Development class 04
Advance Mobile Application Development class 04
 
Advance Mobile Application Development class 03
Advance Mobile Application Development class 03Advance Mobile Application Development class 03
Advance Mobile Application Development class 03
 
Advance Mobile Application Development class 02-B
Advance Mobile Application Development class 02-BAdvance Mobile Application Development class 02-B
Advance Mobile Application Development class 02-B
 
OS-ch02-part-1-2024.ppt
OS-ch02-part-1-2024.pptOS-ch02-part-1-2024.ppt
OS-ch02-part-1-2024.ppt
 
Advance Mobile Application Development class 02
Advance Mobile Application Development class 02Advance Mobile Application Development class 02
Advance Mobile Application Development class 02
 
ESSENTIAL of (CS/IT/IS) class 03-04 (NUMERIC SYSTEMS)
ESSENTIAL of (CS/IT/IS) class 03-04 (NUMERIC SYSTEMS)ESSENTIAL of (CS/IT/IS) class 03-04 (NUMERIC SYSTEMS)
ESSENTIAL of (CS/IT/IS) class 03-04 (NUMERIC SYSTEMS)
 
Advance Mobile Application Development class 01
Advance Mobile Application Development class 01Advance Mobile Application Development class 01
Advance Mobile Application Development class 01
 
ESSENTIAL of (CS/IT/IS) class 02 (HCI)
ESSENTIAL of (CS/IT/IS) class 02 (HCI)ESSENTIAL of (CS/IT/IS) class 02 (HCI)
ESSENTIAL of (CS/IT/IS) class 02 (HCI)
 
Seminar
SeminarSeminar
Seminar
 
ESSENTIAL of (CS/IT/IS)
ESSENTIAL of (CS/IT/IS)ESSENTIAL of (CS/IT/IS)
ESSENTIAL of (CS/IT/IS)
 
OS-ch01-2024.ppt
OS-ch01-2024.pptOS-ch01-2024.ppt
OS-ch01-2024.ppt
 
Mobile Application Development class 008
Mobile Application Development class 008Mobile Application Development class 008
Mobile Application Development class 008
 
Academic Writing (Punctuation ) class 06
Academic Writing (Punctuation ) class 06Academic Writing (Punctuation ) class 06
Academic Writing (Punctuation ) class 06
 
Academic Writing (Technical report writing ) class 07
Academic Writing (Technical report writing ) class 07Academic Writing (Technical report writing ) class 07
Academic Writing (Technical report writing ) class 07
 

Último

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
ssuserdda66b
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 

Último (20)

Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 

ESSENTIAL of (CS/IT/IS) class 06 (database)

  • 1. SEIYUN UNIVERSITY College of Applied Science – CS department Instructor: Dr. Mazin Md. Alkathiri Information technology Department Faculty of Applied Sciences Seiyun University – Yemen Jan 2024
  • 2. SEIYUN UNIVERSITY College of Applied Science – CS department 2
  • 3. SEIYUN UNIVERSITY College of Applied Science – CS department •What is a database ? •Boring answer • A structured collection of data Example: A telephone directory •Insightful answer • A data-centered mirror of an organization’s business processes Structure of data reflects organizational processes Content of data reflects organization’s history 3 Database
  • 4. SEIYUN UNIVERSITY College of Applied Science – CS department • Is a computerized system that enables users to create and maintain a database. • The DBMS is a general-purpose software system that facilitates the processes of • defining, • constructing, • manipulating, • and sharing databases among various users and applications. • An application program accesses the database by sending queries or requests for data to the DBMS. Database Management System (DBMS) 4
  • 5. SEIYUN UNIVERSITY College of Applied Science – CS department 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 5
  • 6. SEIYUN UNIVERSITY College of Applied Science – CS department • In the early days, database applications were built on top of file systems • Drawbacks of using file systems to store data: 1. Data redundancy and inconsistency • Multiple file formats, duplication of information in different files 2. Difficulty in accessing data • Need to write a new program to carry out each new task 3. Data isolation — multiple files and formats 4. Integrity problems • Integrity constraints (e.g. account balance > 0) become part of program code • Hard to add new constraints or change existing ones Purpose of Database System 6
  • 7. SEIYUN UNIVERSITY College of Applied Science – CS department 5. Atomicity of updates • Failures may leave database in an inconsistent state with partial updates carried out • E.g. transfer of funds from one account to another should either complete or not happen at all 6. Concurrent access by multiple users • Concurrent accessed needed for performance • Uncontrolled concurrent accesses can lead to inconsistencies • E.g. two people reading a balance and updating it at the same time 7. Security problems • Database systems offer solutions to all the above problems Purpose of Database Systems (Cont.) 7
  • 8. SEIYUN UNIVERSITY College of Applied Science – CS department • Database systems comprise complex data-structures. • In order to make the system efficient in terms of retrieval of data, and reduce complexity, developers use abstraction i.e. hide irrelevant details from the users. • There are mainly 3 levels of data abstraction: 1. Physical level: describes how a record (e.g., customer) is stored. 2. Logical level: describes data stored in database, and the relationships among the data. type customer = record name : string; street : string; city : integer; end; 3. View level: application programs hide details of data types. Views can also hide information (e.g., salary) for security purposes. Levels of Abstraction 8
  • 9. SEIYUN UNIVERSITY College of Applied Science – CS department • An architecture for a database system View of Data 9
  • 10. SEIYUN UNIVERSITY College of Applied Science – CS department • An entity represents a real-world object or concept, • such as an employee or a project from the mini-world that is described in the database. • An attribute represents some property of interest that further describes an entity, • such as the employee’s name or salary. • A relationship among two or more entities represents an association among the entities, • for example, a works-on relationship between an employee and a project. • Other examples:  Customer - Orders - Product(s)  Order - Serviced by - Employee entities, attributes, and relationships 10
  • 11. SEIYUN UNIVERSITY College of Applied Science – CS department • A relational DB supports storage of data as a set of inter-related tables  Each table stores data about a set of Entities  Each table row is a record about one such Entity  Each record column is a field specifying an attribute of this Entity  Each record has a field that acts as a unique identifier of an entity  Relationships among entities are specified by referring to this unique identifier from other tables Relational Databases 11
  • 12. SEIYUN UNIVERSITY College of Applied Science – CS department A Sample Relational Database 12
  • 13. SEIYUN UNIVERSITY College of Applied Science – CS department DBMS Languages 13
  • 14. SEIYUN UNIVERSITY College of Applied Science – CS department Data Definition Language (DDL) • Specification notation for defining the database schema • E.g. create table account ( account-number char(10), balance integer) • DDL compiler generates a set of tables stored in a data dictionary • Data dictionary contains metadata (i.e., data about data) • database schema
  • 15. SEIYUN UNIVERSITY College of Applied Science – CS department Data Manipulation Language (DML) • Language for accessing and manipulating the data organized by the appropriate data model • retrieval, insertion, deletion, and modification of the data. • DML also known as query language • Two classes of languages • Procedural – user specifies what data is required and how to get those data • FORTRAN, COBOL, ALGOL, are examples of Procedural languges • Nonprocedural – user specifies what data is required without specifying how to get those data • SQL is the most widely used query language
  • 16. SEIYUN UNIVERSITY College of Applied Science – CS department 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