Databases
Database
• Information is not useful if not organized
• In database, data are organized in a way that
people find meaningful and useful.
• Database Management System (DBMS) is
used to input, sort, organize and store data.
Figure 14-1
DBMS Components
• Hardware: the physical computer system
• Software: the program that allows users to access, maintain
update the data
• Data: Data are stored on the computer. In database data are
separate entity from the software that access them
• Users: could be either (1) end users: people who has access to
the database or (2) application program: applications that
access and process data
• Procedures: rules that are defined and followed by the users
Database architecture
• Internal Level: Interact
directly with the hardware
• Conceptual Level: (1) Define
the logical view of the data.
(2) Define the data model. (3)
Contain the main functions
of the DBMS (4)
Intermediary level that free
users from dealing with
internal level
• External Level: (1) Interact
directly with users (2)
Display data in familiar
format
Database Model
• Database model defines the logical design of
data.
• Database model describes the relation
between different parts of data.
• There are three database models:
1. Hierarchical Model
2. Network Model
3. Relational Model
Hierarchical model
• Data are organized in an upside down tree
• Each entity has one parent and many children
• Old and not used now
Network model
• Entities are organized in a graph
• Entities can be accessed through several paths
• Old and not used
Relational model
• Data are organized in two dimensional tables (relations)
• Tables re related to each other
• Relational Database Management System (RDBMS) are
more common model used today
Relation (Name, Attributes, Tuples)
• Relation appears in 2 dimensional table
• That doesn’t mean data stored as table; the physical
storage of data is independent of the logical organization
of data
• Attributes are the column
heading
• Each column must have a
unique heading
• Number of columns is
called the degree of the
relation
• Tuple is a collection
of attribute value
• Total number of rows
is called Cardinality
of the relation
• Each relation must have
a unique name
Name
OPERATIONS
OPERATIONS
ON
ON
RELATIONS
RELATIONS
Insert operation
• Unary operation
• Insert Operation: Inserts new tuple into the relation
Delete operation
• Unary operation
• Delete Operation: Deletes tuple from the relation
Update operation
• Unary operation
• Update Operation: Changes the values of some attributes
of a tulpe
Select operation
• Unary operation
• Select Operation: Uses some criteria to select
some tuples from the original relation
Project operation
• Unary operation
• Project Operation: Creates relation in
which each tulpe has fewer attributes
Join operation
• Binary operation
• Join Operation: Takes two relation and combine them
based on common attribute
Union operation
• Binary operation
• Union Operation: Creates new relation in which each
tuple is either in the first relation, the second relation or
in both
Intersection operation
• Binary operation
• Intersection Operation: Creates new relation in
which each tuple is either in both relations.
Difference operation
• Binary Operation
• Difference Operation: Creates new relation where the
new tuples are in the first relation but not in the
second.
STRUCTURED
STRUCTURED
QUERY
QUERY
LANGUAGE
LANGUAGE
SQL
• SQL is the standard language used for
relational databases.
• It is declarative language where users declare
what they want without having to write a step
by stem procedure.
• It was first implemented by Oracle
Corporation
1. Insert
• SQL Insert Operation format
insert into RELATION-NAME
values (…, …, …)
Insert (Example)
insert into COURSES
values (“CIS52”, “TCP/IP Protocols”, 6)
2. Delete
• SQL Delete Operation format
delete from RELATION-NAME
where criteria
Delete (Example)
Delete from COURSES
where No = “CIS19”
3. Update
• SQL Update Operation format
update RELATION-NAME
set attribute1 = value1 attribute 2 = value2 …
where criteria
Update (Example)
update COURSES
set unit = 6
where No = “CIS51”
4. Select
• SQL Select Operation format
select *
from RELATION-NAME
where criteria
Select (Example)
select *
from COURSES
where Unit = 5
5. Project
• SQL Project Operation format
select attribute-list
from RELATION-NAME
Project (Example)
select No, Unit
from COURSES
6. Join
• SQL Join Operation format
select attribute-list
from RELATION NO1, RELATION NO2
where criteria
Join (Example)
select No, Course-Name, Unit, Professor
from COURSES, TAUGHT-BY
where COURSES.No = TAUGHT-BY.No;
7. Union
• SQL Union Operation format
select *
from RELATION NO1
union
select *
from RELATION NO2
Union (Example)
select *
from CIS15-Roster
union
select *
from CIS52-Roster;
8. Intersection
• SQL Intersection Operation format
select *
from RELATION NO1
intersection
select *
from RELATION NO2
Intersection (Example)
select *
from CIS15-Roster
intersection
select *
from CIS52-Roster;
9. Difference
• SQL Difference Operation format
select *
from RELATION NO1
minus
select *
from RELATION NO2
Difference (Example)
select *
from CIS15-Roster
minus
select *
from CIS52-Roster;
OTHER
OTHER
DATABASE
DATABASE
MODELS
MODELS
Distributed Databases
• Based on the relational model
• Data are stored in several computers that
communicate through the internet
• Data are either (1) fragmented or (2) replicated
1. Fragmented Distributed
Databases
• Data are localized; data are stored on local site
• Data can be accessed from different sites as
well as the local site
• Although each site has complete control over
its local data, there is global control through
the internet
2. Replicated Distributed Database
• Each site holds an exact replica of another site
• Any modification in one site is repeated at
every site
• If the system fails in one site, the users at this
site can access data at another site
The levels of Data
Database One or more tables
Table
(relation)
A collection of Records
Record A group of related fields
Field One or more character
Character At least 8 bits
Bit 0 or 1
Types of Database Program
• Are the software tools used to create database.
Examples of database programs are:
1.File Management Programs
2.Database Management System
Advanced Databases
• Data Warehouses and Data Mining
A combination of smaller database that belong to the corporation
• Client/Server Database Systems
Software programs used to respond to remote users’ request for
information over the LAN. Server software runs on the server.
Client software connects the user to server. The front end of the
software is the part that interact with users. The back end refers to
the program code. To request information query language is used.
• Web-database integration
Enables customers to proceed enquires over the net. Users don’t
have to use SQL. The web server accept the request and
translates it to a query that is sent to the database over the internet
5 Characteristics of Good Database
Data Integrity Ensuring data is valid
Data Independence Data is separated from software
Avoiding data
Redundancy
Repetition of input data is avoided
Data Security Data is not accessible to unauthorized
users
Data Maintenance Set procedures for adding ,deleting …
records for the purpose of optimization

