Professional Documents
Culture Documents
ng
CSC 214
LECTURE 1
1
Lecture Outline
File based approach to data management
A database-oriented approach to data management
Applications of database technology
DBMS
Components of a DBMS
Data Abstractions
2
Lecture Objectives
3
Overview of Database System
A file system is a software that provides hierarchical storage and
organization of files (usually on a single computer).
File-Based Systems- A collection of application programs that
perform services for the end-users such as the production of
reports.
A step back in time: File based approach to data
management
File based approach to data management
Changing the structure of the DBMS would require Changing the structure of a file would require changing
updating the catalog, but not the applications. each application that accesses it.
“program-data independence”
Different views over( a subset of) the data can be defined. Different views would require copying (parts of) some
This allows different users with different needs to use the files. Any changes made to those duplicates should be
same data carefully merged in all other duplicates
Multiple users can access the same data at the same time. It is impossible to have multiple people or applications
For this, the DBMS includes concurrency control to ensure working on the same file.
no conflicting operations are executed
Applications of database technology
A software system that enables users to define, create, and maintain the
database and that provides controlled access to this database.
Functions of a DBMS
Create databases
Create supporting structures
– A user accessible catalog
Data storage, retrieval and update
– Modify database data(insert, update, delete)
Transaction support
– Concurrency control services
Functions of a DBMS cont.
Enforce rules
– Integrity issues
Provide security
– Authorization services
Services to promote data independence
Perform data backup- and recovery
Components of a Database System
Database Contents
Disadvantages of a database
• Is a descriptive language that allows the DBA or users to describe and name
the entities required for the application and the relationships that may exist
between the different entities.
• DDL statements are compiled, resulting in a set of tables stored in a special
file called a data dictionary or data directory. The data directory contains
metadata (data about data).
Data Manipulation Language (DML)
• Data Manipulation is a language that provides a set of operations to
support the basic data manipulation operations on the data held in the
database.
• A DML is a language which enables users to access and manipulate
data. The goal is to provide efficient human interaction with the
system.
Data Definition Language (DDL) cont.
A query language is a portion of a DML involving information retrieval
only. The terms DML and query language are often used synonymously.
– retrieval of information from the database
– insertion of new information into the database
– deletion of information in the database
– modification of information in the database
Database Applications
33
Data Abstraction
Data abstraction is Masking the unwanted data from users, this happens at
different levels in the database.
34
Levels of Abstraction
External level
– For example, student will not have access to see Lecturers salary details, one employee
will not have access to see other employees details, unless he is a manager. At this level,
one can access the data from database and perform some calculations based on the data.
35
For example calculate the tax from the salary of employee, calculate CGPA of a
Student, Calculate age of a person from his Date of Birth etc. These users can be
real users or any programs.
Any changes/ computations done at this level will not affect other levels of data.
That means, if we retrieve the few columns of the STUDENT table, it will not
change the whole table, or if we calculate the CGPA of a Student, it will not
change/update the table.
36
Logical/ Conceptual level
This is the next level of abstraction. It describes the actual data stored in the
database in the form of tables and relates them by means of mapping. This
level does not have any information on what a user views at external level.
This level have all the data in the database.
Any changes done in this level will not affect the external or physical levels
of data. That is any changes to the table structure or the relation will not
modify the data that the user is viewing at the external view or the storage at
the physical level.
37
Logical/ Conceptual level
For example, suppose we have added a new column ‘skills’ which will not
modify the external view data on which the user was viewing Ages of the
students. Similarly, it will have space allocated for ‘Skills’ in the physical
memory, but it will not modify the space or address of Date of Birth (using
which Age will be derived) in the memory. Hence external and physical
independence is achieved.
38
Internal level
This is one of the intermediary levels. In most cases, this level is not
mentioned and usually it is said that we have 3 levels of data abstraction. This
level depends on the DBMS software. This level is how the database is seen
from DBMS.We can even combine logical level and this level.
39
Physical level
This is the lowest level in data abstraction. This level describes how the data
is actually stored in the physical memory like magnetic tapes, hard disks etc.
In this level the file organization methods like hashing, sequential, B+ tree
comes into picture. At this level, developer would know the requirement,
size and accessing frequency of the records clearly. So designing this level
will not be much complex for him.
40
Data Abstraction Levels:
41
Data independence
Data Independence is the ability to modify schema definition in one level
without affecting schema definition in the next higher level.
It is the type of data transparency that matters for a centralized DBMS.
It refers to the immunity of user applications to changes made in the
definition and organization of data.
The data independence and operation independence together gives the
feature of data abstraction.
43
Feature of Data Abstraction
44
Physical Level of Data Independence
Physical data independence is the ability to modify the physical schema
without causing application programs to be rewritten.
Modifications at this level are occasionally necessary to improve
performance, thus, this level deals with hiding the details of the storage
structure from user applications.
It means the physical storage/level is changeable without affecting the
conceptual or external view of the data. The new changes are absorbed by
mapping techniques.
45
Logical Level of Data Independence
Logical data independence is the ability to modify the logical schema
without causing application program to be rewritten.
Modifications at the logical level are necessary whenever the logical
structure of the database is altered (for example, when money-market
accounts are added to banking system).
For instance, if new columns are added or removed from a table, then the
user view and programs should not change.
46
Logical Level of Data Independence
For example: consider two users A & B. Both are selecting the fields
"EmployeeNumber" and "EmployeeName". If user B adds a new column
(e.g. salary) to his table, it will not effect the external view for user A,
though the internal schema of the database has been changed for both users
A & B.
47
Logical Level of Data Independence
48
Advantage of data independence
The conceptual schema can be changed at one level without affecting the
data at another level.
The structure of a database can be changed without affecting the data
required by users and programs. This feature was not available in the file
oriented approach.
49
Types of Database
53
Class Activity 2
54
Class Activity 3
Discuss the database technology trends that will continue in 2020s – The
future of database technology
55
Exercises
1.What does the term data independence mean and why is it an important goal?
2. List five costs or risks associated with database approach.
3. Perform a search on the internet of relational DBMS vendors. Pick two competing products
and discus whether each is scalable and if it can be used for a personal, workshop,
departmental, enterprise, or Internet database.
4. One of the biggest challenges of building e-commerce sites has been the ability to quickly
deliver merchandise ordered by customers over the web. Why do you think companies turned
to database solutions to help them improve their supply chain management and expedite the
filling and delivery of orders
5. Explain the difference between user views, a conceptual schema, and an internal schema as
different perspectives of the same database
56
Lecture Reference
Ramakrishnan, R., Gehrke, J.: Database Management Systems. USA: McGraw Hill
Companies (2000)
Elmasri, R., & Navathe, S. (2000). Fundamentals of database systems (3rd ed.). Reading,
Mass.: Addison-Wesley.
Hoffer, J. A., Prescott, M. B., & McFadden, F. R. (2005). Modern database management.
Upper Saddle River, N.J: Pearson/ Prentice Hall.
Connolly, T. M., & Begg, C. E. (2002). Database systems: A practical approach to
design, implementation, and management. Harlow, England: Addison-Wesley
http://pages.cs.wisc.edu/~dbbook/openAccess/thirdEdition/solutions/ans3ed-
oddonly.pdf
https://gyires.inf.unideb.hu/GyBITT/03/
57