16A Batch Advance Database System Question Answer
16A Batch Advance Database System Question Answer
A.
B.
C.
(b) Atomicity in a file system refers to the all-or-nothing nature of transactions. A failure
during a transaction could leave the file system in an inconsistent state if atomicity isn't
guaranteed. For example, if a file is being updated and the system crashes mid-update,
the file might be corrupted or partially updated. Security in a file system is vulnerable
because it typically lacks robust access control mechanisms. Files might be accessible
to unauthorized users, leading to data breaches or unauthorized modifications. This is in
contrast to a DBMS, which offers granular control over access permissions
(c) A Database Administrator (DBA) is responsible for the performance, integrity, and
security of a database. Their functions include database design, implementation, and
maintenance; ensuring data security and access control; performance monitoring and
optimization; backup and recovery procedures; and troubleshooting database issues.
They also often handle user management and capacity planning
2.
A.
B.
C.
D.
(a) A database schema is a formal description of a database's structure. It defines the
tables, their columns (attributes), data types, and relationships between tables. The
physical schema describes the actual physical storage structures of the database,
including file organization, indexing, and data storage mechanisms. This is the low-level
implementation detail. The logical schema, on the other hand, describes the database
structure from a user's perspective, focusing on the tables, attributes, and relationships
without detailing the physical implementation. It's a high-level, abstract view
(b) Mapping cardinalities in a binary relationship define the number of instances of one
entity that can be associated with instances of another entity. There are four main types:
one-to-one (1:1), one-to-many (1:N), many-to-one (N:1), and many-to-many (N:M). A
1:1 relationship means one instance of entity A can be related to at most one instance
of entity B, and vice versa. A 1:N relationship means one instance of entity A can be
related to many instances of entity B, but each instance of entity B is related to only one
instance of entity A. N:1 is the reverse. An N:M relationship means many instances of
entity A can be related to many instances of entity B
(c) Data Definition Language (DDL) is used to define the database structure. It's used to
create, modify, and delete database objects like tables, indexes, and views. Data
Manipulation Language (DML) is used to manipulate the data within the database. This
includes inserting, updating, deleting, and retrieving data. DDL focuses on the schema,
while DML focuses on the data
(d) A primary key is a column or a set of columns in a table that uniquely identifies each
row in that table. It cannot contain NULL values and must be unique for every record.
It's crucial for maintaining data integrity and ensuring efficient data retrieval
3.
A.
B.
C.
D.
(a) A data model is an abstract model that organizes elements of data and standardizes
how they relate to one another. It's a blueprint for a database, defining the structure and
constraints of the data. Examples include relational models (like those used in SQL
databases), object-oriented models, and NoSQL models (like document, key-value,
graph, and column-family stores)
(c) A strong entity set is an entity set that can exist independently of other entity sets. It
has its own primary key. A weak entity set, on the other hand, cannot exist
independently; its existence depends on another entity set (called the identifying entity
set). A weak entity set does not have a primary key of its own; instead, it uses a
combination of its partial key and the primary key of its identifying entity set to form a
composite primary key. In an E-R diagram, a weak entity set is typically represented by
a double rectangle, and a double diamond is used to represent the identifying
relationship between the weak entity set and its identifying entity set
(d) A derived attribute is an attribute whose value can be calculated or derived from
other attributes within the same entity set. It doesn't need to be stored explicitly in the
database; instead, its value can be computed whenever needed. For example, in an
entity set representing employees, "age" could be a derived attribute calculated from the
"date of birth" attribute
4.
A.
B.
C.
a) SQL (Structured Query Language) is composed of several parts working together to
manage and manipulate data within a relational database management system
(RDBMS). These parts include:
FROM table_name
WHERE condition;
SELECT branch_name
FROM Account
GROUP BY branch_name
This query first groups the accounts by branch_name using GROUP BY. Then, the
HAVING clause filters these groups, keeping only those where the average balance
(calculated using AVG(balance)) is greater than 1200. The SELECT branch_name
part specifies that only the branch names meeting this condition should be returned
5.
A.
B.
C.
a) Referential integrity is a database concept that ensures relationships between tables
remain consistent. It dictates that if a foreign key in one table references a primary key
in another table, the foreign key value must either match a primary key value in the
referenced table or be NULL. This prevents orphaned records—records in a child table
that refer to non-existent records in a parent table. The basic concept is to maintain data
consistency and accuracy across related tables by enforcing rules on how data can be
inserted, updated, and deleted
c) A domain constraint defines a set of valid values for a particular attribute (column) in
a database table. It restricts the type of data that can be stored in that column, ensuring
data integrity and consistency. For example, a domain constraint might specify that an
age attribute must be a positive integer, or that a status attribute can only accept values
from a predefined list (e.g., "active," "inactive"). This constraint helps maintain data
quality by preventing invalid data from being entered into the database
6.
A.
B.
C.
(b) A single-user computer system is designed to be used by only one person at a time.
Resources like the CPU, memory, and storage are dedicated to that single user.
Examples include personal computers used at home or in small offices. A multiuser
computer system, on the other hand, allows multiple users to access and share
resources simultaneously. This typically involves a central server managing access and
allocating resources to different users. Examples include mainframe computers, servers
in a network environment, and cloud computing platforms
(c) Parallel database architecture involves distributing the database across multiple
processors or computers to improve performance and scalability. Data is partitioned and
distributed among these nodes, allowing for parallel processing of queries and
transactions. This architecture can significantly improve query response times and
handle larger volumes of data than a single-processor system. Different parallel
architectures exist, including shared-nothing, shared-disk, and shared-memory
architectures, each with its own trade-offs in terms of cost, complexity, and performance
7.
A.
B.
C.
A transaction, in the context of databases, is a single logical unit of work that accesses
and potentially modifies data. It's a sequence of operations performed as a single,
atomic unit. This means either all operations within the transaction succeed, or none do.
This ensures data consistency and integrity
(b) What are the states that involve in transaction? Describe it with state diagram.
State Diagram:
ACID properties are crucial for ensuring database reliability and consistency. They
stand for:
8.
A.
B.
C.
(a) E-R Diagram: An Entity-Relationship diagram (ERD) is a visual representation of
data used in database design. It shows entities (things of interest, like customers or
products), attributes (characteristics of entities, like customer name or product price),
and relationships between entities (how entities relate to each other, such as a
customer placing an order). ERDs use symbols to represent these components, making
it easier to understand the structure of a database before it's implemented. They are
crucial for planning and communicating database design
(c) Distributed Database: A distributed database system is one where the database is
not stored in a single location but is spread across multiple computers or sites, often
geographically dispersed. This allows for better scalability, fault tolerance (if one site
fails, others can still operate), and data locality (users access data closer to them).
However, managing a distributed database is more complex than a centralized one,
requiring careful consideration of data consistency, concurrency control (managing
simultaneous access), and network communication. Different approaches exist for
distributing data, such as replication (copying data to multiple sites) or partitioning
(dividing data among sites)