More Related Content

PPTX
database management system
PPTX
DataBase Management systems (IM).pptx
PPT
6.SE_Requirements Modeling.ppt
PDF
PPSX
PDF
ASMUG February 2015 Knowledge Event
PPTX
Week 2 - Database System Development Lifecycle-old.pptx
PPTX
Week 1 and 2 Getting started with DBMS.pptx
database management system
DataBase Management systems (IM).pptx
6.SE_Requirements Modeling.ppt
ASMUG February 2015 Knowledge Event
Week 2 - Database System Development Lifecycle-old.pptx
Week 1 and 2 Getting started with DBMS.pptx

Similar to joijoiiiiiiiiiiiiiiiiiiiiijoijiojoijoijoijoij (20)

PDF
APznzaa8jyCqEfOzIXqwAqxTBkpfxFd1OHN5G6XprVbamkoLUf3KcvZywfO4T71wgjvmg7lDxEuM5...
PDF
DBMS 1.pdf from computer application for business
PPTX
Diksha sda presentation
PPT
Kelis king - introduction to software design
PPT
various data models used in database management system
PDF
01-Database Administration and Management.pdf
PPTX
Introduction to Database Management Systems (DBMS)
PDF
20CS402 - DATABASE MANAGEMENT SYSTEMS NOTES
PPTX
Database Management System
PPTX
Utsav Mahendra : Introduction to Database and managemnet
PPTX
History of database processing module 1 (2)
PPT
Unit 9 Database Design using ORACLE and SQL.PPT
PPTX
Database management systems for students
PPTX
Presentation on DFD and System Analyst.pptx
PDF
Unit 1: Introduction to DBMS Unit 1 Complete
PPT
Ch 11-component-level-design
PPT
Notes on Understanding RDBMS2 for StudentsS.ppt
PPTX
data base management sysytem a new apprach .pptx
PPTX
Presentation on Database management system
PPT
02010 ppt ch02
APznzaa8jyCqEfOzIXqwAqxTBkpfxFd1OHN5G6XprVbamkoLUf3KcvZywfO4T71wgjvmg7lDxEuM5...
DBMS 1.pdf from computer application for business
Diksha sda presentation
Kelis king - introduction to software design
various data models used in database management system
01-Database Administration and Management.pdf
Introduction to Database Management Systems (DBMS)
20CS402 - DATABASE MANAGEMENT SYSTEMS NOTES
Database Management System
Utsav Mahendra : Introduction to Database and managemnet
History of database processing module 1 (2)
Unit 9 Database Design using ORACLE and SQL.PPT
Database management systems for students
Presentation on DFD and System Analyst.pptx
Unit 1: Introduction to DBMS Unit 1 Complete
Ch 11-component-level-design
Notes on Understanding RDBMS2 for StudentsS.ppt
data base management sysytem a new apprach .pptx
Presentation on Database management system
02010 ppt ch02
Ad

