0% found this document useful (0 votes)
46 views11 pages

DBMS Unit 1

DATA BASE

Uploaded by

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

DBMS Unit 1

DATA BASE

Uploaded by

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

Difference between File System and DBMS

Basics File System DBMS

The file system is a way of


DBMS is software for
arranging the files in a storage
managing the database.
Structure medium within a computer.

Data Redundant data can be present In DBMS there is no


Redundancy in a file system. redundant data.

It doesn’t provide Inbuilt It provides in house tools for


Backup and mechanism for backup and backup and recovery of data
Recovery recovery of data if it is lost. even if it is lost.

Query There is no efficient query Efficient query processing is


processing processing in the file system. there in DBMS.

There is more data


There is less data consistency in
consistency because of the
the file system.
Consistency process of normalization.

It has more complexity in


It is less complex as compared to
handling as compared to the
DBMS.
Complexity file system.

DBMS has more security


File systems provide less security
Security mechanisms as compared to
in comparison to DBMS.
Constraints file systems.

It has a comparatively higher


It is less expensive than DBMS.
Cost cost than a file system.

In DBMS data independence


exists, mainly of two types:
There is no data independence. 1) Logical Data Independence.
Data 2)Physical Data
Independence Independence.

Only one user can access data at Multiple users can access
User Access a time. data at a time.
Basics File System DBMS

The user has to write


The users are not required to
procedures for managing
write procedures.
Meaning databases

Data is distributed in many files. Due to centralized nature data


Sharing So, it is not easy to share data. sharing is easy

Data It give details of storage and It hides the internal details of


Abstraction representation of data Database

Integrity Integrity Constraints are difficult Integrity constraints are easy


Constraints to implement to implement

To access data in a file , user


No such attributes are
requires attributes such as file
required.
Attributes name, file location.

Example Cobol, C++ Oracle, SQL Server


Different types of Database Users:
Database users are categorized based up on their interaction with the database. These are seven
types of database users in DBMS.
1. Database Administrator (DBA) : Database Administrator (DBA) is a person/team who defines
the schema and also controls the 3 levels of database. The DBA will then create a new account
id and password for the user if he/she need to access the database. DBA is also responsible
for providing security to the database and he allows only the authorized users to access/modify
the data base. DBA is responsible for the problems such as security breaches and poor system
response time.
 DBA also monitors the recovery and backup and provide technical support.
 The DBA has a DBA account in the DBMS which called a system or superuser account.
 DBA repairs damage caused due to hardware and/or software failures.
 DBA is the one having privileges to perform DCL (Data Control Language) operations such
as GRANT and REVOKE, to allow/restrict a particular user from accessing the database.
2. Naive / Parametric End Users : Parametric End Users are the unsophisticated who don’t have
any DBMS knowledge but they frequently use the database applications in their daily life to get
the desired results. For examples, Railway’s ticket booking users are naive users. Clerks in any
bank is a naive user because they don’t have any DBMS knowledge but they still use the
database and perform their given task.
3. System Analyst :
System Analyst is a user who analyzes the requirements of parametric end users. They check
whether all the requirements of end users are satisfied.
4. Sophisticated Users : Sophisticated users can be engineers, scientists, business analyst, who
are familiar with the database. They can develop their own database applications according to
their requirement. They don’t write the program code but they interact the database by writing
SQL queries directly through the query processor.
5. Database Designers : Data Base Designers are the users who design the structure of
database which includes tables, indexes, views, triggers, stored procedures and constraints
which are usually enforced before the database is created or populated with data. He/she
controls what data must be stored and how the data items to be related. It is responsibility of
Database Designers to understand the requirements of different user groups and then create a
design which satisfies the need of all the user groups.
6. Application Programmers : Application Programmers also referred as System Analysts or
simply Software Engineers, are the back-end programmers who writes the code for the
application programs. They are the computer professionals. These programs could be written in
Programming languages such as Visual Basic, Developer, C, FORTRAN, COBOL etc.
Application programmers design, debug, test, and maintain set of programs called “canned
transactions” for the Naive (parametric) users in order to interact with database.
7. Casual Users / Temporary Users : Casual Users are the users who occasionally use/access
the database but each time when they access the database they require the new information,
for example, Middle or higher level manager.
8. Specialized users : Specialized users are sophisticated users who write
specialized database application that does not fit into the traditional data-
processing framework. Among these applications are computer aided-design
systems, knowledge-base and expert systems etc.
Types of Data Models in DBMS
Now let us take at some of the data models in dbms to have an in-depth understanding of
the topic with the below illustration showing all the types of data models in dbms.

