Professional Documents
Culture Documents
1. What are the main differences between file processing and DBMS
The file system is basically a way of arranging the files in a storage medium like a hard
disk. The file system organizes the files and helps in the retrieval of files when they are
required. File systems consist of different files which are grouped into directories. The
directories further contain other folders and files. The file system performs basic
operations like management, file naming, giving access rules, etc.
Doesn't provide backup and recovery of data Backup and recovery of data is there even if
if lost. data is lost , however the delay time to switch
You can not retrieve the data once it's out of control over backup may take few seconds. (
the system. Eg. 26/11 attack in New York affected the
stocks database and to shift the control to
backup it took 11s which thereby resulted in
trillions of losses).
No efficient query processing in file system Efficient query processing is there in DB.
With the help of the queries, a small chunk of
data or the whole can be retrieved.
Only one user can access data at a time Many can access, also user system has the
control for type and privileges to the users
(c ) Query Language
Query language (QL) refers to any computer programming language that requests and
retrieves data from database and information systems by sending queries. It works on
user entered structured and formal programming command based queries to find and extract
data from host databases.
Query language may also be termed database query language.
Query language is primarily created for creating, accessing and modifying data in and out from
a database management system (DBMS). Typically, QL requires users to input a structured
command that is similar and close to the English language querying construct.
(d) Metadata
Metadata is simply defined as data about data. It means it is a description and context of the
data. It helps to organize, find and understand data.
Metadata about the picture captured
File name,
Size of the file,
Date and time,
Camera settings etc
Relational databases store and provide access not only data but also metadata in a structure
called data dictionary or system catalog. It holds information about:
tables,
columns,
data types,
table relationship,
constraints etc.
A data definition language (DDL) is a computer language used to create and modify the
structure of database objects in a database. These database objects include views, schemas,
tables, indexes, etc. This term is also known as data description language in some contexts, as
it describes the fields and records in a database table.
It is used to establish and modify the structure of objects in a database by dealing with
descriptions of the database schema. Commonly used DDL in SQL querying are CREATE,
ALTER, DROP, and TRUNCATE.
Data Manipulation Language or DML is a subset of operations used to insert, delete, and
update data in a database. A DML is often a sublanguage of a more extensive language like SQL;
DML comprises some of the operators in the language. Selecting read-only data is closely
related and is sometimes also considered a component of a DML, as some users can perform
both read and write selection.
A popular data manipulation language is Structured Query Language or SQL, used to retrieve
and manipulate data in a relational database. With SQL, you can perform operations on the
database and also use it to create a database. SQL uses specific commands like Create, Drop,
Insert, etc., to carry out the required tasks. Examples are INSERT, SELECT, UPDATE, and
DELETE commands
Common components that are universal across all DBMS software, including:
1. Storage engine
2. Query language
3. Query processor
4. Optimization engine
5. Metadata catalog
6. Log manager
7. Reporting and monitoring tools
8. Data utilities
Storage engine
The storage engine is the core component of the DBMS that interacts with the file system
at an OS level to store data. All SQL queries which interact with the underlying data go
through the storage engine.
Query language
A database access language is required for interacting with a database, from creating
databases to simply inserting or retrieving data. A proper DBMS must support one or
multiple query languages and language dialects. Structured query language (SQL) and
MongoDB Query Language (MQL) are two query languages that are used to interact with
the databases.
In many query languages, the query language functionality can be further categorized
according to specific tasks:
Data Definition Language (DDL). This consists of commands that can be used to define
database schemas or modify the structure of database objects.
Data Manipulation Language (DML). Commands that directly deal with the data in the
database. All CRUD operations come under DML.
Data Control Language (DCL). This deals with the permissions and other access controls
of the database.
Transaction Control Language (TCL). Command which deals with internal database
transactions.
Query processor
This is the intermediary between the user queries and the database. The query processor
interprets the queries of users and makes them actionable commands that can be
understood by the database to perform the appropriate functionality.
Optimization engine
The optimization Engine allows the DBMS to provide insights into the performance of the
database in terms of optimizing the database itself and queries. When coupled with
database monitoring tools, it can provide a powerful toolset to gain the best performance
out of the database.
Metadata catalog
This is the centralized catalog of all the objects within the database. When an object is
created, the DBMS keeps a record of that object with some metadata about it using the
metadata catalog. Then, this record can be used to:
Reporting and monitoring tools are another standard component that comes with a
DBMS. Reporting tools will enable users to generate reports while monitoring tools enable
monitoring the databases for resource consumption, user activity, etc.
Data utilities
In addition to all the above, most DBMS software comes with additional inbuilt utilities to
provide functionality such as:
Database users are categorized based on their interaction with the database.
Database Administrator (DBA) is a person/team who defines the schema and also controls
the 3 levels of the 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 database.
DBA also monitors the recovery and backup and provides technical support.
The DBA has a DBA account in the DBMS which is called a system or superuser account.
DBA repairs damage caused due to hardware and/or software failures.
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 example, Railway’s ticket booking users are naive users. Clerks in any bank are naive
users because they don’t have any DBMS knowledge but they still use the database and
perform their given task.
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.
Sophisticated Users:
Sophisticated users can be engineers, scientists, business analysts, who are familiar with
the database. They can develop their own database applications according to their
requirements. They don’t write the program code but they interact with the database by
writing SQL queries directly through the query processor.
Database Designers:
Database Designers are the users who design the structure of a database which includes
tables, indexes, views, constraints, triggers, stored procedures. He/she controls what data
must be stored and how the data items to be related.
Application Program:
Application Program are the back end programmers who write the code for the application
programs. They are computer professionals. These programs could be written in
Programming languages such as Visual Basic, Developer, C, FORTRAN, COBOL etc.
Problem statements (2 Sept)
Q1. Differentiate between physical data independence and logical data independence?
It is mainly concerned about how the data It is mainly concerned about the structure
is stored into the system. or the changing data definition.
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 may or may not be needed to improve level are significant whenever the logical
the performance of the structure. structure of the database is to be changed.
Relation schema: A set of attributes is called a relation schema (or relation scheme). A
relation schema is also known as table schema (or table scheme). A relation schema can be
thought of as the basic information describing a table or relation. It is the logical definition of
a table. Relation schema defines what the name of the table is. This includes a set of column
names, the data types associated with each column.
Relational schema may also refer to as database schema. A database schema is the collection
of relation schemas for a whole database. Relational or Database schema is a collection of
meta-data. Database schema describes the structure and constraints of data representing a
particular domain. A Relational schema can be described as a blueprint of a database that
outlines the way data is organized into tables. This blueprint will not contain any type of data.
In a relational schema, each tuple is divided into fields called Domains.
Q3. Describe the 3 schema architectures. Why do we need mapping between schema levels ?
How do different schema definitions support this architecture?
1.Internal Level
● The internal level has an internal schema which describes the physical storage
● It uses the physical data model. It is used to define how the data will be stored in a
block.
● The physical level is used to describe complex low-level data structures in detail.
● Access paths.
For Example: Specification of primary and secondary keys, indexes, pointers and
sequencing.
● The conceptual schema describes the design of a database at the conceptual level.
● The conceptual level describes what data is to be stored in the database and also
● In the conceptual level, internal details such as an implementation of the data structure
are hidden.
3. External Level
● At the external level, a database contains several schemas that are sometimes called
subschemas. The subschema is used to describe the different views of the database.
● Each view schema describes the database part that a particular user group is interested
● The view schema describes the end user interaction with database systems.
The three levels of DBMS architecture don't exist independently of each other. There must be
correspondence between the three levels i.e. how they actually correspond with each other.
DBMS is responsible for correspondence between the three types of schema. This
correspondence is called Mapping.
In a three schema approach, most data-related description languages or tools associated with
schemas focus on the "physical level" and "view level", with the "conceptual level" mostly
used in combining the schema design itself. In relational databases, the physical model is
explained using SQL DDL. Physical schemas in NoSQL can be fixed to particular records using
JSON or XML. There are some languages to describe conceptual schemas. But nowadays
languages are not used for conceptual schemas but instead Entity relationship models, a
diagramming and description tool is used. The "view level" or "external level" is implemented
outside of data managers in user-side code. This is done using object relational mapping with
the help of tools like Hibernate. These tools convert "physical layer" schema structure to
"external-friendly" structures. Here the user input UI elements are given to the application
Q4: List down the differences between hierarchical data model and network data model.
5 Structure Its create tree like structure It support graph like structure