Ajay Unit 3 DBMS
Ajay Unit 3 DBMS
Question-1-What are threats and security issues associated with a database system? Describe the importance of security in
database management.
Answer- Threats and Security Issues in Database Systems
Database systems are critical components in the infrastructure of many organizations, holding sensitive
and valuable information. However, they are susceptible to various threats and security issues. Here are
some common ones:
SQL Injection Attacks:
1. Description: Attackers exploit vulnerabilities in an application by injecting malicious SQL code
through input fields, potentially gaining unauthorized access to the database.
2. Impact: Can lead to unauthorized data access, data manipulation, or deletion.
Unauthorized Access:
1. Description: Unauthorized users gain access to the database using stolen credentials or exploiting
weak authentication mechanisms.
2. Impact: Data breaches, data theft, and loss of confidentiality.
Privilege Escalation:
1. Description: Users gain higher privilege levels than intended by exploiting software bugs or
misconfigurations.
2. Impact: Unauthorized data access and system control.
Data Leakage:
Relational Calculus:
Definition: Relational calculus is a declarative query language that specifies the desired information without
specifying the exact procedure or sequence of operations.
Operators:
Relational calculus does not have specific operators like relational algebra. Instead, it uses predicates and variables to
define queries.
Relative Uses:
1) Relational calculus is used for specifying queries in a more abstract and declarative manner.
2) It is often used in theoretical discussions about relational databases and query languages.
Merits:
1) Allows users to specify queries in a more natural and intuitive manner without worrying about the
implementation details.
2) Provides a higher level of abstraction, making it easier to express complex queries concisely.
3) Eliminates the need for users to specify the sequence of operations, allowing for optimization by the
database system.
Demerits:
1) Relational calculus expressions can be less efficient than equivalent relational algebra expressions, as
the system needs to derive an efficient execution plan.
2) Not directly implementable by most database systems, requiring translation into relational algebra or
other internal representations.
3) Comparison:
4) Approach:
Question-7-What is distributed data base components of what are the distributed database system? Explain with the help of a
diagram.
Answer-A distributed database system (DDBS) consists of multiple interconnected databases distributed across
different locations or sites, each with its own processing capabilities. These databases work together to provide a
unified view of the data to users and applications. The components of a distributed database system include:
Sites:
1) Sites are individual locations where database instances are installed and managed.
2) Each site may have its own hardware, software, and local database management system (DBMS).
3) Sites are connected through a network, enabling communication and data exchange between them.
Data Distribution:
1) Data is distributed across multiple sites based on various criteria such as location, access frequency,
and partitioning strategy.
2) Horizontal partitioning divides tables into subsets of rows, while vertical partitioning divides tables
into subsets of columns.
3) Data replication creates copies of data across multiple sites for redundancy and fault tolerance.
Distributed Transaction Manager:
1) The distributed transaction manager coordinates transactions that span multiple sites in the distributed
database system.
2) It ensures that distributed transactions maintain ACID (Atomicity, Consistency, Isolation, Durability)
properties across all participating sites.
Query Processor:
1) The query processor receives queries from users or applications and determines how to execute them
across multiple sites.
2) It may optimize queries to minimize network traffic and improve performance.
Distributed Query Optimizer:
1) The distributed query optimizer analyzes queries and generates an optimal execution plan that
considers data distribution, network latency, and site capabilities.
2) It may use cost-based optimization techniques to select the most efficient query execution strategy.
Distributed Data Dictionary:
1) The distributed data dictionary contains metadata about the distributed database, including schema
information, data distribution, and location of data.
2) It helps coordinate data access and ensures consistency across distributed sites.