DBMS unit 1 Notes

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 64

FUNDAMENTALS OF DATABASE MANAGEMENT SYSTEMS AND SQL

Module No. 1: Introduction to Database Management Systems

Meaning and Definition of Database, Objectives of Database, Features of Database,


Conceptual Data modeling – File Organization – Data Structure – Data models: HDBMS,
NDBMS, RDBMS, OODBMS, Desktop and Server-level Database, Recent Trends in
Database.

Module No. 2: Database Design

Relational Data Model – Relational Algebra – ER Diagrams – Data Dictionary –


Normalization – Boyce Codd Normal Forms – Integrity – Relational Database Languages –
Database Administration – File Structures and Indexing. Object-oriented concepts – Structure
– Models and Databases – Object life cycle modeling – Objects, Classes, and Patterns –
Object interaction modeling – Object Oriented Design – UML

Module No. 3: Operation and Management

Client / Server and Databases – Data Warehousing – Query Processing – Concurrency


Management – Heterogeneous and Homogenous Systems – Distributed Databases – Controls
– Atomicity, Recovery – Security, Back-up and Recovery,

Distributed Databases: Structure of Distributed Database; Trade-offs in Distributing the


Database, Advantages of Data Distribution, Disadvantages of Data Distribution; Design of
Distributed Databases, Data Replication, Data Fragmentation.

Module No. 4: SQL Structured Query Language.

Relational Query Languages, the SQL Query Language, DDL – CREATE Table, ALTER
Table, DROP Table, CREATE Index, DROP Index etc., DML – SELECT, UPDATE,
DELETE, INSERTINTO etc., DATA– TYPE, Constraints on Attributes – Referential
Integrity Constraint, Arithmetic and Relational Operators

Module No. 5: Lab Sessions

Practical Problems and Lab-Work on SQL.

Module No. 1
Introduction to Database Management Systems

What is Data?

Data is a collection of a distinct small unit of information. It can be used in a variety of forms
like text, numbers, media, bytes, etc. it can be stored in pieces of paper or electronic memory,
etc.

Word 'Data' is originated from the word 'datum' that means 'single piece of information.' It is
plural of the word datum.

In computing, Data is information that can be translated into a form for efficient movement
and processing. Data is interchangeable.

What is Database

The database is a collection of inter-related For example: The college Database


data which is used to retrieve, insert and organizes the data about the admin, staff,
delete the data efficiently. It is also used to students and faculty etc. Using the
organize the data in the form of a table, database, you can easily retrieve, insert,
schema, views, and reports, etc. and delete the information.

A database is an organized collection of


data, so that it can be easily accessed and managed. You can organize data into tables, rows,
columns, and index it to make it easier to find relevant information.

Database handlers create a database in such a way that only one set of software program
provides access of data to all the users.

The main purpose of the database is to operate a large amount of information by storing,
retrieving, and managing data.

There are many dynamic websites on the World


There are many databases
Wide Web nowadays which are handled through
available like MySQL, Sybase,
databases. For example, a model that checks the
Oracle, MongoDB, Informix,
availability of rooms in a hotel. It is an example
PostgreSQL, SQL Server, etc.
of a dynamic website that uses a database.

Evolution of Databases
The database has completed more than 50 years of journey of its evolution from flat-file
system to relational and objects relational systems. It has gone through several generations.

The Evolution

 File-Based
1968 was the year when File-Based database were introduced. A Flat file database is also
known as the text database. It is the most important type of database used to store data in
a plain text file (MS Excel). Flat file databases were developed by IBM in the
early 1970s.

In the Flat file database, each line of the plain text file holds only one record. These
records are separated using delimiters, such as tabs and commas. The advantage of a flat-
file database is that it is easy to understand and helps us to sort the results easily.

where each line holds only one record. The fields in the record are separated using
delimiters such as tabs and commas.

Advantages of Flat file database


A list of advantages of a Flat file database is given below -
1. All records are stored in one place.
2. Easy to understand and configure using various standard office applications.
3. It is an excellent option for small databases.
4. It requires less hardware and software components.

Disadvantages of flat-file database


A list of disadvantages of a flat-file database is given below -
1. Flat file database is harder to update.
2. Harder to change data format.
3. It is poor database in terms of complex queries.
4. It increased Redundancy and inconsistency.

Create a flat-file database

For small businesses, a flat-file database is the best way to manage the data.

There are the following steps to create a flat-file database -

Step 1: Open Microsoft Access.

Step 2: Microsoft Access Home page will appear on the screen, in which do the following -

1. Click on the Blank database option in the Available Templates section.

2. Type database name in the File Name text box.

3. Browse the location where you want to save the database.

4. Click on the Create button, as shown in the screenshot below.

Step 3: Now, you can see that Microsoft access will automatically create a new table
(Table1) at the left corner of the document.
Step 4: To create your own table, Click on the View tab and click on the Design view option
from the View drop-down menu.

Step 5: A small pop-up menu will appear in which enter the table name that you want to
create and click on the OK button.

Step 6: An Employee table design view will appear with the columns Field Name, Data
Type, and Description.

To make a field primary key, right-click on the field you want to make as a primary key
and select the Primary key option from the drop-down menu, or you can simply click on
the Primary key tab to make a filed as a primary key.
Step 7: Add another field name in the field name column and select field data type from the
data type drop-down menu.

Step 8: Once you add all desired Field names in the table, click on the View tab at the top of
the document and click on the Datasheet View option from the View drop-down menu.
Step 9: The following window will appear with your desired Fileds names. Enter the required
data in the Fields names and click on the Save option to save your flat-file database.

 Hierarchical Data Model


1968-1980 was the era of the Hierarchical Database. Prominent hierarchical database
model was IBM's first DBMS. It was called IMS (Information Management System).

In this model, files are related in a parent/child manner.


Below diagram represents Hierarchical Data Model. Small circle represents objects.
Like file system, this model also had some limitations like complex implementation, lack
structural independence, can't easily handle a many-many relationship, etc.

In the hierarchical model, segments pointed to by the logical association are called the child
segment and the other segment is called the parent segment. If there is a segment without a
parent is then that will be called the root and the segment which has no children are called
the leaves. The main disadvantage of the hierarchical model is that it can have one-to-one and
one-to-many relationships between the nodes.

In the above-given figure, we have few students and few course-enroll and a course can be
assigned to a single student only, but a student can enroll in any number of courses and with
this the relationship becomes one-to-many. We can represent the given hierarchical model
like the below relational tables:

FACULTY Table

Name Dep Course-taught

John CSE CA

Jake CSE SE

Royal CSE DBMS

STUDENT Table

Name Course-enroll Grade

Gami CA 2.0

Mary SE 3.0

Mayen SE 4.0

Examples

Let us take an example of college students who take different courses. A course can be
assigned to an only single student but a student can take as many courses as they want
therefore following one to many relationships.
Now we can represent the above hierarchical model as relational tables as shown below:

Student Table:

Course Table:

In this manner, the hierarchical model can be represented in relational tables and vice versa
can also be done.

Network data model

Charles Bachman developed the first DBMS at Honeywell called Integrated Data Store
(IDS). It was developed in the early 1960s, but it was standardized in 1971 by the CODASYL
group (Conference on Data Systems Languages).
The network database model is a model for modeling the entities in such a way that one child
entity can have more than one parent entity. In 1969, the network model was presented by
Charles Bachman.

In this figure, we can see that the subject is the child class and student and degree are the
parent classes.So, the subject has two parent classes. STUDENT has one child and the
Degree class also have one child. This kind of relationship among entities represents the
network model.

