0% found this document useful (0 votes)
14 views

DBMS Notes

Uploaded by

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

DBMS Notes

Uploaded by

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

MODULE 4

Only short note will be asked from this section


Ques1: Write a short note on Multimedia Databases.
1. Definition: Multimedia databases (MMDB) host interrelated multimedia data,
including text, graphics, images, animations, audio, and video.
2. Composition: They store diverse types of information such as words, pictures,
sounds, and videos in an integrated manner.
3. Purpose: Multimedia data presents information interactively to users which
4. Types: Multimedia databases include structured databases based on features and
relationships, supporting querying based operations on these features.
5. Usage: These databases find applications in various domains requiring the
management of multimedia content, such as digital libraries and content repositories.
6. Storage and Retrieval: Multimedia databases facilitate the efficient storage and
retrieval of different media content.
7. Interactivity: The interactive nature of multimedia data enhances user engagement
and comprehension.
8. Querying: Users can query multimedia databases based on specific features, enabling
precise retrieval of desired information.
9. Challenges: Managing multimedia databases involves addressing challenges related
to data complexity, indexing, and retrieval speed.
10. Research Focus: Ongoing research explores advanced techniques for optimizing
multimedia database design and functionality.

Ques2: Write a short note on Semi-Structured Data.


1. Definition: Semi-structured data is not purely structured like in a relational database
but it contains some level of structure, combining features of both structured and
unstructured data.
2. Composition: It includes data that is organized by subject, topic, or hierarchical
programming language.
3. Hierarchical Format: Semi-structured data exhibits a hierarchical structure with
records and fields which makes it suitable for representing complex relationships.
4. Flexibility: Unlike structured data, semi-structured data doesn't strictly stick to a
predefined schema.
5. Schema Changes: It is not necessary to make changes to the database schema before
adding or removing data.
6. Combination Features: Semi-structured data combines characteristics of structured
data's organization with unstructured data's flexibility.
7. Purpose: Its design allows the capture of data which is dynamic or is evolving over
time.
8. Usage: XML files, JSON documents, and certain NoSQL databases are common
examples of semi-structured data.
9. Challenges: Analysing semi-structured data is challenging in comparison to
structured data due to its flexible nature.
10. Benefits: The flexibility and adaptability of semi-structured data is beneficial for
scenarios where data structures are not rigidly defined.
Ques3: Write a short note on Databases on the Web.
1. Definition: A web database is an organized collection of data which is accessible
through the internet.
2. Organization of data: The data in web databases is logically related and structured
for efficient retrieval.
3. Composition: Web databases include various forms of data, including text, numbers,
images.
4. Purpose: They are designed to organize vast amounts of data accumulated in
information technology.
5. Usage: Web databases allow easy access, management, and updating of information
which has been stored electronically.
6. Control: Databases on the web are usually controlled electronically.
7. Storage: Data in web databases is stored electronically.
8. Examples: MySQL, PostgreSQL, MongoDB.
9. Challenges: Data Security, Data Integrity and scalability.

MODULE 2
Query Processing and Optimization
Ques1: Define query processing. Discuss the various steps involved in query processing.
Draw the architecture of query processing.
Query processing in database management system (DBMS) involves selecting the best
strategy to respond to a database request. It involves translating a high-level query into a low-
level query which the database system can execute. The key steps in query processing
include:

1. Scanning, Parsing, Validation and Translation:


 A query written in high level language like SQL is first scanned, parsed and
validated. Scanner identifies the language tokens like SQL keywords, relation
names and attributes. Parser checks the syntax of the query. Validation means
to check whether all the attributes and relation names are valid or not.
 The query is translated into a query tree or a similar structure for further
processing.
2. Optimization:
 Determining the most efficient way to execute a query is called as query
optimization.
 It involves selecting the best execution plan by considering various factors like
indexing, join algorithms, and cost estimation.
3. Evaluation:
 Here the optimized query is transformed into an executable form. An
execution plan is created that specifies how the data will be retrieved by
accessing the indexes, tables, sorting, and filtering.
4. Execution:
 The final step is executing the query using the generated execution plan.
 The execution engine interprets the query execution plan and interacts with the
storage manager to fetch the requested data.
Now do the diagram of Query Processing Architecture from DBMS notes copy.
Ques2: Write a short note on Query Optimization in DBMS. Discuss the components of
query optimizer.
Query optimization means selecting the most efficient way for executing a given query,
which results in minimum response time and minimum resource utilization. They key aspects
of query optimization are:
1. Selection of Execution Plan:
 It involves determining the best execution plan by considering factors like
