You are on page 1of 6

3A. What do you understand by the term SQL?

What are its uses and


important in DBMS.
SQL, which stands for Structured Query Language, is a standardized
programming language used for managing and manipulating relational
databases. It is essential in a Database Management System (DBMS) because it
provides a systematic way to create, retrieve, update, and delete data within a
database.
Here are some key uses and importance of SQL in DBMS:
 Data Definition: SQL can define the structure of the data in a database,
including creating, altering, and dropping tables and other database objects.
 Data Manipulation: It allows you to perform operations such as inserting,
updating, deleting, and querying data from the database.
 Data Control: SQL provides commands for controlling access to data and
assigning permissions for data operations.
 Transaction Control: It can manage transactions in a database, ensuring data
integrity and consistency even in complex operations.
P3B. With the aid of a diagram compare and contrast with details between
paralleland distributed database
Parallel Database:
 Architecture: Tightly coupled system with multiple processors working in
unison.
 Data Storage: Centralized data storage, often partitioned among various disks
for faster retrieval.
 Query Processing: More straightforward due to the centralized nature but can
be complex for large-scale operations.
 Transaction Management: Typically simpler as it deals with a single system.
 Scalability: Limited by the architecture and hardware capabilities of the single
system.
 Fault Tolerance: Generally lower since it relies on a single system.
Distributed Database:
 Architecture: Loosely coupled system with data distributed across multiple
network sites.
 Data Storage: Data is fragmented and possibly replicated across different
locations.
 Query Processing: More complex due to the need to coordinate between
different sites.
 Transaction Management: Involves both local and global transactions,
adding to the complexity.
 Scalability: Higher as new sites can be added to the network.
 Fault Tolerance: Generally higher due to data replication and distribution.
Here’s a simplified diagram to illustrate the differences:
Parallel Database System
+---------------------+
| Central |
| Server |
| +----+----+ |
| | Disk1 | Disk2 | |
| +----+----+ |
| |
+---------------------+
/ \
/ \
/ \
+------+ +------+
| Node | | Node |
+------+ +------+

Distributed Database System


+------+ +------+
| Site1 | | Site2 |
| DB1 | | DB2 |
+------+ +------+
\ /
\ /
\ /
+---------------------+
| Network Hub |
+---------------------+
In summary, parallel databases are designed for performance optimization within
a single system, while distributed databases aim to manage data across multiple
sites, offering greater scalability and fault tolerance.

With the aid of a diagram list and explain the three distributed DBMS
architecture.
Distributed Database Management Systems (DDBMS) have three primary
architectures, each with its own characteristics and use cases. Here’s a brief
explanation along with a conceptual diagram for each:
1. Client-Server Architecture:
o In this model, the system is divided into two levels: clients and
servers.
o Clients are responsible for presenting data to the user and making
requests.
o Servers store the data and handle transactions, query processing, and
optimization.
2. Peer-to-Peer Architecture:
o Each node in the system acts as both a client and a server.
o Nodes are equal participants, sharing resources and coordinating their
efforts.
o This architecture is decentralized and can scale out by adding more
peers.
3. Multi-DBMS Architecture:
o This combines two or more independent database systems into a
single, integrated system.
o It allows for the integration of different databases, which may be
heterogeneous in nature.
o The system appears as a unified database to the user despite being
distributed.
Here’s a simplified diagram to illustrate these architectures:
Client-Server Architecture
+--------+ +--------+
| Client |----->| Server |
+--------+ +--------+
| Data |
+--------+

Peer-to-Peer Architecture
+--------+ +--------+
| Peer 1 |<---->| Peer 2 |
+--------+ +--------+
| Data | | Data |
+--------+ +--------+

Multi-DBMS Architecture
+--------+ +--------+
| DBMS 1 |<---->| DBMS 2 |
+--------+ +--------+
| Data | | Data |
+--------+ +--------+
In the Client-Server model, the focus is on a clear distinction between data
requests and data management. The Peer-to-Peer model emphasizes equal
responsibility and resource sharing among all participants. The Multi-
DBMS model is about integrating diverse systems into a cohesive whole.

What are the two kinds of new data types supported in object-database systems,
Give an example of each and discuss how the example situation would be
handled if only an ROBMS was available
Object-database systems support a variety of data types that are not typically
found in traditional relational database management systems (RDBMS). Two
notable kinds of new data types supported in object-database systems are:
1. Structured Data Types: These are user-defined types that represent
complex data structures with their own attributes and methods. For
example, an Employee type might include attributes
like name, id, address, and methods like calculateSalary(). In
an RDBMS, this would be handled by creating a separate table for
employees, with columns for each attribute and stored procedures or
functions to represent methods.
2. Collection Data Types: These include arrays, lists, sets, and multisets,
which can store multiple values in a single field. For instance,
a Project type might have a members attribute that is a list
of Employee types. In an RDBMS, handling such data would require a
separate table to represent the collection, with foreign keys linking back to
the primary table.
If only an RDBMS was available, these situations would be handled using
normalization techniques to split the structured data into multiple related tables.
Complex relationships and hierarchies would be managed using foreign keys and
join operations. This often leads to the so-called “impedance mismatch” problem,
where the object-oriented model of an application does not align neatly with the
tabular model of an RDBMS, resulting in more complex and less intuitive data
access patterns.

Write short notes with example on the following terms related to advanced
database management system (ADBMS).
a. The Weak entity and Entity set.
b. The one to one Binary and Ternary relationship
c. The Point data and Region data
d. The Data fragmentation and Data Replications
e. Concurrency control and Dead lock controlcontrol.
a. The Weak Entity and Entity Set:
 A weak entity is an entity that cannot be uniquely identified by its attributes
alone and relies on a ‘strong’ entity (usually through a foreign key).
 Example: A Payment entity in a database might be a weak entity if it
cannot exist without an associated Loan entity.
b. The One to One Binary and Ternary Relationship:
 A one-to-one binary relationship exists when each entity in one set is
related to at most one entity in another set.
 Example: A Person entity and a Passport entity where each person has
at most one passport and vice versa.
 A ternary relationship involves three different entities.
 Example: A Supplier, Part, and Project entities where a supplier
provides a part for a specific project.
c. The Point Data and Region Data:
 Point data represents a single point in space.
 Example: The exact location of a landmark on a map.
 Region data represents a larger area that may consist of multiple points and
boundaries.
 Example: The geographic area covered by a city on a map .
d. The Data Fragmentation and Data Replications:
 Data fragmentation is the division of a database into smaller pieces which
can be stored in different locations.
 Example: Customer data divided by region and stored in local servers.
 Data replication involves creating copies of data and storing them in
multiple locations to improve access and reliability.
 Example: A user’s profile data replicated across several data centers to
ensure quick access and high availability.
e. Concurrency Control and Deadlock Control:
 Concurrency control ensures that database transactions are performed in a
safe manner without conflicts when multiple transactions occur
simultaneously.
 Example: Locking mechanisms that prevent two users from modifying the
same data at the same time.
 Deadlock control involves techniques to prevent, detect, and resolve
deadlocks, which occur when multiple transactions are waiting for each
other to release resources.
 Example: A timeout mechanism that aborts a transaction if it has been
waiting for a lock for too long.
These concepts are fundamental to the design and operation of robust and
efficient database systems, especially in environments where data integrity,
consistency, and availability are critical.

You might also like