In this model, files are related as owners and members, like to the common network model.

Network data model identified the following components:

o Network schema (Database organization)

o Sub-schema (views of database per user)

o Data management language (procedural)

This model also had some limitations like system complexity and difficult to design and
maintain.

The hierarchical model is extended in the network model. Prior to the relational model, it was
the most popular model. To increase database performance and standards, the network model
was devised to express complicated data relationships more effectively than hierarchical
models. It has entities that are grouped in a graphical format, and some of the entities can be
reached by many paths.

Example
We can observe that the node student has two parents, CSE Department and Library, in the
example below. In the hierarchical model, this was previously impossible.

Features of a Network Model

1. Multiple Paths

There may be several paths to the same record due to the increased number of relationships.
It allows for quick and easy data access.

2. The Ability to Merge More Relationships

Data is more connected in this model since there are more relationships. This paradigm can
handle many-to-many as well as one-to-one relationships.

3. Circular Linked List

The circular linked list is used to perform operations on the network model. The present
position is kept up to date with the help of a software, and it navigates through the records
based on the relationship.

Relational Database

RDBMS stands for Relational Database Management System.

All modern database management systems like SQL, MS SQL Server, IBM DB2, ORACLE,
My-SQL, and Microsoft Access are based on RDBMS.
It is called Relational Database Management System (RDBMS) because it is based on the
relational model introduced by E.F. Codd.

1970 - Present: It is the era of Relational Database and Database Management. In 1970, the
relational model was proposed by E.F. Codd.

Relational database model has two main terminologies called instance and schema.

The instance is a table with rows or columns

Schema specifies the structure like name of the relation, type of each column and name.

This model uses some mathematical concept like set theory and predicate logic.

The first internet database application had been created in 1995.

During the era of the relational database, many more models had introduced like object-
oriented model, object-relational model, etc.

How it works

Data is represented in terms of tuples (rows) in RDBMS.

A relational database is the most commonly used database. It contains several tables, and
each table has its primary key.

Due to a collection of an organized set of tables, data can be accessed easily in RDBMS.

Brief History of RDBMS

From 1970 to 1972, E.F. Codd published a paper to propose using a relational database
model.

RDBMS is originally based on E.F. Codd's relational model invention.

Following are the various terminologies of RDBMS:


What is RDBMS?

RDBMS stands for Relational Database Management System. RDBMS is the basis for SQL,
and for all modern database systems like MS SQL Server, IBM DB2, Oracle, MySQL, and
Microsoft Access.

A Relational database management system (RDBMS) is a database management system


(DBMS) that is based on the relational model as introduced by E. F. Codd in 1970.

What is a table?

The data in an RDBMS is stored in database objects known as tables. This table is basically a
collection of related data entries and it consists of numerous columns and rows.

Remember, a table is the most common and simplest form of data storage in a relational
database. Following is an example of a CUSTOMERS table which stores customer's ID,
Name, Age, Salary, City and Country −

ID Name Age Salary City Country

1 Ramesh 32 2000.00 Hyderabad India

2 Mukesh 40 5000.00 New York USA

3 Sumit 45 4500.00 Muscat Oman


4 Kaushik 25 2500.00 Kolkata India

5 Hardik 29 3500.00 Bhopal India

6 Komal 38 3500.00 Saharanpur India

7 Ayush 25 3500.00 Delhi India

8 Javed 29 3700.00 Delhi India

What is a field?

Every table is broken up into smaller entities called fields. A field is a column in a table that
is designed to maintain specific information about every record in the table.

For example, our CUSTOMERS table consists of different fields like ID, Name, Age, Salary,
City and Country.

What is a Record or a Row?

A record is also called as a row of data is each individual entry that exists in a table. For
example, there are 7 records in the above CUSTOMERS table. Following is a single row of
data or record in the CUSTOMERS table −

ID Name Age Salary City Country

1 Ramesh 32 2000.00 Hyderabad India

A record is a horizontal entity in a table.

What is a column?

A column is a vertical entity in a table that contains all information associated with a specific
field in a table.
For example, our CUSTOMERS table have different columns to represent ID, Name, Age,
Salary, City and Country.

What is a NULL value?

A NULL value in a table is a value in a field that appears to be blank, which means a field
with a NULL value is a field with no value.

It is very important to understand that a NULL value is different than a zero value or a field
that contains spaces. A field with a NULL value is the one that has been left blank during a
record creation. Following table has three records where first record has NULL value for the
salary and second record has a zero value for the salary.

ID Name Age Salary City Country

1 Ramesh 32 Hyderabad India

2 Mukesh 40 00.00 New York USA

3 Sumit 45 4500.00 Muscat Oman

SQL Constraints

Constraints are the rules enforced on data columns on a table. These are used to limit the type
of data that can go into a table. This ensures the accuracy and reliability of the data in the
database.

Constraints can either be column level or table level. Column level constraints are applied
only to one column whereas, table level constraints are applied to the entire table.

Following are some of the most commonly used constraints available in SQL −

S.No. Constraints

1 NOT NULL Constraint


Ensures that a column cannot have a NULL value.

2 DEFAULT Constraint

Provides a default value for a column when none is specified.

3 UNIQUE Key

Ensures that all the values in a column are different.

4 PRIMARY Key

Uniquely identifies each row/record in a database table.

5 FOREIGN Key

Uniquely identifies a row/record in any another database table.

6 CHECK Constraint

Ensures that all values in a column satisfy certain conditions.

7 INDEX Constraint

Used to create and retrieve data from the database very quickly.

Data Integrity

The following categories of data integrity exist with each RDBMS −

 Entity Integrity − This ensures that there are no duplicate rows in a table.
 Domain Integrity − Enforces valid entries for a given column by restricting
the type, the format, or the range of values.
 Referential integrity − Rows cannot be deleted, which are used by other
records.
 User-Defined Integrity − Enforces some specific business rules that do not
fall into entity, domain or referential integrity.
Objectives of DBMS
Database management system is developed through programming language but its object is to
give the benefit to general person. A normal accountant who do not know the programming
language can easily take benefit from advance DBMS. Every DBMS should be made for
achieving following objectives.

1. To Reduce Duplication
You see that when we fill the data, there is the chance of duplicacy. It should the
objective of DBMS to reduce this duplicacy. Recent DBMS will automatically check the
duplicate record and give warning to you for not recording. By solving this problem, we
can work on less storage space. Let me explain. You have a computer with 150 GB Hard
disk but if you start to save same film 50 or 100 times with different name what will
happen. Your space will not be more power to save any other thing. Like this, duplicated
data requires also our free space of storage. So, it should be reduced.
2. To Share the Data
To share the data to its users under the controlled environment is the objective of DBMS.
For example, we all use Google Drive. Actually, it has been renamed of Google's old
Google Docs. Google docs application is also DBMS. It has been written in Java
Programming language. You can invite other users who have Google account. So, only
authorized user can get power to see shared data.
3. To Bring Integrity of Data
Integrity of data means to bring the accuracy and consistency. For this, DBMS gives
power to its user that they can establish the validation controls. For example, you are
interested to know the current salary of any employee to whom you are interested to
appoint in your company. You can develop a form in which you can ask to mention the
current salary. For its validation, you can give different options.
4. To Secure the Data
Data of any organisation is the worthy asset. It should be protected. For security of the
data is the responsibility of data administrator. DBMS should adopt advance security
checks for rejection of unauthorized access in database.
5. To Bring Independence in Data
Data should be independent both physical and logical. In database fields any record
should easily add or delete.
A database is an organized collection of structured information, or data, typically stored
electronically in a computer system. ... Together, the data and the DBMS, along with the
applications that are associated with them, are referred to as a database system, often
shortened to just database.
The objectives are as follows
1. Eliminate redundant data.
2. Make access to the data easy for the user.
3. Provide for mass storage of relevant data.
4. Protect the data from physical harm and un-authorised systems.
5. Allow for growth in the data base system.
6. Make the latest modifications to the data base available immediately.
7. Allow for multiple users to be active at one time.
8. Provide prompt response to user requests for data.

