0% found this document useful (0 votes)
58 views36 pages

Unit - 8 Database and Database Management System

1) A database is a collection of related information organized in a useful manner that provides a foundation for procedures like retrieving, concluding, and decision making. 2) A Database Management System (DBMS) consists of interrelated data and programs to access, update, and delete the data. It addresses issues like data redundancy, inconsistency, and isolation that exist in traditional file systems. 3) The key components of a database system are hardware, software, people, procedures, and data. The system works to ensure data integrity, security, and organization for efficient retrieval.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
Download as pptx, pdf, or txt
0% found this document useful (0 votes)
58 views36 pages

Unit - 8 Database and Database Management System

1) A database is a collection of related information organized in a useful manner that provides a foundation for procedures like retrieving, concluding, and decision making. 2) A Database Management System (DBMS) consists of interrelated data and programs to access, update, and delete the data. It addresses issues like data redundancy, inconsistency, and isolation that exist in traditional file systems. 3) The key components of a database system are hardware, software, people, procedures, and data. The system works to ensure data integrity, security, and organization for efficient retrieval.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1/ 36

Unit- 8

Database and Database


Management System
Database Concept
• Introduction
• Data: Data is a collection of raw facts and figure which is isolated, un-interpreted, and
unorganized but able to organize into useful information. Data can be manipulated to
produce output. Data are raw facts from which we start to get information. Example: 1,
Rohit, Kathmandu. 2, Rashmi, Pokhara.
• Information: Information is the processed data i.e. after processing the data we can get
information
Student
S.N. Student ID Name Address
No:
1 101 Rohit Kathmandu
2 102 Rashmi Pokhara

• Database: A Database is a collection of related information about a subject organized in a


useful manner that provides a base or foundation for the procedure, such as retrieving
information, concluding and make a decision. Example: Result Sheet, Banking Record of the
Customer etc.
Database Concept
• Introduction
Database Concept
• Introduction
• Database Management System (DBMS): A Database management system consists of a
collection of interrelated data and a set of application programs to access, update and
delete the data. Example: MySQL, Oracle, MS Access etc
• Roles (Major uses) of database application software in Business
• Storing Data
• Accessing data when required
• Deleting or removing data
• Updating or modifying data
• Sharing of data
• Reducing data redundancy
• Providing data security
Database Concept
• Characteristics of Data
• Data Hierarchy: A Data Hierarchy refers to the broken down units of a database.

Student
S.N. Student ID No: Name Address
1 101 Rohit Kathmandu
2 102 Rashmi Pokhara

• Bit: Bit is the smallest unit of data, it is represented as 1 or 0.


