+
Database Management Systems
Lecture 1: Introduc7on to Database Concepts
Salam Khanji
College of Informa7on Security Engineering Technology
Abu Dhabi Polytechnic
Outline
n
Define Database
Define Database Management System (DBMS)
DBMS Functionalities
DBMS Components
Database Terminology
Structured Query Language (SQL)
Entity Relationship Diagram (ERD)
ERD Example
What is a Database (DB) ?
n
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.
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 ?
Database Management
n
Essential to success of information system
DBMS functionalities:
n
n
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
Database Management (continued)
n
DBMS components include:
n
n
Data
Hardware
Software
Networks
Procedures
Database servers
Database Management (continued)
+ Introduction to DB - Terminology
n
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 fitted
into predefined categories.
It was invented byE. F. Coddat IBM in 1970.
+ Database Sample
n
The student named Cooke is in class number 10 in which
Chemistry 101 is being taught.
Structured Query Language
SQL
+ SQL
n
Is a special-purpose programming language used designed
for managing data held in the relational database
management systems (RDBMS).
SQL examples: MySQL, SQLite for mobiles, Oracle SQL
It consists of:
n
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.
11
+ DDL
n
Statements that are used to build and modify the structure of
your tables and other objects in the database. When you
execute a DDL statement, it takes effect immediately.
12
+ DML
n
Statements that are used to work with the data in tables.
13
En7ty Rela7onship Diagram
ERD
+ ERD
n
Is a chart that visually represents the relationship between
database 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:
n
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.
15
16
ERD Cont.
17
How to Draw ERD
n
Example:
A database which defines students, registered classes, and their
grades.
n
Define entities:
Student Class Grades.
n
Define attributes for each entity:
Student: Number Name Email address
Class: Number Name Term
Grades: Student Class Grades.
18
How to Draw ERD Cont.
n
Example:
A database which defines students, registered classes, and their
grades.
n
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.
19
How to Draw ERD Cont.
n
Define symbols:
20
How to Draw ERD Cont.
Number
Number
Name
Name
Email
Term
Registers
Student
Class
has
Class
student
grades
Grades
Grade
St. No.
Class No
21
How to Draw ERD Cont.
n
Database Tables
22
Thank you Questions?