indexing, join algorithms, and cost estimation
2. Cost Estimation:
 The cost associated with each potential execution plan is calculated. The cost
here refers to disk I/O, CPU usage, and memory consumption.
3. Plan Comparison:
 The optimizer compares the estimated costs of different execution plans and
selects the one with minimum resource utilization and response time.

Components of a Query Optimizer:

The query optimizer is made up of three parts: transformer, estimator and plan generator.
The figure below depicts those components.

Query Transformer: The transformer determines whether it is advantageous to rewrite the


original query into a semantically equivalent query but at a lower cost

Estimator: The estimator is the optimizer component of the query optimizer that calculates
the total cost of a given execution plan.

Plan Generator: The plan generator investigates multiple execution plans for executing a
query.
The plan with the lowest cost is chosen by the optimizer.

Ques3: Why is Query Optimization important ?

Query optimization reduces database response times, reduces resource consumption and
reduces the cost of execution. Overall it leads to an improved user experience, increasing
satisfaction and productivity.

Ques4: What is the cost parameter in Query Optimization ?


Or
What is the cost of executing a query ?
The cost associated with executing a query includes the following costs:-
1. Cost of access to secondary storage: This includes the cost of searching for performing
reading and writing operations on the data which is stored in secondary storage like hard disk.
2. Cost of Storage: It includes the cost of storing intermediate results which are generated
during the execution of the query.
3. Cost of Computation: It is the cost of performing in-memory operations while executing
a query.
4. Cost of Memory: It is the cost of memory consumed for executing a query.
5. Cost of Communication: It is the cost of communicating the query and its results from
database site to the site of query origination.

Ques5: What is Query Execution plan ?


A query execution plan is a detailed roadmap or set of instructions generated by query
optimizer to execute the given query. It outlines the steps and the operations which DBMS
will perform to retrieve and process the data requested by the query. This plan is crucial for
optimizing the query's performance and for effective resource utilization.

Ques6: What is the task of Query Execution Engine ?


The Query Execution Engine is responsible for performing operations specified in a query on
a database. The primary tasks of the Query Execution Engine include:
1. Accessing Data from the tables
2. Joining and Filtering to narrow down the result set
3. Sorting and Aggregation
4. Result Set Presentation

Ques7: What is pipelining and materialization ?


Pipelining in Query Processing: Pipelining is a technique in query processing where
operations are performed on-the-fly, and results are passed from one operation to another
without the storing intermediate results. It involves creating a sequence of stages where each
stage performs a specific operation on the data. This reduces the need for storing intermediate
results in memory, enhancing efficiency.

Materialization in Query Processing: Materialization is also technique in query processing.


Unlike pipelining, in materialization, the intermediate results are computed and stored,
typically in temporary storage like disk or memory. This approach can be beneficial for
complex queries or in scenarios where reusing the intermediate results can improve the
overall query performance.

Ques8: What are the limitations of relational data model ?

Following are some key limitations of the relational data model :-

1. Complex for representing Hierarchical Data: Representing hierarchical data


structures in a relational model can be complex and may require additional effort than
is required for representation in hierarchical databases.
2. Limited Performance for Complex Queries: The relational model may face
performance challenges when dealing with complex queries involving multiple tables
and relationships.
3. Scalability Issues: As the volume of data increases, relational databases may face
scalability challenges.
4. Data Redundancy: While normalization helps reduce redundancy, it can lead to joins
across multiple tables, impacting performance. Denormalization to improve
performance may introduce redundancy.
5. Limited Support for Semi-structured Data: Relational databases are designed for
structured data and may not handle semi-structured or unstructured data as efficiently
as other database models.
6. Cost and Complexity: Implementing and maintaining relational databases can be
expensive and complex, particularly in terms of hardware requirements and software
licensing.

Object Oriented and Object Relational Databases


Ques1: What was the need for introducing object oriented data model ?
In order to represent the complex real world problems there was a need for a data model
which is closely related to the real world. Object Oriented Data Model represents the real
world problems easily.
Ques4: What is object oriented data model ?
In OODM, real world problems are represented as objects with different attributes. All
objects have multiple relationships between them. Basically OODM is a combination of
Object Oriented programming and Relational Database Model.
Ques2: What is an object identifier ? What primary characteristics should an object
identifier possess ?
In an Object-Oriented Data Model (OODM), an object identifier (OID) is used to uniquely
identify individual objects within the database. The primary characteristics that an object
identifier should possess in an OODM are uniqueness, persistence, immutability,
decodability, structure and scalability.