• Byte: A collection of 8 bits is called bytes
• Field: A data item/ data element holds single facts. It is also called “Attribute”. Example:
S.N., Name and Address column in the above table of “Student” refers to the
fields/Attributes.
Database Concept
• Characteristics of Data
• Data Hierarchy:
• Record: It is the collection of related fields which represents a complete unit of information.
It is also called “Tuple”. Example: In the above table, “1 Rohit Kathmandu “ refers a record/
tuple.
• File: File is the collection of records.
• Database: It is the collection of files.
• Primary Key: Every record contains at least one field which uniquely identifies the record/
tuple. That field is called Primary key.
• Secondary Key: A secondary key is an additional key, or alternate key, which can be use in
addition to the primary key to locate specific data .
• Storing and Accessing Data : Records are stored in different ways on secondary storage media,
and the arrangement determines the manner in which they can be accessed .
• Sequential Access: Data records must be retrieved in the same physical sequence in which
they are stored.
• Direct/ Random Access: Users can retrieve records in any sequence, without regard to the
actual order on the storage medium.
Database Concept
• Characteristics of Data
• Data Definition: Data Definition is the process of describing the properties of data to be included in a
database table. During data definition, each field of a database table is defined. The finished
specification of data definition is termed as table structure. Following tasks needs to be regarding
field
• Name: Each field must have unique name
• Data Type: Data type of every field must be defined. It may be integer, text, date/time etc
• Properties (domain) : Size, range of data must be defined
• Data Dictionary: Data Dictionary contains data definition in a database. Collection of information
contained in data dictionary is defined below
• Table Structure: It includes, types, size, range, properties of each field
• Security information: It includes information like password
• Relation between the tables in the database
• Metadata: Information about the database table
• Data Integrity: Data integrity refers to the accuracy of data. Quality of data input determines the
quality of retrieved information therefore data integrity is important. To maintain data integrity
following factors are enforced in database.
• Data Validation: Data Validation is used to ensure that data entered into the database is valid. DBMS checks all field
before changes to a record are saved.
• Database Locking: Database locking prevents two individuals from changing the same data at the same time.
Database Concept
• Characteristics of Data
• Data Security and Privacy: Data security is the mechanism of protecting data against
destruction and misuse. Data privacy is an area of data protection that concerns the proper
handling of sensitive data. Data security must be enforced to achieve following:
• Authorization and authentication is used to protect against unauthorize access
• Detection and monitoring against suspicious traffic
• Disaster recovery plan in case of failure , data back up plan
• Protection against data loss
• Data Organization : Refers to arrangement of data for efficient retrieval. Two widely used data
organizations are Indexed organization and Direct Organization
• Indexed Organization: Keep track of data through indexing
• Direct Organization: Uses hashing algorithm to specify the exact storage.
• Entity and Entity Relation: Entities are objects or concepts that are important to the
organization. Example: In case of school/ college, teacher, students, books, programs are
entities. Entity relationship is the association between entities. Example: Techer teaches
students, Library contains books. Here teaching (teaches) establishes relation between teacher
and students. Similarly containing (contains) makes relation between library and books.
Database Concept
Database Vs File System
• The Traditional File Approach/Environment
During early days of computer system development, different users were using different
applications and they store their data in a data files which were accessible by their particular
application only . Like: Librarian uses library application and accountant uses accounting
application and they have separate data files file for their purpose. In this system, Librarian can
not access data file of accountant and vice versa. This kind of storing data file is known as
Traditional File Environment.
• Problems with File Approach:
• Data Duplication/Redundancy: Same data is stored by different users. Example: Name of
students, Address, Contact number are stored by Librarian and Accountant .
• Data inconsistency (Data Updating Issue): If there is any change in data, it has to be updated
in the data file. This results, all the users have to update in their data files. This may leads to
mismatch of data in the case any user has not updated his data file .
• Data Integrity Problem: Need of data field may differ for different users. Like: Examination
Department need details of subjects enrolled by a student but librarian may not concern with
subject details. Hence, data stored in different data files by different users may have different
kinds of field and their definition. This leads to integrity problem.
Database Concept
Database Vs File System
• Databases: The Modern Approach
A database, which is a logical group of files, can eliminate the problems of traditional
file environment. All the data are typically contained in the same storage, rather than
residing in many different files across the organization . Unlike the traditional
approach, in which different programs access the different files, the database is
arranged so that one set of software programs – the database management system
– provides access to all the data. Therefore, data redundancy, data isolation, and
data inconsistency are minimized. Besides, data security and data integrity are
increased.
Components of Database Management System
A database environment is a collective system of components that comprise and
regulate the group of data, and use of data, which consist of software, hardware,
people, techniques of handling database and the data also.
• Hardware: All computing devices and accessories, like: server, computer, laptop,
network devices, data backup devices etc.
• Software: Operating system, DBMS (MySQL, Oracle, MS Access etc),Application
programs, Antivirus etc.
• People: End-users, Programmers, Database Administrators, Database Designers,
System and Network experts etc.
• Procedure: Functions that controls the use of the database
• Data: These are the collected facts which are applicable to the system
Database Management System
• Databases: The Modern Approach
Classification of Databases
The Database Management System can be classified into different categories on the basis
of several criteria such as data model, number of users, number of sites etc.
Classification of Databases

Database Management System can be categorized on the basis of several criteria, as database
model, number of users, number of sites etc.
1. Based on Database Model: We have already discussed various models on this basis. They are:
Hierarchical Model, Network Model, Relational Model, Object Model etc. Hierarchical and
Network Models are also called legacy (logical) data model.
2. Based on Number of Users: Database are divided into two categories on the basis of number
of users. They are Single User Database model which is designed to use by only one user.
However, Multi-User Database Model supports multiple users.
3. Based on Number of sites: They are Centralized Database System in which data is stored in
single location. Whereas, data is stored at many locations in Distributed Database System
4. Based on the Purpose: General Purpose Database Systems are used for general purpose like:
accounting works, Library function, administrative works. But, Special Purpose Database
Systems used for particular nature of works, like scientific and research study etc.
Classification of Database Management Systems
Based on Number of Sites
(Centralized and Distributed Database)
Database Models
• Database Models
The database models or simply stated data model describes the structure of a database . It is a
collection of conceptual tools for describing data, relationship etc. It defines how the data are
stored and accessed . The four most common database models are: Hierarchical Data Model,
Network Data Model, Entity Relationship (E-R) Model, Relational Data Model and Object
Oriented Model .
• Hierarchical Data Model
In this model, records are logically organized into a hierarchy of relationship . A Hierarchically
structured data is arranged in an inverted tree pattern . All records in the hierarchy are called
nodes . Each node is related to the others in a parent-child relationship . Each parent record may
have one or more child records . The top level record in the hierarchy is called the root record .
Searching is fast in this model . However, this model is not suitable to structure the data of many –
to – relationship .
• Network Data Model
Network data model is modified version of the hierarchical data . In network data model each
node may have several parents . A network data model views all records in sets. The network data
model has a higher level of flexibility than hierarchical model . It is easier to restructure the
information stored in this structure, since the path of relationship enables to store member record
in an arbitrary manner . However, operation and maintenance of this model become complicated .
Database Models

Hierarchical Data Model Network Data Model


