Upload
wad-almashaikhi
View
233
Download
0
Embed Size (px)
Citation preview
7/26/2019 Introduction to DB Management System
1/22
+
!"#"$"%& (")"*&+&)# ,-%#&+%.&/#01& 23 4)#1560/75) #5 !"#"$"%& 85)/&9#%
,":"+ ;#- @)*>)&&1>)* A&/
7/26/2019 Introduction to DB Management System
2/22
+Outline
! Define Database
! Define Database Management System (DBMS)
! DBMS Functionalities
! DBMS Components
! Database Terminology
! Structured Query Language (SQL)
! Entity Relationship Diagram (ERD)
! ERD Example
2
7/26/2019 Introduction to DB Management System
3/22
+What is a Database (DB) ?
!A database is a collection ofinformation that is organized so
that it can easily be accessed, managed, and updated.
! It typically contains aggregations of data records or files,
such as sales transactions, product catalogs and inventories,
and customer profiles.
! Typically, data within a database is organized in tables of
rows and columns
!A database manager provides users the capabilities of
controlling read/write access, specifying report generation,
and analyzing usage.
3
7/26/2019 Introduction to DB Management System
4/22
+What is Database? Cont.
! Database Management System (DBMS): software that
administers one or more Databases.
! Database Administrator (DBA): person or group that
manages the DBMS.
! Is MS-Access a Database or a DBMS ?
4
7/26/2019 Introduction to DB Management System
5/22
+Database Management
! Essential to success of information system
! DBMS functionalities:
!
Organize data! Store and retrieve data efficiently
! Manipulate data (update and delete)
! Enforce referential integrity and consistency
! Enforce and implement data security policies and procedures
!
Back up, recover, and restore data
5
7/26/2019 Introduction to DB Management System
6/22
+Database Management (continued)
! DBMS components include:
! Data
! Hardware
!
Software
! Networks
! Procedures
! Database servers
6
7/26/2019 Introduction to DB Management System
7/22
+Database Management (continued)
7
7/26/2019 Introduction to DB Management System
8/22
+
!
Relation = Table
! Tuples = Rows
! Cardinality = Number of Rows of a Relation
!
Degree = Number of Columns of a Relation
!Attribute = named column of a relation.
! Domain = set of allowable values for one or more attributes.
!
Relational Database = is a set of tables containing data fittedinto predefined categories.
! It was invented byE. F. Coddat IBM in 1970.
Introduction to DB - Terminology8
7/26/2019 Introduction to DB Management System
9/22
+Database Sample9
! The student named Cooke is in class number 10 in which
Chemistry 101 is being taught.
7/26/2019 Introduction to DB Management System
10/22
+
,#10/#01&6 D0&1- .")*0"*&
,D.
7/26/2019 Introduction to DB Management System
11/22
+
!
Is a special-purpose programming language used designedfor managing data held in the relational database
management systems (RDBMS).
! SQL examples: MySQL, SQLite for mobiles, Oracle SQL
!
It consists of:
! Data Definition Language (DDL): to create tables or
relations.
! Data Manipulation Language (DML): to select (read),
update, insert, or delete data in the database.
! Data Control Language (DCL): to control the access
(Authorization) to the database. It offers to grant or
revoke privileges from users of the database.
SQL11
7/26/2019 Introduction to DB Management System
12/22
+
!
Statements that are used to build and modify the structure ofyour tables and other objects in the database. When you
execute a DDL statement, it takes effect immediately.
DDL12
7/26/2019 Introduction to DB Management System
13/22
+
!
Statements that are used to work with the data in tables.
DML13
7/26/2019 Introduction to DB Management System
14/22
+
@)7#- E&:"75)%9 !>"*1"+
@E!
7/26/2019 Introduction to DB Management System
15/22
+
!
Is a chart that visually represents the relationship betweendatabase entities.
! ERDs model an organizations data storage requirements with
three main components: entities, attributes, and
relationships.
! There are 3 ingredients in a standard entity-relationship
diagram:
! Entities: which represent people, places, items, events, or
concepts.
!
Attributes: which represent properties or descriptive qualities
of an entity. These are also known as data elements.
! Relationships: which represent the link between different
entities.
ERD15
7/26/2019 Introduction to DB Management System
16/22
+ERD Cont.
16
7/26/2019 Introduction to DB Management System
17/22
+How to Draw ERD
!
Example:
A database which defines students, registered classes, and their
grades.
! Define entities:
Student Class Grades.
! Define attributes for each entity:
Student: Number Name Email address
Class: Number Name Term
Grades: Student Class Grades.
17
7/26/2019 Introduction to DB Management System
18/22
+How to Draw ERD Cont.
!
Example:
A database which defines students, registered classes, and their
grades.
! Define relationships:
A student can be registered in N number of classes.
A student can be registered once in a class.
A student can have one final grade per each class.
18
7/26/2019 Introduction to DB Management System
19/22
+How to Draw ERD Cont.
!
Define symbols:
19
7/26/2019 Introduction to DB Management System
20/22
+How to Draw ERD Cont.
20
Student Class
Number
Name
Number
Name
Term
Grades
St. No.
Class No
Grade
Registers
has
Class student
grades
7/26/2019 Introduction to DB Management System
21/22
+How to Draw ERD Cont.
! Database Tables
21
7/26/2019 Introduction to DB Management System
22/22
+Thank you Questions?
22