Ques3: How does the concept of an object in object oriented data model differ from the
concept of entity in entity relationship model ?
Object in OODM Entity in ER Model
In OODM, objects represent real-world In ER model, entities represent real-world
entities. objects.
Objects have attributes and behavior Entities have attributes which describe the
associated with them. data associated with them.
Objects focus on the behavior and actions ER Model focuses relationships between
which can be performed on the data they entities, with less emphasis on behavior.
encapsulate.

Ques5: Write a short note on Object Oriented Database Systems (OODBS or


OODBMS). Include its advantages and disadvantages.
Object-Oriented Database Systems (OODBS or OODBMS) are a type of database
management system that uses object-oriented principles to organize and store data. In this
model, data is represented as objects, which encapsulate both attributes and behaviors.
OODBS extends the concepts of object-oriented programming to database management
systems, providing a more natural and integrated approach to data modelling.
Advantages of OODBS
1. OODBS allows complex data modeling
2. Objects in OODBS provide data abstraction.
3. Inheritance and polymorphism support code reusability.
4. OODBS supports relationships between objects.
Disadvantages of OODBS
1. Learning OODBS can be complex.
2. There is no universally agreed-upon data model for OODBS, leading to a lack of
standards and interoperability between different systems.
3. OODBS faces competition from well-established relational databases, and their
adoption is not as widespread.
4. In some cases, OODBS may suffer from performance issues compared to traditional
relational databases

Ques6: Write a short note on Object Relational Database Systems (ORDBS or


ORDBMS). Include its advantages and disadvantages.
Object-Relational Database Systems (ORDBS or ORDBMS) are a type of database
management systems combine features of both relational and object-oriented database
systems. These systems aim to bridge the gap between the traditional relational databases and
the more complex object-oriented databases. In ORDBS, data is organized into tables with
relational properties, but it also incorporates object-oriented concepts, allowing advanced
data modeling.
Advantages of ORDBS
1. ORDBS allows users to define new data types, operators, and methods, enhancing the
flexibility of data modeling.
2. ORDBS combines the advantages of relational databases and object oriented
databases by introducing data integrity, query capabilities along with the ability to
share and reuse code.

Disadvantages of ORDBS
1. Learning ORDBS can be complex.
2. There is no universally agreed-upon data model for OODBS, leading to a lack of
standards and interoperability between different systems.
3. The model can become complicated.

Ques7: Why are object oriented databases so popular ?


Object-oriented databases (OODBs) have gained popularity for several reasons:

1. They allow the representation of data in a way that closely resembles the real-world
entities.
2. They are highly flexible and adaptable and are capable of handling changes in data
structures with ease.
3. They promotes reusability and sharing of code.
4. They provide better performance for complex relationships.

Ques8: What are the limitations of relational database ? How does OODB overcome the
limitation of relational database ? How does ORDB overcome the limitation of
relational database ?
Limitations of Relational Databases:
Relational databases are less adaptable to evolving data structures.
Representing complex relationships in relational databases can be challenging.

Solutions offered by Object-Oriented Database (OODB):

1. OODBs are flexible adaptable and are capable of handling changes in the data
structures with ease.

2. OODBs can handle complex relationships with ease.

Solutions offered by Object-Relational Database (ORDB):


ORDBs aim to bridge the gap between relational and object-oriented databases. They
combine the features of both relational databases and object-oriented databases.
1. ORDBs are flexible adaptable and are capable of handling changes in the data
structures with ease.

2. ORDBs can handle complex relationships with ease.

Ques9: Give some applications where Object Oriented databases may be useful.
CAD/CAM systems, geographic information systems, and document management systems,
Molecular science and astronomy.

Ques10: Differentiate between RDBMS, ORDBMS and OODBMS.


RDBMS ORDBMS OODBMS
Data Model Relational model Combination of the Object-oriented
relational and object- model.
oriented models.
Data Representation Data is represented in Utilizes both tablesData is represented in
the form of tables. and objects for data the form of objects
representation. which have attributes
and behavior.
Query Language SQL (Structured uses SQL with object- uses object-oriented
Query Language) oriented features. query languages.
Flexibility suitable for well- Flexible and adaptable Flexible and adaptable
defined data structures to data structures to data structures
only. which evolve over which evolve over
time, can handle time, can handle
complex relationships complex relationships
with ease. with ease.
Example MySQL IBM Informix ObjectDB

MODULE 1
Relational Database

Ques1:

You might also like