Features Of DataBase Management Systems (DBMS):

Now that we know what Database Management Systems are and what are the benefits of
using them, let us dive deep into them and understand what are the different features which
Database Management Systems have to offer to us:

Minimum Redundancy and Duplication

Because databases are used by so many people, the risks of data duplication are relatively
high. But in a database management system, data files are shared which brings down data
duplication and redundancy. Due to the fact that all information in a database management
system occurs only once, the odds of duplication are quite low. In other words, the same data
file is accessible to all the people using the database, and the changes made by any one of the
users get reflected for the data file of all the users and therefore, redundancy and duplication
are avoided.

Reduced amount of space and money spent on storage

All database management systems must save a large amount of data. However, proper data
integration saves a lot of space in the database management system. Companies spend a lot of
money to keep their data safe. They will save money on data storage and data entry if they
have managed data to store.
Data Organization

In a Database Management system, a digital repository’s information is structured in a clear


hierarchical structure using records, tables, and objects. Every piece of information which we
enter into our database will be structured in a catalog, making it easy to search and edit our
records later.

Customization of the Database

Along with the default and required components (records, tables, or objects) that make up a
database’s structure, custom elements can be constructed to fit the demands of unique users.
For example, Binary Large Objects or BLOBS can be used to store images in databases and
mappings can be maintained between various tables to implement complex entities.

Data Retrieval

The database management system, or DBMS, accepts and stores data from users. Users can
subsequently get their records from the database and save them as a file, print them, or
display them on the screen. Data Retrieval becomes a big advantage of the database
management systems as only authenticated users can fetch data from the database and
unauthenticated users are denied access, thus improving the security of the data.

Usage Of Query Languages

A typical Database Management System allows users to utilize query languages for
collecting, searching, sorting, altering, and other tasks that enable them to manipulate their
database entries. An example of a famous query language is SQL (Structured Query
Language). Anyone, even without the knowledge of any programming language, can access a
Database Management System easily without hassle.

Multi User Access

Multiple users can access all forms of information contained in the same data store with a
Multi-User Access Database Management System. A security feature additionally restricts
some users from seeing and/or altering specific data types and only authenticated users can
access the database.
Data Integrity is Maintained

Multiple users can access all information in a database, but only one user can edit the same
piece of data at a time. This feature allows you to avoid database corruption and failure and
ensures that the Integrity of Data is maintained.

Management of Metadata

Metadata is “data that provides information about other data”, but not the content of the data,
such as the text of a message or the image itself. The metadata library (or data dictionary) in
DBMS database management software explains how the database is organized and what parts
(objects, associated files, records, and so on) make up its structure.

Maintenance of a Large Database

Only a database management system can keep large databases of large corporations up to
date. These databases necessitate a high level of security as well as backup and recovery
capabilities. Database Management System includes all of these functionalities. It has the
ability to keep a database with a large amount of data and information.

Data Durability

All data files are permanently stored by Database Management System, so there is no risk of
data loss. If the data is lost, the organization’s data files can be saved using a backup and
recovery procedure. As a result, there is no need to be concerned about data loss in Database
Management Systems.

Provides a High Level of Data Security

All companies that handle a substantial volume of data are concerned about security. Except
for the Database Administrator or the department head, Database Management Systems does
not grant complete database access. They have the ability to change the database and create
all of the users, therefore the database management system’s security level is increased.

Enhanced File Uniformity

Any business can build a homogeneous way to implement files and validate data uniformity
with any other application programmes or systems by using the Database Management
Systems. It is critical to rationalize and govern modern data management systems. A
progressive database system’s application software enables the application of the same rules
to all data across the organization.

DATA MODELLING

In today’s competitive digital world, data is an essential business asset that represents
information based on which decisions are made to lead in the market. To process such data in
the database, a data model is created, and this process is known as Data Modeling.

Data Modelling is the process of creating a model to represent the way the data of the
application is going to be stored.

Data modeling (data modelling) is the process of creating a data model for the data to be
stored in a database. This data model is a conceptual representation of Data objects, the
associations between different data objects, and the rules.

Data modeling helps in the visual representation of data and enforces business rules,
regulatory compliances, and government policies on the data. Data Models ensure
consistency in naming conventions, default values, semantics, security while ensuring quality
of the data.

Data Modeling salient features are:

 It lays the foundation for data governance and management.

 It is the process of creating a model to represent the way the data of the application is
going to be stored.

 It is neither the actual data nor the database that is to be used in the system.

 It represents the data entities, the relationship between different data entities, and the
business rules, policies, etc. that govern the data and their activities.

 It helps in standardization mainly in naming the entities, setting default values, their
semantics, constraints, and security, etc.
 The normalization process ensures redundant data are removed and the relationship
and dependencies established are as per business.

Data Models in DBMS

The Data Model is defined as an abstract model that organizes data description, data
semantics, and consistency constraints of data. The data model emphasizes on what data is
needed and how it should be organized instead of what operations will be performed on data.
Data Model is like an architect’s building plan, which helps to build conceptual models and
set a relationship between data items.

The two types of Data Modeling Techniques are

1. Entity Relationship (E-R) Model

2. UML (Unified Modelling Language)

Significance Of Data Management In Data Model

The significance of effective data management for an efficient and successful business is
enormous. Data Modeling lays the foundation for data management.
Why use Data Model?

The primary goal of using data model are:

 Ensures that all data objects required by the database are accurately represented.
Omission of data will lead to creation of faulty reports and produce incorrect results.

 A data model helps design the database at the conceptual, physical and logical levels.

 Data Model structure helps to define the relational tables, primary and foreign keys
and stored procedures.

 It provides a clear picture of the base data and can be used by database developers to
create a physical database.

 It is also helpful to identify missing and redundant data.

 Though the initial creation of data model is labor and time consuming, in the long run,
it makes your IT infrastructure upgrade and maintenance cheaper and faster.
Types of Data Models in DBMS

Types of Data Models: There are mainly three different types of data models: conceptual
data models, logical data models, and physical data models, and each one has a specific
purpose. The data models are used to represent the data and how it is stored in the database
and to set the relationship between data items.

1. Conceptual Data Model: This Data Model defines WHAT the system contains. This
model is typically created by Business stakeholders and Data Architects. The purpose
is to organize, scope and define business concepts and rules.

2. Logical Data Model: Defines HOW the system should be implemented regardless of
the DBMS. This model is typically created by Data Architects and Business Analysts.
The purpose is to developed technical map of rules and data structures.

3. Physical Data Model: This Data Model describes HOW the system will be
implemented using a specific DBMS system. This model is typically created by DBA
and developers. The purpose is actual implementation of the database.

Types of Data Model


Conceptual Data Model

A Conceptual Data Model is an organized view of database concepts and their relationships.
The purpose of creating a conceptual data model is to establish entities, their attributes, and
relationships. In this data modeling level, there is hardly any detail available on the actual
database structure. Business stakeholders and data architects typically create a conceptual
data model.