Database Model
• Entity Relationship (E-R) Data Model: In this model, Database is modeled by E-R diagram. E-R
diagram represents the entities (objects) and their relationship.

In the above diagram Student and College are entities. The diamond shaped “Study In”
represents their relationship. It can be understood as “Students study in a college” .
Whereas, Stu-Id, Stu-Name, Stu- Addr are called attributes (fields) of Student entity.
Similarly, Col_Id and Col-Name are attributed (fields) of college. Attributes (fields) provide
detail information about entities.
Database Model
Sample E-R Diagrams
Database Model
• Relational Data Model
In a Relational data model, data are arranged in a tabular form, which is easy for a user to
understand . Each table represents a relation and each row represents a record .
It highly flexible to program and retrieve data . It can be efficiently used with a computer
which has limited memory and processing capability . Its processing speed is comparatively
low; no processing can be done without establishing data relationship .
A relational database consists of a collection of tables, each of which is assigned a unique
name . A row in a table represents a relationship among a set of values. Name of table
represents the entity and column represents fields (attributes) . Row represents record
(tuple) and relationship among fields.
Database Model
• Relational Database Model
Student Teacher

Marks
Database Model
• Object Oriented Data Model: The basic concept behind this kind of data model is same
as object oriented programming . An object is similar to an entity . It consists of small
amount of data put together (Encapsulated) which is needed to perform an operation.
Database Model
Database Model
Sample of Object-Oriented Data Model
Database System Architecture
1. Centralized Architecture (Terminal to host processing)
With terminal-to-host processing
which is also called Centralized
Architecture, the applications and
database reside on the host computer.
The user interact with the applications
with “dumb” terminals (i.e. the
device has no processing capability
of its own) .
Database System Architecture
iii. Client/server architecture and
ii. File server Architecture
processing
Database System Architecture
2. File server processing: With file server processing, the applications and database reside
on the host computer, called file server . The database management system runs on the
users PC . When the user needs data from the file server, the file server sends to the
user the entire file with the data requested. The data is downloaded from file server for
analysis and manipulation. Similarly, data is uploaded by the user to the file server also .
3. Client/server architecture and processing: Client/server architecture links two or more
computers in an arrangement in which some machine (servers) perform computing
functions for end-users (clients) . The client requests applications, data, or processing
from the server, which acts on these requests by ‘serving’ the desired commodity .
Organizations can make systems faster and save money, primarily by gaining the
efficiency .
Database Users
Database users are those who interact with the database in order to query and
update the database and generate reports. On the basis of way interacting with
DBMS database users can be classified into the following categories:
1. Naïve User: They who query and update the database by invoking some
already written programs. For example, the owner of the book store can
update the list of books with new book arrival in the store.
2. Sophisticated Users: They are business analyst, scientists. They have
knowledge of query language. They can retrieve information from database
with the help of query language
3. Specialized User: They who have knowledge to write specialized database
programs such as knowledge base systems and experts systems
4. Application Programmers: They develop(write) database application programs
to facilitate easy data access for the database users
Database Administrator
Database Administrator (DBA): DBA is a person who has central control over both data and
application programs. The responsibilities of DBA may vary upon the job description and
corporate/ organization policies. Some of the responsibilities are:
• Schema Definition and modification: DBA creates the database schema using Data
Definition Language (DDL). He also modifies the schema as per changing needs of the
organization
• Security Enforcement and Administration: DBA establishes security and monitor it. It
involves adding and revoking users, auditing and checking security problems
• Performance tuning: He always involves to enhance the performance (whether the system
is becoming slower) of the system by checking indexes etc.
• Database Design: Works with the system development team during database design to
minimizes many problems of the system
• Data backup and maintenance: One of the most important responsibilities of DBA is to
backup the data on regular basis (daily, weekly, monthly, yearly etc) for the safety of the
data.
Cloud Databases
• Cloud computing
• Cloud computing is a technology that uses the internet for storing and managing data
on remote servers and then access data via the internet. This type of system allows
users to work on the remote. Cloud computing customers do not own the physical
infrastructure; they rent the usage from a third-party provider. Example: Google
Drive, one drive, drop box are cloud based storage system. In Nepal: Data Hub etc
• Cloud Databases
• Cloud Databases are typically built using the infrastructure of a cloud provider (such
as Google Cloud, Amazon Simple DB etc. ) . Cloud databases enables businesses to
create as easily scalable database with less in-house hardware and maintenance
requirements, and to only pay for the storage and traffic they use.
Cloud Databases
Characteristic of Cloud:
• On-demand- Self Service: Storing and accessing data in cloud, all controls are
provided to user. User can use it whenever and wherever they need
• Resource pooling: Multiple users can share the same space and resources.
• Security: Data security is high in cloud
• Less investment: All services are available through internet. Less investment in
hardware
Cloud Databases

Benefits of cloud database/computing:


• Speed (performance of the system is realized good)
• Savings (Low investment required)
• Security (Highly secure system)

You might also like