More from fermanrw (11)

PPTX
Constructiong Truth Table sfsdf sdfsf.pptx
PPTX
servers adasd adads lkdjflg kldfjg dfg lldfg
PPT
jklllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll...
PPT
Ch01-Introduction Databases and Database Users.ppt
PPT
datasbe books and lkjsald jad osjf sodf isfd
PPT
jojpojnoijoij iojoijioj oijoijiojij oijoijoi
PPT
DBMS Lec 1 & 2.pptsdfsdfsfsdfsdfsdfsdfsfd
PPT
Computer-Networks--Networking_Hardware.ppt
PDF
9-2020.pdf
PDF
Network Components.pdf
PDF
Network Components.pdf
Constructiong Truth Table sfsdf sdfsf.pptx
servers adasd adads lkdjflg kldfjg dfg lldfg
jklllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll...
Ch01-Introduction Databases and Database Users.ppt
datasbe books and lkjsald jad osjf sodf isfd
jojpojnoijoij iojoijioj oijoijiojij oijoijoi
DBMS Lec 1 & 2.pptsdfsdfsfsdfsdfsdfsdfsfd
Computer-Networks--Networking_Hardware.ppt
9-2020.pdf
Network Components.pdf
Network Components.pdf
Ad

Recently uploaded (20)