The 3 basic tenants of Conceptual Data Model are

 Entity: A real-world thing

 Attribute: Characteristics or properties of an entity

 Relationship: Dependency or association between two entities

Data model example:

 Customer and Product are two entities. Customer number and name are attributes of
the Customer entity

 Product name and price are attributes of product entity

 Sale is the relationship between the customer and product

Conceptual Data Model

Characteristics of a conceptual data model

 Offers Organisation-wide coverage of the business concepts.

 This type of Data Models are designed and developed for a business audience.
 The conceptual model is developed independently of hardware specifications like data
storage capacity, location or software specifications like DBMS vendor and
technology. The focus is to represent data as a user will see it in the “real world.”

Conceptual data models known as Domain models create a common vocabulary for all
stakeholders by establishing basic concepts and scope.

Logical Data Model

The Logical Data Model is used to define the structure of data elements and to set
relationships between them. The logical data model adds further information to the
conceptual data model elements. The advantage of using a Logical data model is to provide a
foundation to form the base for the Physical model. However, the modeling structure remains
generic.

Logical Data Model

At this Data Modeling level, no primary or secondary key is defined. At this Data modeling
level, you need to verify and adjust the connector details that were set earlier for
relationships.

Characteristics of a Logical data model

 Describes data needs for a single project but could integrate with other logical data
models based on the scope of the project.

 Designed and developed independently from the DBMS.

 Data attributes will have datatypes with exact precisions and length.

 Normalization processes to the model is applied typically till 3NF.


Physical Data Model

A Physical Data Model describes a database-specific implementation of the data model. It


offers database abstraction and helps generate the schema. This is because of the richness of
meta-data offered by a Physical Data Model. The physical data model also helps in
visualizing database structure by replicating database column keys, constraints, indexes,
triggers, and other RDBMS features.

Physical Data Model

Characteristics of a physical data model:

 The physical data model describes data need for a single project or application though
it maybe integrated with other physical data models based on project scope.

 Data Model contains relationships between tables that which addresses cardinality and
nullability of the relationships.

 Developed for a specific version of a DBMS, location, data storage or technology to


be used in the project.

 Columns should have exact datatypes, lengths assigned and default values.

 Primary and Foreign keys, views, indexes, access profiles, and authorizations, etc. are
defined.

Advantages and Disadvantages of Data Model:

Advantages of Data model:

 The main goal of a designing data model is to make certain that data objects offered
by the functional team are represented accurately.
 The data model should be detailed enough to be used for building the physical
database.

 The information in the data model can be used for defining the relationship between
tables, primary and foreign keys, and stored procedures.

 Data Model helps business to communicate the within and across organizations.

 Data model helps to documents data mappings in ETL process

 Help to recognize correct sources of data to populate the model

Disadvantages of Data model:

 To develop Data model one should know physical data stored characteristics.

 This is a navigational system produces complex application development,


management. Thus, it requires a knowledge of the biographical truth.

 Even smaller change made in structure require modification in the entire application.

 There is no set data manipulation language in DBMS.

File Organization

The File is a collection of records. Using the primary key, we can access the records. The
type and frequency of access can be determined by the type of file organization which was
used for a given set of records.

File organization is a logical relationship among various records. This method defines how
file records are mapped onto disk blocks.

o File organization is used to describe the way in which the records are stored in terms
of blocks, and the blocks are placed on the storage medium.
o The first approach to map the database to the file is to use the several files and store
only one fixed length record in any given file. An alternative approach is to structure
our files so that we can contain multiple lengths for records.

o Files of fixed length records are easier to implement than the files of variable length
records.

Objective of file organization

o It contains an optimal selection of records, i.e., records can be selected as fast as


possible.

o To perform insert, delete or update transaction on the records should be quick and
easy.

o The duplicate records cannot be induced as a result of insert, update or delete.

o For the minimal cost of storage, records should be stored efficiently.

Types of file organization:

File organization contains various methods. These particular methods have pros and cons on
the basis of access or selection. In the file organization, the programmer decides the best-
suited file organization method according to his requirement.

Types of file organization are as follows:

o Sequential file organization

o Heap file organization


o Hash file organization

o B+ file organization

o Indexed sequential access method (ISAM)

o Cluster file organization

Sequential File Organization

This method is the easiest method for file organization. In this method, files are stored
sequentially. This method can be implemented in two ways:

1. Pile File Method:

o It is a quite simple method. In this method, we store the record in a sequence, i.e., one
after another. Here, the record will be inserted in the order in which they are inserted
into tables.

o In case of updating or deleting of any record, the record will be searched in the
memory blocks. When it is found, then it will be marked for deleting, and the new
record is inserted.

Insertion of the new record:

Suppose we have four records R1, R3 and so on upto R9 and R8 in a sequence. Hence,
records are nothing but a row in the table. Suppose we want to insert a new record R2 in the
sequence, then it will be placed at the end of the file. Here, records are nothing but a row in
any table.
2. Sorted File Method:

o In this method, the new record is always inserted at the file's end, and then it will sort
the sequence in ascending or descending order. Sorting of records is based on any
primary key or any other key.

o In the case of modification of any record, it will update the record and then sort the
file, and lastly, the updated record is placed in the right place.

Insertion of the new record:

Suppose there is a preexisting sorted sequence of four records R1, R3 and so on upto R6 and
R7. Suppose a new record R2 has to be inserted in the sequence, then it will be inserted at the
end of the file, and then it will sort the sequence.
Pros of sequential file organization

o It contains a fast and efficient method for the huge amount of data.

o In this method, files can be easily stored in cheaper storage mechanism like magnetic
tapes.

o It is simple in design. It requires no much effort to store the data.

o This method is used when most of the records have to be accessed like grade
calculation of a student, generating the salary slip, etc.

o This method is used for report generation or statistical calculations.

Cons of sequential file organization

o It will waste time as we cannot jump on a particular record that is required but we
have to move sequentially which takes our time.

o Sorted file method takes more time and space for sorting the records.

Heap file organization


o It is the simplest and most basic type of organization. It works with data blocks. In
heap file organization, the records are inserted at the file's end. When the records are
inserted, it doesn't require the sorting and ordering of records.

o When the data block is full, the new record is stored in some other block. This new
data block need not to be the very next data block, but it can select any data block in
the memory to store new records. The heap file is also known as an unordered file.

o In the file, every record has a unique id, and every page in a file is of the same size. It
is the DBMS responsibility to store and manage the new records.

Insertion of a new record

Suppose we have five records R1, R3, R6, R4 and R5 in a heap and suppose we want to insert
a new record R2 in a heap. If the data block 3 is full then it will be inserted in any of the
database selected by the DBMS, let's say data block 1.
If we want to search, update or delete the data in heap file organization, then we need to
traverse the data from staring of the file till we get the requested record.

If the database is very large then searching, updating or deleting of record will be time-
consuming because there is no sorting or ordering of records. In the heap file organization,
we need to check all the data until we get the requested record.

Pros of Heap file organization

o It is a very good method of file organization for bulk insertion. If there is a large
number of data which needs to load into the database at a time, then this method is
best suited.

o In case of a small database, fetching and retrieving of records is faster than the
sequential record.

Cons of Heap file organization

o This method is inefficient for the large database because it takes time to search or
modify the record.

o This method is inefficient for large databases.


Hash File Organization

Hash File Organization uses the computation of hash function on some fields of the records.
The hash function's output determines the location of disk block where the records are to be
placed.

When a record has to be received using the hash key columns, then the address is generated,
and the whole record is retrieved using that address. In the same way, when a new record has
to be inserted, then the address is generated using the hash key and record is directly inserted.
The same process is applied in the case of delete and update.

