0% found this document useful (0 votes)
8 views20 pages

DB Week 3

Uploaded by

abdullahzahidhp
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views20 pages

DB Week 3

Uploaded by

abdullahzahidhp
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 20

CSC355-Database Systems

Week-3 Lecture 1 & 2

Semester
4- Spring 2021

Lahore Garrison University 1


Chapter 2-Database
Environment

Three Level Architecture


Previous
Lecture
Mapping

Data Independence
Data Definition Language (DDL)
 Allows the DBA or user to describe or name
Database entities, attributes, and relationships
required for the application
Language (DDL)
 Plus, any associated integrity and security
constraints.
Database Language (DML)

 Data Manipulation Language (DML)


 Provides basic data manipulation operations on data held
in the database.
 Procedural DML
 Allows user to tell system exactly how to manipulate
data.
 Non-Procedural DML
 Allows user to state what data is needed rather than how
it is to be retrieved.
5

DDL vs.
DML

Lahore Garrison University


Fourth Generation Languages (4GLs)
 Forms generators: A forms generator is an
interactive facility for rapidly creating data
input and display layouts for screen forms.
 Report generators: A report generator is
Database a facility for creating reports from data
Language stored in the database.
 Graphics generators: A graphics
(DML) generator is a facility to retrieve data from
the database and display the data as a graph
showing trends and relationships in the
data.
 Application generators: An application
generator is a facility for producing a
program that interfaces with the database.
Lahore Garrison University 6
Data Model

Integrated collection of concepts for describing data, relationships


between data, and constraints on the data in an organization.
Data Model comprises:
 A structural part consisting of a set of rules according to which databases
can be constructed;
 A manipulative part defining the types of operation that are allowed on the
data (this includes the operations that are used for updating or retrieving
data from the database and for changing the structure of the database);
 Possibly a set of integrity rules which ensures that the data is accurate.
 Purpose
 To represent data in an
understandable way.

Data Model  Categories of data models include:


 Object-based
 Record-based
 Physical.
Data Models

 Object-Based Data Models


 Entity-Relationship
 Semantic
 Functional
 Object-Oriented.

 Record-Based Data Models


 Relational Data Model
 Network Data Model
 Hierarchical Data Model.

 Physical Data Models


Relational Data Model
Network Data Model
Hierarchical Data Model
 Conceptual schema is the core of a
system supporting all user views.
 Should be complete and accurate
representation of an organization’s data
requirements.
Conceptual
Modelling  Conceptual modelling is process of
developing a model of information
usage, that is independent of
implementation details.
 Result is a conceptual data model.
14
Functions of a DBMS

1. Data storage, retrieval, and update: A DBMS must furnish users with the
ability to store, retrieve, and update data in the database.
2. A user-accessible catalog: A DBMS must furnish a catalog in which
descriptions of data items are stored and which is accessible to users. The amount
of information and the way the information is used vary with the DBMS. Typically,
the system catalog stores:
I. names, types, and sizes of data items;
II. names of relationships;
III. integrity constraints on the data;
IV. names of authorized users who have access to the data and many more.

Lahore Garrison University


15
Functions of a DBMS

3. Transaction support: A DBMS must furnish a mechanism which will ensure


either that all the updates corresponding to a given transaction are made or that
none of them is made.
A more complicated example might be to delete a member of staff from the
database and to reassign the properties that he or she managed to another
member of staff. In this case, there is more than one change to be made to
the database.
If the transaction fails during execution, perhaps because of a computer
crash, the database will be in an inconsistent state: some changes will have
been made and others not.

Lahore Garrison University


16
Functions of a DBMS

4. Concurrency control services: A DBMS must furnish a mechanism to ensure that the
database is updated correctly when multiple users are updating the database concurrently.
Concurrent access is relatively easy if all users are only reading data, as there is no
way that they can interfere with one another. However, when two or more users are
accessing the database simultaneously and at least one of them is updating data, there may
be interference that can result in inconsistencies.

Lahore Garrison University


17
Functions of a DBMS

5. Recovery services: A DBMS must furnish a mechanism for recovering the


database if the database is damaged in any way.
6. Authorization services: A DBMS must furnish a mechanism to ensure that only
authorized users can access the database.
For example, we may want only branch managers to see salary-related
information for staff and prevent all other users from seeing this data.
Additionally, we may want to protect the database from unauthorized access.
The term security refers to the protection of the database against
unauthorized access, either intentional or accidental.

Lahore Garrison University


18
Functions of a DBMS

7. Support for data communication: A DBMS must be capable of integrating with


communication software.
8. Integrity services: Database integrity refers to the correctness and consistency of
stored data: it can be considered as another type of database protection. While integrity
is related to security, it has wider implications: integrity is concerned with the quality of
data itself.
Integrity is usually expressed in terms of constraints, which are consistency
rules that the database is not permitted to violate. For example, we may want to
specify a constraint that no member of staff can manage more than 100 properties
at any one time.

Lahore Garrison University


19
Functions of a DBMS

9. Services to promote data independence: A DBMS must include facilities to support


the independence of programs from the actual structure of the database. Data
independence is normally achieved through a view or subschema mechanism.
10. Utility services: Utility programs help the DBA to administer the database effectively.
 Import facilities, to load the database from flat files, and export facilities, to unload the
database to flat files;
 Monitoring facilities, to monitor database usage and operation;
 Statistical analysis programs, to examine performance or usage statistics;
 Index reorganization facilities, to reorganize indexes and their overflows;
 Garbage collection and reallocation, to remove deleted records physically from the
storage devices, to consolidate the space released, and to reallocate it where it is
needed.
Lahore Garrison University
20
Next lecture

 Components of a DBMS
 Multi-User DBMS Architectures

Lahore Garrison University

You might also like