PPTX
IT infrastructure and emerging technologies
PDF
LATAM’s Top EdTech Innovators Transforming Learning in 2025.pdf
PPTX
growth and developement.pptxweeeeerrgttyyy
PPTX
Diploma pharmaceutics notes..helps diploma students
PDF
GSA-Past-Papers-2010-2024-2.pdf CSS examination
PDF
Compact First Student's Book Cambridge Official
PDF
FAMILY PLANNING (preventative and social medicine pdf)
PPTX
operating_systems_presentations_delhi_nc
PPTX
Copy of ARAL Program Primer_071725(1).pptx
PPTX
ACFE CERTIFICATION TRAINING ON LAW.pptx
PDF
Kalaari-SaaS-Founder-Playbook-2024-Edition-.pdf
PDF
faiz-khans about Radiotherapy Physics-02.pdf
PPTX
Math 2 Quarter 2 Week 1 Matatag Curriculum
PPSX
namma_kalvi_12th_botany_chapter_9_ppt.ppsx
PPTX
Thinking Routines and Learning Engagements.pptx
PPTX
MMW-CHAPTER-1-final.pptx major Elementary Education
PPT
hsl powerpoint resource goyloveh feb 07.ppt
PDF
Laparoscopic Imaging Systems at World Laparoscopy Hospital
PPTX
2025 High Blood Pressure Guideline Slide Set.pptx
PPTX
Power Point PR B.Inggris 12 Ed. 2019.pptx
IT infrastructure and emerging technologies
LATAM’s Top EdTech Innovators Transforming Learning in 2025.pdf
growth and developement.pptxweeeeerrgttyyy
Diploma pharmaceutics notes..helps diploma students
GSA-Past-Papers-2010-2024-2.pdf CSS examination
Compact First Student's Book Cambridge Official
FAMILY PLANNING (preventative and social medicine pdf)
operating_systems_presentations_delhi_nc
Copy of ARAL Program Primer_071725(1).pptx
ACFE CERTIFICATION TRAINING ON LAW.pptx
Kalaari-SaaS-Founder-Playbook-2024-Edition-.pdf
faiz-khans about Radiotherapy Physics-02.pdf
Math 2 Quarter 2 Week 1 Matatag Curriculum
namma_kalvi_12th_botany_chapter_9_ppt.ppsx
Thinking Routines and Learning Engagements.pptx
MMW-CHAPTER-1-final.pptx major Elementary Education
hsl powerpoint resource goyloveh feb 07.ppt
Laparoscopic Imaging Systems at World Laparoscopy Hospital
2025 High Blood Pressure Guideline Slide Set.pptx
Power Point PR B.Inggris 12 Ed. 2019.pptx