In this method, there is no effort for searching and sorting the entire file. In this method, each
record will be stored randomly in the memory.
B+ File Organization

o B+ tree file organization is the advanced method of an indexed sequential access


method. It uses a tree-like structure to store records in File.

o It uses the same concept of key-index where the primary key is used to sort the
records. For each primary key, the value of the index is generated and mapped with
the record.

o The B+ tree is similar to a binary search tree (BST), but it can have more than two
children. In this method, all the records are stored only at the leaf node. Intermediate
nodes act as a pointer to the leaf nodes. They do not contain any records.

The above B+ tree shows that:

o There is one root node of the tree, i.e., 25.


o There is an intermediary layer with nodes. They do not store the actual record. They
have only pointers to the leaf node.

o The nodes to the left of the root node contain the prior value of the root and nodes to
the right contain next value of the root, i.e., 15 and 30 respectively.

o There is only one leaf node which has only values, i.e., 10, 12, 17, 20, 24, 27 and 29.

o Searching for any record is easier as all the leaf nodes are balanced.

o In this method, searching any record can be traversed through the single path and
accessed easily.

Pros of B+ tree file organization

o In this method, searching becomes very easy as all the records are stored only in the
leaf nodes and sorted the sequential linked list.

o Traversing through the tree structure is easier and faster.

o The size of the B+ tree has no restrictions, so the number of records can increase or
decrease and the B+ tree structure can also grow or shrink.

o It is a balanced tree structure, and any insert/update/delete does not affect the
performance of tree.

Cons of B+ tree file organization

o This method is inefficient for the static method.

Indexed sequential access method (ISAM)

ISAM method is an advanced sequential file organization. In this method, records are stored
in the file using the primary key. An index value is generated for each primary key and
mapped with the record. This index contains the address of the record in the file.
If any record has to be retrieved based on its index value, then the address of the data block is
fetched and the record is retrieved from the memory.

Pros of ISAM:

o In this method, each record has the address of its data block, searching a record in a
huge database is quick and easy.

o This method supports range retrieval and partial retrieval of records. Since the index
is based on the primary key values, we can retrieve the data for the given range of
value. In the same way, the partial value can also be easily searched, i.e., the student
name starting with 'JA' can be easily searched.

Cons of ISAM

o This method requires extra space in the disk to store the index value.

o When the new records are inserted, then these files have to be reconstructed to
maintain the sequence.

o When the record is deleted, then the space used by it needs to be released. Otherwise,
the performance of the database will slow down.
Cluster file organization

o When the two or more records are stored in the same file, it is known as clusters.
These files will have two or more tables in the same data block, and key attributes
which are used to map these tables together are stored only once.

o This method reduces the cost of searching for various records in different files.

o The cluster file organization is used when there is a frequent need for joining the
tables with the same condition. These joins will give only a few records from both
tables. In the given example, we are retrieving the record for only particular
departments. This method can't be used to retrieve the record for the entire
department.
In this method, we can directly insert, update or delete any record. Data is sorted based on the
key with which searching is done. Cluster key is a type of key with which joining of the table
is performed.

Types of Cluster file organization:

Cluster file organization is of two types:

1. Indexed Clusters:

In indexed cluster, records are grouped based on the cluster key and stored together. The
above EMPLOYEE and DEPARTMENT relationship is an example of an indexed cluster.
Here, all the records are grouped based on the cluster key- DEP_ID and all the records are
grouped.

2. Hash Clusters:

It is similar to the indexed cluster. In hash cluster, instead of storing the records based on the
cluster key, we generate the value of the hash key for the cluster key and store the records
with the same hash key value.

Pros of Cluster file organization

o The cluster file organization is used when there is a frequent request for joining the
tables with same joining condition.

o It provides the efficient result when there is a 1:M mapping between the tables.

Cons of Cluster file organization

o This method has the low performance for the very large database.

o If there is any change in joining condition, then this method cannot use. If we change
the condition of joining then traversing the file takes a lot of time.

o This method is not suitable for a table with a 1:1 condition.

DATA STRUCTURE:

In computer Programming, Data structure is a way of organizing and storing data so as to


ease the accessing and modification of data. There are various types of data structures present
for storing the data and different data structures have different and unique features.
Some commonly used data structures are Array, Linked List, Stack, Queue, Heap, Binary
Tree and Graph.

Database Data Structure

It is a special format for storing data


It is an organized collection of data. to serve a particular purpose.

It is used for efficiency and to reduce


It is used to access the data and manage it easily. the complexities of the program.

Structured query language (SQL) is used to perform


operations on the data in a database. DataBase
Management System (DBMS) is used to manage the Programming languages like C, C++,
database. Java, Python are used to perform
operations using data Structures.

It is a Non-volatile memory. It is a volatile memory.

Relational database, NOSQL database, Centralized Linear data structure and non-linear
database, Hierarchical database are some types of data structure are the types of data
databases. structures.

Example : Array, Linked List, Stack,


Example : MySQL, Oracle, MongoDB, Sybase etc. Queue, Tree, Graph.

Store Data in permanent Memory Store Data in Temporary Memory

A data structure is a specialized format for organizing, processing, retrieving and storing
data. There are several basic and advanced types of data structures, all designed to arrange
data to suit a specific purpose. Data structures make it easy for users to access and work with
the data they need in appropriate ways. Most importantly, data structures frame the
organization of information so that machines and humans can better understand it.

In computer science and computer programming, a data structure may be selected or


designed to store data for the purpose of using it with various algorithms. In some cases,
the algorithm's basic operations are tightly coupled to the data structure's design. Each data
structure contains information about the data values, relationships between the data and -- in
some cases -- functions that can be applied to the data.

For instance, in an object-oriented programming language, the data structure and its
associated methods are bound together as part of a class definition. In non-object-oriented
languages, there may be functions defined to work with the data structure, but they are not
technically part of the data structure.

Why are data structures important?

Typical base data types, such as integers or floating-point values, that are available in most
computer programming languages are generally insufficient to capture the logical intent for
data processing and use. Yet applications that ingest, manipulate and produce information
must understand how data should be organized to simplify processing. Data structures bring
together the data elements in a logical way and facilitate the effective use, persistence and
sharing of data. They provide a formal model that describes the way the data elements are
organized.

Data structures are the building blocks for more sophisticated applications. They are designed
by composing data elements into a logical unit representing an abstract data type that has
relevance to the algorithm or application. An example of an abstract data type is a
"customer name" that is composed of the character strings for "first name," "middle
name" and "last name."

It is not only important to use data structures, but it is also important to choose the proper
data structure for each task. Choosing an ill-suited data structure could result in
slow runtimes or unresponsive code. Five factors to consider when picking a data structure
include the following:

1. What kind of information will be stored?

2. How will that information be used?


3. Where should data persist, or be kept, after it is created?

4. What is the best way to organize the data?

5. What aspects of memory and storage reservation management should be considered?

How are data structures used?

In general, data structures are used to implement the physical forms of abstract data types.
Data structures are a crucial part of designing efficient software. They also play a critical role
in algorithm design and how those algorithms are used within computer programs.

Early programming languages -- such as Fortran, C and C++ -- enabled programmers to


define their own data structures. Today, many programming languages include an extensive
collection of built-in data structures to organize code and information. For
example, Python lists and dictionaries, and JavaScript arrays and objects are common coding
structures used for storing and retrieving information.

Software engineers use algorithms that are tightly coupled with the data structures -- such as
lists, queues and mappings from one set of values to another. This approach can be fused in a
variety of applications, including managing collections of records in a relational database and
creating an index of those records using a data structure called a binary tree.