The description of various types of data models in dbms is given with suitable examples.
1. Hierarchical Model
The hierarchical model is one of the types among many data models in dbms used in early
database systems that organize data into a tree-like structure, similar to a computer file
system. In a hierarchical model, data is organized into a series of levels or layers, with each
layer representing a particular type of data. The data is stored as records, which are linked
together through parent-child relationships.
In a hierarchical model, each record has only one parent, except for the root record, which
cannot have any parent being alone at the top. Child records can have multiple parents, but
they are typically organized in a way that ensures a strict hierarchy is maintained. For
example, in a company organizational chart, the CEO might be at the top of the hierarchy,
followed by senior executives, managers, and individual contributors.
This structure is efficient for representing one-to-many relationships, where a single parent
record can have many child records, but it can be less flexible than other data models for
more complex relationships.
2. Network Model
It is another of the many types of data models in dbms. It was introduced in the 1960s by
the Database Task Group. Being one of the early data models in dbms, it organizes data
into a more flexible, complex structure than the hierarchical model. In a network model, data
is organized into a graph-like structure, where each record can have multiple parent or child
records, forming a network of relationships.

In a network model, records are organized into sets called "types," which are similar to
tables in the relational model. Each type can have multiple records, and each record can
have multiple "owners" and "members." Owners are the parent records that own or connect
to the child records (members) through "sets" that define the relationships between records.
The network model is based on the concept of many-to-many relationships, where each
record can have multiple parents and children, allowing for more complex and flexible data
relationships than the hierarchical model. This structure is efficient for representing complex
relationships, such as in large manufacturing or scientific applications.
3. Relational Model
The relational model is a type of data model used in database systems that organizes data
into tables, with each table representing a specific entity or relationship between entities. In
a relational model, data is organized into rows and columns, with each row representing a
unique record or instance of the entity, and each column representing a specific attribute or
characteristic of the entity.
In a relational model, relationships between entities are represented using foreign keys,
which link records in different tables based on a common attribute. For example, in a
database for a company, the customer table might have a foreign key linking to the
orderDetail table based on the customerID attribute.
This relational model is efficient for representing one-to-many and many-to-many
relationships, where multiple records can be associated with a single record in another
table. It is based on the concept of set theory where each table maintains records and each
column has a value for its attribute.
4. Object-Oriented Model
One of the various types of data models in dbms follows the paradigms of object-oriented
programming. The data is in form of objects, which are instances of a certain class with
each having its own methods and attributes.
In an object-oriented model, objects can inherit attributes and methods from parent objects,
allowing for the hierarchical organization of the data. For example, in a database for a
company, the Employee object might inherit attributes and methods from the Person object,
which might inherit from the Object object.

It is based on the pillars of object-oriented programming such as Polymorphism,


Inheritance, and Encapsulation.
5. Object Relational Model
The Object-Relational Model (ORM) is a type of data model that combines elements of the
relational and object-oriented models. It aims to provide the flexibility and scalability of
object-oriented programming while still retaining the relational database’s robustness and
performance.
In the ORM, data is represented as objects, just like in the object-oriented model. These
objects have attributes and methods, and they can be organized into hierarchies and
inherited from one another. However, unlike the object-oriented model, these objects are
stored in a relational database, where they can be queried and manipulated using SQL.
6. Semi-structured Data Model
The semi-structured data model is a type of data model that allows for flexible
representation of data without requiring a strict schema or predefined structure. In a semi-
structured data model, data is organized into a hierarchy of nodes and edges, with each
node representing a specific entity or element and each edge representing a relationship
between nodes.
Semi-structured data often takes the form of documents, such as HTML, XML, or JSON
files, which contain data organized into a hierarchical structure. However, unlike a
structured data model, semi-structured data does not require a strict schema or predefined
structure, meaning that the data can be modified or updated without requiring extensive
changes to the underlying data model.
Data model Schema and Instance
o The data which is stored in the database at a particular moment of time is called an
instance of the database.
o The overall design of a database is called schema.
o A database schema is the skeleton structure of the database. It represents the logical
view of the entire database.
o A schema contains schema objects like table, foreign key, primary key, views,
columns, data types, stored procedure, etc.
o A database schema can be represented by using the visual diagram. That diagram
shows the database objects and relationship with each other.
o A database schema is designed by the database designers to help programmers
whose software will interact with the database. The process of database creation is
called data modeling.

A schema diagram can display only some aspects of a schema like the name of record type,
data type, and constraints. Other aspects can't be specified through the schema diagram.
For example, the given figure neither show the data type of each data item nor the
relationship among various files.

In the database, actual data changes quite frequently. For example, in the given figure, the
database changes whenever we add a new grade or add a student. The data at a particular
moment of time is called the instance of the database.
Difference between Physical and Logical Data Independence :

Physical Data Independence Logical Data Independence

It mainly concern about how the data is It mainly concerned about the structure or the
stored into the system. changing data definition.

It is difficult to retrieve because the data is


It is easy to retrieve. mainly dependent on the logical structure of
data.

As compared to the logical independence it As compared to the physical independence it


is easy to achieve physical data is not easy to achieve logical data
independence. independence.

Any change at the physical level, does not The change in the logical level requires a
require to change at the application level. change at the application level.

The modifications made at the internal The modifications made at the logical level is
Physical Data Independence Logical Data Independence

level may or may not be needed to improve significant whenever the logical structure of
the performance of the structure. the database is to be changed.

It is concerned with the internal schema. It is concerned with the conceptual schema.

Example: Change in compression


Example: Add/Modify or Delete a new
techniques, Hashing algorithms and storage
attribute.
devices etc.
Three tier schema architecture for data independence:

You might also like