Professional Documents
Culture Documents
SYSTEMS
Md. Mominul Islam
Director ICT, National University
Mobile: 01713017550
email: mominul.islam@nu.ac.bd
2
Objectives
The objectives of this lesson are:
1. Database Languages(DDL, DML)
2. Data dictionary
3. Database Administrators and Database Users
4. Database Architecture
5. Transaction Management
6. Storage Management
7. Overall System Architecture & Application Architecture
8. Conceptual Database Design - Entity Relationship(ER)
Modeling
9. Relational Model
3
Database Languages
Database Languages
A database system provides a data-
definition language(DDL) to specify
the database schema and a data-
manipulation language(DML) to
express database queries and updates.
In practice, the data- definition and
data-manipulation languages are not
two separate languages; instead they
simply form parts of a single database
language, such as the widely used SQL
language.
4
data. A query is a statement requesting the retrieval of information. The portion of a DML
that involves information retrieval is called a query language. Although technically
incorrect, it is common practice to use the terms query language and data-manipulation
language synonymously.
6
Data Dictionary
A data dictionary contains metadata i.e data about the database. The data
dictionary is very important as it contains information such as what is in the
database, who is allowed to access it, where is the database physically stored
etc. The users of the database normally don't interact with the data dictionary, it
is only handled by the database administrators.
The data dictionary in general contains information about the following −
• Names of all the database tables and their schemas.
• Details about all the tables in the database, such as their owners, their
security constraints, when they were created etc.
• Physical information about the tables such as where they are stored and how.
• Table constraints such as primary key attributes, foreign key information etc.
• Information about the database views that are visible.
9
Database Architecture
We are now in a position to provide a
single picture (Figure 1.3) of the
various components of a database
system and the connections among
them.
Figure 1.3
13
Database Architecture(contd..)
We are now in a position to provide a
single picture (Figure 1.3) of the
various components of a database
system and the connections among
them.
Figure 1.3
14
Transaction Management
• A transaction is a collection of operations that
performs a single logical function in a database
application
• Transaction-management component ensures that
the database remains in a consistent (correct) state
despite system failures (e.g., power failures and
operating system crashes) and transaction failures.
• Concurrency-control manager controls the interaction
among the concurrent transactions, to ensure the
consistency of the database.
15
Storage Management
• Storage manager is a program module that
provides the interface between the low-level data
stored in the database and the application
programs and queries submitted to the system.
Overall System
Structure
17
Application Architectures
Domain of Attributes
The set of possible values that an attribute can take is called
the domain of the attribute. For example, the attribute day
may take any value from the set {Monday, Tuesday ... Friday}.
Hence this set can be termed as the domain of the attribute
day.
22
Simple attribute
If an attribute cannot be divided into simpler components, it is a simple
attribute. Example for simple attribute : employee_id of an employee.
23
If an attribute can take only a single value for each entity instance, it is a single valued
attribute.
example for single valued attribute : age of a student. It can take only one value for a
particular student.
24
One employee is assigned with only one parking space and one
parking space is assigned to only one employee. Hence it is a 1:1
relationship and cardinality is One-To-One (1:1)
30
One organization can have many employees , but one employee works in only one organization.
Hence it is a 1:N relationship and cardinality is One-To-Many (1:N)
31
One employee works in only one organization But one organization can have many employees.
Hence it is a M:1 relationship and cardinality is Many-to-One (M :1)
32
One student can enroll for many courses and one course can be enrolled by many students.
Hence it is a M:N relationship and cardinality is Many-to-Many (M:N)
33
Next lesson
Relational Model: Structure, Relational algebra
SQL and advanced SQL