Some examples of how data structures are used include the following:

 Storing data. Data structures are used for efficient data persistence, such as
specifying the collection of attributes and corresponding structures used to store
records in a database management system.

 Managing resources and services. Core operating system (OS) resources and
services are enabled through the use of data structures such as linked lists for memory
allocation, file directory management and file structure trees, as well as process
scheduling queues.

 Data exchange. Data structures define the organization of information shared


between applications, such as TCP/IP packets.

 Ordering and sorting. Data structures such as binary search trees -- also known as an
ordered or sorted binary tree -- provide efficient methods of sorting objects, such as
character strings used as tags. With data structures such as priority queues,
programmers can manage items organized according to a specific priority.

 Indexing. Even more sophisticated data structures such as B-trees are used to index
objects, such as those stored in a database.

 Searching. Indexes created using binary search trees, B-trees or hash tables speed the
ability to find a specific sought-after item.

 Scalability. Big data applications use data structures for allocating and managing data
storage across distributed storage locations, ensuring scalability and performance.
Certain big data programming environments -- such as Apache Spark -- provide data
structures that mirror the underlying structure of database records to simplify
querying.

Characteristics of data structures

Data structures are often classified by their characteristics. The following three characteristics
are examples:

1. Linear or non-linear. This characteristic describes whether the data items are
arranged in sequential order, such as with an array, or in an unordered sequence, such
as with a graph.

2. Homogeneous or heterogeneous. This characteristic describes whether all data items


in a given repository are of the same type. One example is a collection of elements in
an array, or of various types, such as an abstract data type defined as a structure in C
or a class specification in Java.

3. Static or dynamic. This characteristic describes how the data structures are compiled.
Static data structures have fixed sizes, structures and memory locations at compile
time. Dynamic data structures have sizes, structures and memory locations that can
shrink or expand, depending on the use.

Data types
If data structures are the building blocks of algorithms and computer programs, the primitive
-- or base -- data types are the building blocks of data structures. The typical base data types
include the following:

 Boolean, which stores logical values that are either true or false.

 integer, which stores a range on mathematical integers -- or counting numbers.


Different sized integers hold a different range of values -- e.g., a signed 8-bit integer
holds values from -128 to 127, and an unsigned long 32-bit integer holds values from
0 to 4,294,967,295.

 Floating-point numbers, which store a formulaic representation of real numbers.

 Fixed-point numbers, which are used in some programming languages and hold real
values but are managed as digits to the left and the right of the decimal point.

 Character, which uses symbols from a defined mapping of integer values to symbols.

 Pointers, which are reference values that point to other values.

 String, which is an array of characters followed by a stop code -- usually a "0" value
-- or is managed using a length field that is an integer value.

The
data structure hierarchy shows how data types and data structures are related.
Types of data structures

The data structure type used in a particular situation is determined by the type of operations
that will be required or the kinds of algorithms that will be applied. The various data structure
types include the following:

 Array. An array stores a collection of items at adjoining memory locations. Items that
are the same type are stored together so the position of each element can be calculated
or retrieved easily by an index. Arrays can be fixed or flexible in length.

An
array can hold a collection of integers, floating-point numbers, stings or even other arrays.

 Stack. A stack stores a collection of items in the linear order that operations are
applied. This order could be last in, first out (LIFO) or first in, first out (FIFO).

 Queue. A queue stores a collection of items like a stack; however, the operation order
can only be first in, first out.

 Linked list. A linked list stores a collection of items in a linear order. Each element,
or node, in a linked list contains a data item, as well as a reference, or link, to the next
item in the list.
Linke
d list data structures are a set of nodes that contain data and the address or a pointer to the
next node.

 Tree. A tree stores a collection of items in an abstract, hierarchical way. Each node is
associated with a key value, with parent nodes linked to child nodes -- or subnodes.
There is one root node that is the ancestor of all the nodes in the tree.

A
binary search tree is a set of nodes where each has a value and can point to two child nodes.

 Heap. A heap is a tree-based structure in which each parent node's associated key
value is greater than or equal to the key values of any of its children's key values.

 Graph. A graph stores a collection of items in a nonlinear fashion. Graphs are made
up of a finite set of nodes, also known as vertices, and lines that connect them, also
known as edges. These are useful for representing real-world systems such as
computer networks.

 Trie. A trie, also known as a keyword tree, is a data structure that stores strings as
data items that can be organized in a visual graph.

 Hash table. A hash table -- also known as a hash map -- stores a collection of items in
an associative array that plots keys to values. A hash table uses a hash function to
convert an index into an array of buckets that contain the desired data item.

Hashi
ng is a data structure technique where key values are converted into indexes of an array
where the data is stored.

These are considered complex data structures as they can store large amounts of
interconnected data.

How to choose a data structure

When choosing a data structure for a program or application, developers should consider the
answers to the following three questions:

1. Supported operations. What functions and operations does the program need?

2. Computational complexity. What level of computational performance is tolerable?


For speed, a data structure whose operations execute in time linear to the number of
items managed -- using Big O Notation: O(n) -- will be faster than a data structure
whose operations execute in time proportional to the square of the number of items
managed -- O(n^2).
3. Programming elegance. Are the organization of the data structure and its functional
interface easy to use?

Some real-world examples include:

 Linked lists are best if a program is managing a collection of items that don't need to
be ordered, constant time is required for adding or removing an item from the
collection and increased search time is OK.

 Stacks are best if the program is managing a collection that needs to support a LIFO
order.

 Queues should be used if the program is managing a collection that needs to support a
FIFO order.

 Binary trees are good for managing a collection of items with a parent-child
relationship, such as a family tree.

 Binary search trees are appropriate for managing a sorted collection where the goal
is to optimize the time it takes to find specific items in the collection.

 Graphs work best if the application will analyze connectivity and relationships
among a collection of individuals in a social media network.

11 Types of Data Models in DBMS with Examples

A data model in DBMS is a set of concepts and rules that are used to describe and organize
the data in a database. It defines the structure, relationships, and constraints of the data, and
provides a way to access and manipulate the data. Different data models are used to represent
different types of data and relationships, and each has its own set of advantages and
disadvantages.

Here are 11 types of data models in DBMS with examples:

1. Relational Model

2. Flat Data Model

3. Entity-Relationship Model

4. Network Model
5. Hierarchical Model

6. Object-oriented Data Model

7. Object Relation Model

8. Record Based Model

9. Semi-structured Model

10. Associative Model

11. Context Data Model

Relational Model

The relational model is a data model that represents data as a collection of tables, with each
table consisting of rows and columns. It is the most widely used data model in DBMS and is
the foundation of RDBMS (Relational Database Management System).

In a relational model, each table, also known as a relation, represents a specific entity, such as
a customer or an order. Each row in the table represents an instance of that entity and each
column represents an attribute or property of that entity.

For example, a simple relational model for a retail store can have the following tables:

1. Customers: (columns for customer ID, name, address, and phone number)

2. Products (columns for product ID, name, description, and price)

3. Orders: (columns for order ID, customer ID, and order date)

4. Order_items: (columns for order ID, product ID, and quantity)

The tables are related to each other through the use of keys, for example the customer ID
in the orders table is a foreign key that references the primary key of
the customers table, and the product ID in the order_items table is a foreign key that
references the primary key of the products table.

This simple example shows how a relational model organizes data into tables and uses
keys to establish relationships between them. The relational model allows for data to be
retrieved, updated and deleted in a simple and consistent way, also it allows for complex
queries and joins of multiple tables to retrieve data.