joijoiiiiiiiiiiiiiiiiiiiiijoijiojoijoijoijoij

  • 2. Database • Information is not useful if not organized • In database, data are organized in a way that people find meaningful and useful. • Database Management System (DBMS) is used to input, sort, organize and store data.
  • 3. Figure 14-1 DBMS Components • Hardware: the physical computer system • Software: the program that allows users to access, maintain update the data • Data: Data are stored on the computer. In database data are separate entity from the software that access them • Users: could be either (1) end users: people who has access to the database or (2) application program: applications that access and process data • Procedures: rules that are defined and followed by the users
  • 4. Database architecture • Internal Level: Interact directly with the hardware • Conceptual Level: (1) Define the logical view of the data. (2) Define the data model. (3) Contain the main functions of the DBMS (4) Intermediary level that free users from dealing with internal level • External Level: (1) Interact directly with users (2) Display data in familiar format
  • 5. Database Model • Database model defines the logical design of data. • Database model describes the relation between different parts of data. • There are three database models: 1. Hierarchical Model 2. Network Model 3. Relational Model
  • 6. Hierarchical model • Data are organized in an upside down tree • Each entity has one parent and many children • Old and not used now
  • 7. Network model • Entities are organized in a graph • Entities can be accessed through several paths • Old and not used
  • 8. Relational model • Data are organized in two dimensional tables (relations) • Tables re related to each other • Relational Database Management System (RDBMS) are more common model used today
  • 9. Relation (Name, Attributes, Tuples) • Relation appears in 2 dimensional table • That doesn’t mean data stored as table; the physical storage of data is independent of the logical organization of data • Attributes are the column heading • Each column must have a unique heading • Number of columns is called the degree of the relation • Tuple is a collection of attribute value • Total number of rows is called Cardinality of the relation • Each relation must have a unique name Name
  • 11. Insert operation • Unary operation • Insert Operation: Inserts new tuple into the relation
  • 12. Delete operation • Unary operation • Delete Operation: Deletes tuple from the relation
  • 13. Update operation • Unary operation • Update Operation: Changes the values of some attributes of a tulpe
  • 14. Select operation • Unary operation • Select Operation: Uses some criteria to select some tuples from the original relation
  • 15. Project operation • Unary operation • Project Operation: Creates relation in which each tulpe has fewer attributes
  • 16. Join operation • Binary operation • Join Operation: Takes two relation and combine them based on common attribute
  • 17. Union operation • Binary operation • Union Operation: Creates new relation in which each tuple is either in the first relation, the second relation or in both
  • 18. Intersection operation • Binary operation • Intersection Operation: Creates new relation in which each tuple is either in both relations.
  • 19. Difference operation • Binary Operation • Difference Operation: Creates new relation where the new tuples are in the first relation but not in the second.
  • 21. SQL • SQL is the standard language used for relational databases. • It is declarative language where users declare what they want without having to write a step by stem procedure. • It was first implemented by Oracle Corporation
  • 22. 1. Insert • SQL Insert Operation format insert into RELATION-NAME values (…, …, …)
  • 23. Insert (Example) insert into COURSES values (“CIS52”, “TCP/IP Protocols”, 6)
  • 24. 2. Delete • SQL Delete Operation format delete from RELATION-NAME where criteria
  • 25. Delete (Example) Delete from COURSES where No = “CIS19”
  • 26. 3. Update • SQL Update Operation format update RELATION-NAME set attribute1 = value1 attribute 2 = value2 … where criteria
  • 27. Update (Example) update COURSES set unit = 6 where No = “CIS51”
  • 28. 4. Select • SQL Select Operation format select * from RELATION-NAME where criteria
  • 29. Select (Example) select * from COURSES where Unit = 5
  • 30. 5. Project • SQL Project Operation format select attribute-list from RELATION-NAME
  • 31. Project (Example) select No, Unit from COURSES
  • 32. 6. Join • SQL Join Operation format select attribute-list from RELATION NO1, RELATION NO2 where criteria
  • 33. Join (Example) select No, Course-Name, Unit, Professor from COURSES, TAUGHT-BY where COURSES.No = TAUGHT-BY.No;
  • 34. 7. Union • SQL Union Operation format select * from RELATION NO1 union select * from RELATION NO2
  • 35. Union (Example) select * from CIS15-Roster union select * from CIS52-Roster;
  • 36. 8. Intersection • SQL Intersection Operation format select * from RELATION NO1 intersection select * from RELATION NO2
  • 37. Intersection (Example) select * from CIS15-Roster intersection select * from CIS52-Roster;
  • 38. 9. Difference • SQL Difference Operation format select * from RELATION NO1 minus select * from RELATION NO2
  • 39. Difference (Example) select * from CIS15-Roster minus select * from CIS52-Roster;
  • 41. Distributed Databases • Based on the relational model • Data are stored in several computers that communicate through the internet • Data are either (1) fragmented or (2) replicated
  • 42. 1. Fragmented Distributed Databases • Data are localized; data are stored on local site • Data can be accessed from different sites as well as the local site • Although each site has complete control over its local data, there is global control through the internet
  • 43. 2. Replicated Distributed Database • Each site holds an exact replica of another site • Any modification in one site is repeated at every site • If the system fails in one site, the users at this site can access data at another site
  • 44. The levels of Data Database One or more tables Table (relation) A collection of Records Record A group of related fields Field One or more character Character At least 8 bits Bit 0 or 1
  • 45. Types of Database Program • Are the software tools used to create database. Examples of database programs are: 1.File Management Programs 2.Database Management System
  • 46. Advanced Databases • Data Warehouses and Data Mining A combination of smaller database that belong to the corporation • Client/Server Database Systems Software programs used to respond to remote users’ request for information over the LAN. Server software runs on the server. Client software connects the user to server. The front end of the software is the part that interact with users. The back end refers to the program code. To request information query language is used. • Web-database integration Enables customers to proceed enquires over the net. Users don’t have to use SQL. The web server accept the request and translates it to a query that is sent to the database over the internet
  • 47. 5 Characteristics of Good Database Data Integrity Ensuring data is valid Data Independence Data is separated from software Avoiding data Redundancy Repetition of input data is avoided Data Security Data is not accessible to unauthorized users Data Maintenance Set procedures for adding ,deleting … records for the purpose of optimization