Diagram representation of the example:

diagram, showing the relationships between the tables:

Object Oriented Data Model

The object-oriented data model (OODM) is a data model that represents data as objects,
which are instances of classes. Classes are templates that define the properties and methods
of the objects, and objects are instances of those classes with specific values for those
properties.

In an object-oriented data model, each object has a unique identity, a set of properties (or
attributes), and a set of methods (or behaviors). Objects also have a class, which is a template
that defines the properties and methods of the object. Classes can also be organized into a
class hierarchy, where a class can inherit properties and methods from a parent class.

For example, a simple object-oriented data model for a retail store might include the
following classes:
1. Customer: with properties for customer ID, name, address, and phone number, and
methods for placing an order and viewing their order history.

2. Product: with properties for product ID, name, description, and price, and methods for
viewing product details and checking availability.

3. Order: with properties for order ID, customer ID, product ID, and order date, and
methods for viewing order details and calculating the total cost.

In this example, the Customer, Product, and Order classes define the properties and methods
of the objects of those classes, and the relationships between the objects are represented
through properties such as the customer ID in the Order class pointing to a specific customer
object and the product ID in the Order class pointing to a specific product object.
See another example of an object-oriented data model in diagram form:
In this diagram, each object represents a data entity, with its attributes represented by the
fields within the object. The lines connecting the objects represent the relationships between
them, showing that an Employee belongs to a Department, and a Department belongs to a
Company. This type of diagram is useful in representing complex data structures and
relationships in an object-oriented software system.
The object-oriented data model is widely used in object-oriented programming languages and
in applications that handle complex and dynamic data, such as video games, virtual reality,
and simulations. This model allows for the encapsulation of data and behavior, inheritance
and polymorphism which are the key features of object-oriented programming. Additionally,
it’s a powerful model for data manipulation, but it’s not well suited for handling large
amounts of data.
Network Model
The network model is a type of data model that represents data as a collection of records and
relationships. It is similar to the hierarchical model in that it represents data as a tree-like
structure, with each record having a parent-child relationship with one or more other records.
However, the network model allows for many-to-many relationships, whereas the
hierarchical model only allows for one-to-many relationships.
In the network model, records are represented as nodes and relationships are represented as
links between nodes. Each node has a unique identifier, also called a record number, and can
have multiple links to other nodes. The relationships are defined by link types and link sets,
which specify the type of relationship and the number of links between nodes.
For example, a simple network model for a retail store might include the following records:
1. Customers: with fields for customer ID, name, address, and phone number.
2. Products: with fields for product ID, name, description, and price.
3. Orders: with fields for order ID, customer ID, and order date.
In this example, the records are related to each other through the use of links, for example,
the customer ID in the orders record is a link to the customers record, and the product ID in
the orders record is a link to the products record.
Here is an example of a simple network model:

In this diagram, nodes represent entities in the network, and the lines connecting the nodes
represent the relationships between them. In this simple example, Node 1 is connected to
Node 2 and Node 2 is connected to Node 3. This type of diagram can be used to represent
network models with many nodes and relationships between them.
The network model is mainly used in legacy systems and is not as popular as the relational
model, it has some advantages over the hierarchical model, such as more flexibility in
defining relationships and it allows for many-to-many relationships. However, it’s more
complex than the relational model and it’s not as efficient for data retrieval and manipulation.

Hierarchical Data Model


A hierarchical data model is a way of organizing data in a tree-like structure, where each
record is a parent or child of one or more other records. This structure is similar to an
organizational chart, where each record is a parent of one or more child records, and each
child record is a parent of one or more child records.
In a hierarchical data model, each record has a unique identifier, also called a primary key,
and one or more fields that store the data for that record. The relationships between records
are defined by pointers, which are fields that contain the primary key of the parent or child
record.
For example, a simple hierarchical data model for a retail store might include the following
records:
1. Customers: with fields for customer ID, name, address, and phone number.
2. Products: with fields for product ID, name, description, and price.
3. Orders: with fields for order ID, customer ID, product ID, and order date.
In this example, the customer ID and product ID fields in the orders record are pointers to the
customer and product records, respectively, linking them together and showing the
relationship.
See another examples of hierarchical model.
In this diagram, the Division is at the highest level, and is related to many Departments. Each
Department is related to many Employees. The diagram shows the hierarchical relationships
between the entities in the data model, with the Division being at the top and Employees at
the bottom. The lines connecting the entities represent the relationships between them,
showing that a Division can have multiple Departments, and a Department can have multiple
Employees.
Hierarchical data models were widely used in the past, but they have been largely replaced by
other types of data models, such as the relational model, because they have some limitations
like one-to-many relationships and they are not flexible for the data retrieval and
manipulation. They are also not efficient for large and complex databases.

Best Desktop Database Software

Desktop databases are databases that run on individual computers and can store a variety
of smaller data sets. These databases have much simpler functionality than larger network
databases or data warehouses. However, these databases are beneficial because users without
in-depth database knowledge can create, develop, and deploy desktop applications all within
the database. Users can also create tables, queries, and reports to track data. These products
are most frequently used by small businesses interested in storing smaller amounts of data
which is only accessed by a small number of users. Desktop databases can be both
a relational database or a NoSQL database in nature. Professionals looking for an
affordable alternative for their desktop database can look to free database software.

 To qualify for inclusion in the Desktop Database category,


a product must:
 Be installed and store data sets on a single PC or computer
 Provide the ability to create, develop and deploy desktop applications without extensive
database knowledge

Compare Desktop Database Software

Desktop Database User Satisfaction

"Quality of Support", "Ease of Use", "Has the product been a good partner in doing
business?", and "Ease of Admin" are the top four factors that positively impact user
satisfaction for Desktop Database products. These factors are determined by an algorithm that
selects the attributes that are most likely to predict user satisfaction within this category.

 Quality of Support
 Ease of Use
 Has the product been a good partner in doing business?
 Ease of Admin

Server Level database

Sometimes you have a requirement to grant permissions to every database on an instance.


Historically this has required creating a user (database level principal) on each database and
granting it the correct permission. And making sure to grant those permissions to the model
database so that future databases have the correct permission as they are created.

SQL Server provides server-level roles to help you manage the permissions on a server.
These roles are security principals that group other principals. Server-level roles are server-
wide in their permissions scope.

SQL Server 2019 and previous versions provided nine fixed server roles. The permissions
that are granted to the fixed server roles (except public) can't be changed. Beginning with
SQL Server 2012 (11.x), you can create user-defined server roles and add server-level
permissions to the user-defined server roles. SQL Server 2022 (16.x) comes with 10
additional server roles that have been designed specifically with the Principle of Least
Privilege

Database Management Trends in 2022


Historically, Database Management systems (DBMS) were simple software programs and
associated hardware that allowed users to access data from different geographical locations.
The system offers its users the ability to store data without concerns about structural changes,
or the data’s physical location. Additionally, a Database Management system (DBMS) can
set restrictions on the data being used, and the services available to each user.

DBMSs are changing, however. They are expanding, taking on more responsibilities, and
providing smarter answers. As new goals and problems present themselves, the desire to find
new ways to use Database Management systems prompt unique solutions. Many of these
innovations are available only in cloud-based DBMSs. As Database Management systems
develop new features and new options, it makes sense to reexamine the organization’s current
system, and consider all new options.

The coronavirus pandemic, with its emphasis on isolation, has accelerated the acceptance of
online shopping and working remotely. Many small businesses have made the decision to
digitize and are shifting to the cloud at an accelerated rate.

The market for Database Management systems is growing fast and, according to Research
and Markets, the global DBMS market was estimated to have reached $63.9 trillion in 2020,
and is projected to reach $142.7 trillion by 2027.

Increasingly, organizations are merging their data warehouses and data lakes into cloud
storage systems. Shifting to the cloud requires a Database Management system (DBMS) for
working with a broad range of new data formats.

Database Management trends in 2022 include:

 Cloud-based DBMS

 Automation and DBMS

 Augmented DBMS

 Increased security

 In-memory databases

 Graph databases

 Open source DBMSs

 Databases-as-a-service
These trends are based, to a large extent, on businesses wanting to provide access to their
products and services over the internet, with the goal of maintaining (or increasing) profits
during the pandemic.

Cloud-based DBMS

The Gartner report The Future of the DBMS Market Is Cloud predicts the use of cloud-based
DBMSs will increase. The market for Database Management systems is being driven
increasingly by cloud services, and no longer by on-premise systems. Certainly, there are
large organizations still using on-premises DBMS solutions, however, they are combining it
with a cloud-based DBMS and using a “hybrid” approach.

The choice of using a cloud-based DBMS service is being supported, in part, by a shift
toward using software-as-a-service applications. This is a very reasonable alternative to the
upfront expenses required for deploying an on-premise Data Management system. Improved
data sharing, improved data integration, and data security are also reasons for using a cloud-
based Database Management system.

Database Management Trends & Automated Services

Automated services can help streamline the process of Database Management. An automated
DBMS can help significantly in sifting through the massive amounts of data generated by
eCommerce, mobile applications, customer relationship management, and social media. As a
consequence, organizations are experiencing enormous surges in the amounts of data being
stored. These massive amounts of data can be used to the business’ advantage, providing
useful insights about their customers and products.

Data automation supports the uploading, handling, and processing of data by automated tools,
rather than performing the tasks manually. Automating data processing improves efficiency
by working much faster than could be done manually, and by eliminating human error.

Having automation as part of the data analytics process allows researchers to focus on
analyzing the data instead preparing it. Automation also helps improve the integration of data
from multiple data sources to a single one. Examples of DBMS automation that is used on a
daily basis include:

 Customer support

 Employee analytics
 Purchase order automation

 Desk support

 Scheduling meetings

DBMS automation is also being used to provide security, data integration, and Data
Governance. Most organizations must meet several compliance requirements, and DBMS
automation helps to meet them. The GDPR, for instance, requires user data be anonymous
and used for statistical purposes before it is shared with external partners, and this can be
done with automated services.

Augmented Data Management (ADM)

Augmented Data Management uses machine learning and artificial intelligence to automate
Data Management tasks, such as spotting anomalies within large amounts of data and
resolving Data Quality issues.

The AI models are specifically designed to perform Data Management tasks, taking less time
and making fewer errors. Todd Ramlin, a manager of Cable Compare, in describing the
benefits of augmented Data Management, said,

“Historically, data scientists and engineers have spent the majority of their time manually
accessing, preparing, and managing data, but Augmented Data Management is changing that.
ADM uses artificial intelligence and machine learning to automate manual tasks in Data
Management. It simplifies, optimizes, and automates operations in Data Quality, Metadata
Management, Master Data Management, and Database Management systems. AI/ML can
offer smart recommendations based on pre-learned models of solutions to specific data tasks.
The automation of manual tasks will lead to increased productivity and better data
outcomes.”

Data Security (and Avoiding Data Breaches)

There have been several high-profile data breaches in the last year. For example, LinkedIn
was breached in June 2021, resulting in 700 million users having their information sold
online. In September, the retailer Neiman Marcus was breached, with 4.8 million customers
being affected. In October of 2021, it was announced the information of 1.5 billion Facebook
users was put up for sale in a hacker’s forum. And those are just a few of the hundreds of data
breaches taking place in 2021. In the state of Washington, the number of known breaches
went up from 220 last year to 280 in 2021.

Security has always been a consideration for database administrators, but the recent breaches
have made it a primary concern. As a result, increased database security has become a
trending issue.

In-Memory Databases

In-memory databases are gaining popularity because they respond faster than traditional
systems. An in-memory database (IMDB) eliminates the disk drive, and instead stores data in
the computer’s main memory – its random access memory or RAM. This tactic reduces
response times.

The lowered response times is made possible because there is no need for translation and
caching. The data being used remains in the same form as when it arrived, and in the same
form as the application working with it. These databases are commonly used by applications
that depend on rapid response times and offer real-time Data Management. The industries
operating and benefitting from in-memory databases include banking, travel, gaming, and
telecommunications.

The Graph Database

Graph databases provide an excellent way to establish and research relationships in a quick
and easy way. They use nodes and edges to form data relationships (nodes represent entities,
and edges represent their relationships). Graph databases are designed to assign the
relationship between data entities with the same importance the data receives. The design
results in only the data which is needed being accessed, while unnecessary data remains
untouched, making data retrieval more efficient.

Currently, graph databases are being used with network and IT management. They have been
used for accessing social media and providing business intelligence, and for finding
anomalies and enhancing security. More recently, graph databases have started being used
successfully with:

 Network management

 Telecommunications
 Impact analysis

 Data center and IT asset management

 Cloud platform management

Open Source Databases

Ten years ago, “open source” Database Management systems were not as commonly used as
they are now. They are now used by 7% of the market. Open source technologies generally
evolve and develop quickly, and this includes databases. Open source technologies are
typically designed to minimize the barriers of adoption, and are extremely attractive to apps
developers working with cloud-native platforms.

Gartner has predicted that by 2022, over 70% of the new in-house applications created will be
developed using an open source DBMS (OSDBMS), or a cloud-based OSDBMS platform-as-
a-service. Open source has shown itself to be a successful method for tapping into creativity
and problem-solving skills. It has been used to develop and distribute useful business-critical
software, and its use will continue to grow.

The Database-as-a-Service

Generally speaking, in the past databases were not designed to work with microservices.
Databases were normally monolithic. Monolithic architecture is the traditional way of
developing applications. Monolithic software is developed as a single, indivisible unit.
Monolithic applications typically lack modularity and use one large code base.

The Database Management trend of using databases-as-a-service is based on the behavior of


development teams designing and building applications, while using a microservice. When an
application “interacts with a database,” the data is shared by all the application’s components.

With a microservices app, however, the data is not shared, but decentralized. Each
microservice is autonomous and comes with its own private data storage, relevant to its
functionality. One service cannot modify the data stored inside another service’s database.
This creates a conflict for integrating microservices with a DBMS.

Fortunately, many new database offerings (primarily NoSQL vendors like AWS DynamoDB
and MongoDB) support the flexibility, redundancy, and scalability requirements, and the
serverless architecture pattern needed for microservices.
Database Management Trends and Evolution

Until recently, DBMSs have been considered consistent, trustworthy structures that offered
reliability without drama. However, with the pandemic acting as an accelerant, databases are
evolving to process data more efficiently, while simultaneously becoming more intelligent.
To access this evolution, and embrace the economic benefits offered by the cloud, businesses
are increasingly shifting to cloud databases.

Currently, a large part of the DBMS market’s growth is being driven by organizations
moving their Database Management systems to the cloud, which provides faster integration
and configuration. Additionally, improved security protocols and superior tools have made
remote work a more reasonable option, and has had significant impact on the market’s
current growth. The increasing number of demands being made on DBMSs – and the
increasing number of solutions – makes research a key step in selecting a new Database
Management system.

You might also like