পরীক্ষা আর্কাইভ

৪৯তম বিসিএস ⎯ কম্পিউটার সায়েন্স (CSE) [৯৭১]

পরীক্ষা৪৯তম বিসিএস ⎯ কম্পিউটার সায়েন্স (CSE) [৯৭১]তারিখতারিখ অনির্ধারিতসময়30 minutes
মোট প্রশ্ন৪৭
সিলেবাস
Exam 9 DBMS concepts; ER and relational models; normalization (1NF–BCNF); indexing techniques; query optimization; Transaction control; concurrency control; SQL queries and implementation [Source: Class–7 and relevant books]
ঘনত্ব
উত্তর
উত্তরিতবর্তমানপুনরায় দেখুনঅসম্পূর্ণ

৪৯তম বিসিএস ⎯ কম্পিউটার সায়েন্স (CSE) [৯৭১]

৪৯তম বিসিএস ⎯ কম্পিউটার সায়েন্স (CSE) [৯৭১] · তারিখ অনির্ধারিত · ৪৭ প্রশ্ন

.
Which of the following best defines a DBMS?
  1. A collection of interrelated data and programs to access it
  2. A collection of spreadsheets
  3. A set of hardware components
  4. A compiler system
সঠিক উত্তর:
A collection of interrelated data and programs to access it
উত্তর
সঠিক উত্তর:
A collection of interrelated data and programs to access it
ব্যাখ্যা

 Correct Answer: A
    A DBMS is software that allows users to create, store, manage, and retrieve data efficiently.
    It combines data (database) with programs (software modules) such as query processor, storage manager, transaction manager.
   
Example: Oracle, MySQL, SQL Server.

.
Which of the following is an advantage of DBMS?
  1. Data redundancy increases
  2. Provides data abstraction
  3. Less secure data
  4. Inflexible data management
সঠিক উত্তর:
Provides data abstraction
উত্তর
সঠিক উত্তর:
Provides data abstraction
ব্যাখ্যা

Correct Answer: B

  Data abstraction = DBMS hides low-level storage details from the user.
    User sees only a logical view (tables, rows, attributes) instead of how data is physically stored.
    Example: You can query SELECT * FROM Student without worrying about how it’s stored on disk.

 Other options:
    A) DBMS reduces redundancy, unlike file-based systems.
    C) DBMS offers better security.
    D) It provides flexible querying using SQL.

.
Who is known as the Father of Relational Database?
  1. Dennis Ritchie
  2. Tim Berners-Lee
  3. Charles Babbage
  4. Edgar F. Codd
সঠিক উত্তর:
Edgar F. Codd
উত্তর
সঠিক উত্তর:
Edgar F. Codd
ব্যাখ্যা

Correct Answer: D

Edgar F. Codd
(IBM researcher) proposed the relational model in 1970.
His paper “A Relational Model of Data for Large Shared Databanks” introduced tables, keys, relational algebra.
This model became the foundation of SQL-based RDBMS.

Other options:
A) Ritchie = Invented C language, UNIX

B) Berners-Lee = Invented WWW.
C) Babbage = Father of Computer.

.
Which layer of DBMS provides physical data independence?
  1. External
  2. Conceptual
  3. Internal
  4. Network
সঠিক উত্তর:
Conceptual
উত্তর
সঠিক উত্তর:
Conceptual
ব্যাখ্যা

 Correct Answer: B
    In 3-schema architecture:
    External schema = user views.
    Conceptual schema = logical design of database.
    Internal schema = physical storage.
    Conceptual schema provides a buffer, so physical changes don’t affect applications.
 Other options:
    A) External = for end users.
    C) Internal = lowest level, physical.
    D) Network = unrelated.

.
Which of the following is a data model used in DBMS?
  1. Agile Model
  2. OSI Model
  3. Entity-Relationship Model
  4. Von Neumann Model
সঠিক উত্তর:
Entity-Relationship Model
উত্তর
সঠিক উত্তর:
Entity-Relationship Model
ব্যাখ্যা

Correct Answer: C
ER Model: Developed by Peter Chen (1976). Represents data as entities, attributes, and relationships.
Used in database design before converting to relational schema.
Example: A “Student” entity with attributes (Roll, Name, Dept) linked to a “Course” entity.

Other options:

A) Agile = software development methodology.
B) OSI = networking model 
D) Von Neumann = computer architecture.

.
In an ER diagram, attributes are represented as:
  1. Rectangles
  2. Ellipses
  3. Diamonds
  4. Lines
সঠিক উত্তর:
Ellipses
উত্তর
সঠিক উত্তর:
Ellipses
ব্যাখ্যা

 Correct Answer: B
   Ellipses (ovals) represent attributes.
   Example: Student (entity rectangle) → Name (attribute ellipse).
Other options:
    A) Rectangles = entities.
    C) Diamonds = relationships.
    D) Lines = connections.

.
Which of the following is true about ER to Relational mapping?
  1. Keys → Tuples
  2. Relationships → Attributes
  3. Attributes → Tables
  4. Entities → Tables
সঠিক উত্তর:
Entities → Tables
উত্তর
সঠিক উত্তর:
Entities → Tables
ব্যাখ্যা

 Correct Answer: D

In mapping:
Relationships → Relations (or foreign keys).
Attributes Columns.
Tuples Rows.
Entities Relations (tables).

.
Which of the following is not a type of integrity constraint?
  1. Domain Constraint
  2. Key Constraint
  3. Referential Integrity Constraint
  4. Procedural Constraint
সঠিক উত্তর:
Procedural Constraint
উত্তর
সঠিক উত্তর:
Procedural Constraint
ব্যাখ্যা

 Correct Answer: D
    Integrity constraints: Domain, Key, Referential, Assertions.
    Procedural constraint ≠ part of DBMS theory.

 Other options:
    A, B, C = valid integrity constraints.

.
Which of the following best explains weak entity in ER model?
  1. Entity that has its own primary key
  2. Entity that depends on another entity for identification
  3. Entity that cannot participate in relationships
  4. Entity that always has NULL attributes
সঠিক উত্তর:
Entity that depends on another entity for identification
উত্তর
সঠিক উত্তর:
Entity that depends on another entity for identification
ব্যাখ্যা

 Correct Answer: B
    Weak entity = depends on strong entity + partial key.
    Example: “Dependent” depends on “Employee”.
    Requires discriminator + owner’s primary key.

Other options:
• A = strong entity.
• C = false (weak entities do participate).
• D = unrelated.

১০.
In ER model, total participation means:
  1. Every entity must participate in at least one relationship
  2. Some entities may not participate
  3. Relationship has weak entities
  4. Participation depends on attributes
সঠিক উত্তর:
Every entity must participate in at least one relationship
উত্তর
সঠিক উত্তর:
Every entity must participate in at least one relationship
ব্যাখ্যা

 Correct Answer: A
    Total participation = double line in ER diagram.
    Example: “Employee” must work in at least one “Department”.

Other options:

B = partial participation.
C, D = not definitions of participation.

১১.
Which of the following is the main goal of normalization?
  1. To speed up query processing
  2. To minimize redundancy and avoid anomalies
  3. To improve physical storage space
  4. To increase the number of tables
সঠিক উত্তর:
To minimize redundancy and avoid anomalies
উত্তর
সঠিক উত্তর:
To minimize redundancy and avoid anomalies
ব্যাখ্যা

 Correct Answer: B
    Normalization ensures that a database schema is structured to reduce data redundancy and prevent update, insert, and delete anomalies.
    Example: If student info is repeated in multiple rows, updating address in one row but not in others → anomaly. Normalization solves this.

Other options:

    A) Speed is not the primary goal (sometimes normalized DBs are slower due to joins).
    C) Storage efficiency is a side effect, not the main purpose.
    D) Normalization may increase tables, but that’s a result, not the goal.

১২.
A relation is in First Normal Form (1NF) if:
  1. It has no partial dependencies
  2. It has no transitive dependencies
  3. It has no multi-valued or repeating attributes
  4. It is free from all anomalies
সঠিক উত্তর:
It has no multi-valued or repeating attributes
উত্তর
সঠিক উত্তর:
It has no multi-valued or repeating attributes
ব্যাখ্যা

Correct Answer: C

    1NF rule: all attributes must hold atomic values (no repeating groups, no arrays, no composite attributes).
    Example: PhoneNumbers column should not contain {123,456} but be stored in separate rows.

Other options:
   A) That’s 2NF condition.
   C) That’s 3NF condition.
   D) "All anomalies free" = too broad, achieved only in higher normalization

১৩.
A table where non-prime attributes depend partially on the primary key is in:
  1. 1NF
  2. 2NF
  3. 3NF
  4. BCNF
সঠিক উত্তর:
2NF
উত্তর
সঠিক উত্তর:
2NF
ব্যাখ্যা

Correct Answer: B
    2NF removes partial dependency: a non-key attribute should not depend on part of a composite key.
    Example: In table (StudentID, CourseID → Grade, StudentName), StudentName depends only on StudentID, not on the full key → violates 2NF.

Other options:


    A) 1NF only removes repeating groups.
    C) 3NF deals with transitive dependencies.
    D) BCNF is stricter form beyond 3NF

১৪.
Which of the following is true for BCNF but not always true for 3NF?
  1. Every determinant is a candidate key
  2. No repeating groups exist
  3. No partial dependency exists
  4. No transitive dependency exists
সঠিক উত্তর:
Every determinant is a candidate key
উত্তর
সঠিক উত্তর:
Every determinant is a candidate key
ব্যাখ্যা

 Correct Answer: A
    BCNF stricter than 3NF: In BCNF, every determinant (attribute on left side of FD) must be a candidate key.

Other options:

B) That’s 1NF.
C) That’s 2NF.
D) That’s 3NF

১৫.
Which of the following is not a functional dependency?
  1. RollNo → Name
  2. EmpID → Department
  3. BookID → BookID
  4. DeptID → DeptName
সঠিক উত্তর:
BookID → BookID
উত্তর
সঠিক উত্তর:
BookID → BookID
ব্যাখ্যা

Correct Answer: C
    BookIDBookID is a trivial dependency (attribute depends on itself). Though technically valid, it is not meaningful.
Other options:
    A, B, D = valid functional dependencies.

A functional dependency occurs when the value of one attribute (or a set of attributes) uniquely determines the value of another attribute. This relationship is denoted as:  X → Y

Here, X is the determinant, and Y is the dependent attribute. This means that for each unique value of X, there is precisely one corresponding value of Y.

Example: Consider a table named Students with the following attributes:
StudentID
StudentName
StudentAge
If each student has a unique StudentID, and this ID determines the student's name, we can express this functional dependency as:

StudentID → StudentName

১৬.
Which is a valid reason why BCNF is not always used in practice?
  1. It increases anomalies
  2. It may lead to excessive joins and performance issues
  3. It does not remove redundancy
  4. It is weaker than 3NF
সঠিক উত্তর:
It may lead to excessive joins and performance issues
উত্তর
সঠিক উত্তর:
It may lead to excessive joins and performance issues
ব্যাখ্যা

 Correct Answer: B
    Sometimes, decomposing to BCNF creates too many tables, making queries inefficient due to joins.
    Hence, many databases stay in 3NF for balance.

Other options:

    A) BCNF reduces anomalies, not increases.
    C) BCNF removes more redundancy than 3NF.
    D) BCNF is stricter, not weaker.

১৭.
The process of converting a high-level SQL query into an efficient execution plan is called:
  1. Query normalization
  2. Query optimization
  3. Query compilation
  4. Query translation
সঠিক উত্তর:
Query optimization
উত্তর
সঠিক উত্তর:
Query optimization
ব্যাখ্যা

 Correct Answer: B
Query optimization = DBMS finds the most efficient strategy (execution plan) to run a query (e.g., which index to use, which join order).

Other options
:
A) Normalization = schema design, not query execution.
C) Compilation = converting SQL into intermediate relational algebra.
D) Translation = SQL → relational algebra step, before optimization.

১৮.
Which of the following is NOT a phase of query processing?
  1. Parsing & translation
  2. Optimization
  3. Evaluation
  4. Normalization
সঠিক উত্তর:
Normalization
উত্তর
সঠিক উত্তর:
Normalization
ব্যাখ্যা

Correct Answer: D
   Normalization = schema design concept, not query processing.

Other options:

A) Parsing = SQL → relational algebra.
B) Optimization = find efficient plan.
C) Evaluation = execute the plan.

১৯.
Relational algebra operation used for filtering rows in a query is:
  1. Projection
  2. Selection
  3. Join
  4. Union
সঠিক উত্তর:
Selection
উত্তর
সঠিক উত্তর:
Selection
ব্যাখ্যা

 Correct Answer: B
  Selection (σ) = filters tuples based on a condition. Example: σ(Salary > 50000)(Employee).

Other options:
   A) Projection = choose attributes (columns).
   C) Join = combines relations.
   D) Union = combines tuples from relations.

২০.
Which of the following is not an ACID property of transactions?
  1. Atomicity
  2. Consistency
  3. Isolation
  4. Redundancy
সঠিক উত্তর:
Redundancy
উত্তর
সঠিক উত্তর:
Redundancy
ব্যাখ্যা

Correct Answer: D
    ACID = Atomicity, Consistency, Isolation, Durability.
   Redundancy is related to file storage, not transactions.

Other options:

A, B, C = correct ACID properties

২১.
The property of a transaction that ensures either all operations are performed or none are performed is:
  1. Consistency
  2. Atomicity
  3. Isolation
  4. Durability
সঠিক উত্তর:
Atomicity
উত্তর
সঠিক উত্তর:
Atomicity
ব্যাখ্যা

 Correct Answer: B
    Atomicity = transaction is “all or nothing”.
    Example: Money transfer → debit + credit must both happen, or none.

Other options:

    A) Consistency = ensures database moves from valid state to valid state.
    C) Isolation = ensures transactions don’t interfere.
    D) Durability = once committed, changes survive crashes

২২.
Deadlock can occur in a database when:
  1. Two transactions wait for each other’s locks
  2. Transactions run sequentially
  3. Only shared locks are used
  4. Only one transaction is active
সঠিক উত্তর:
Two transactions wait for each other’s locks
উত্তর
সঠিক উত্তর:
Two transactions wait for each other’s locks
ব্যাখ্যা

Correct Answer: A
   Deadlock = cycle of waiting (T1 waits for T2, T2 waits for T1).

Other options:

• B) Sequential → no concurrency → no deadlock.
• C) Shared locks do not block reads → no deadlock.
• D) One transaction → no conflict.

২৩.
Which deadlock handling technique involves assigning timestamps to transactions?
  1. Conservative 2PL
  2. Wait-Die and Wound-Wait
  3. Timeout method
  4. Deadlock detection with waits-for graph
সঠিক উত্তর:
Wait-Die and Wound-Wait
উত্তর
সঠিক উত্তর:
Wait-Die and Wound-Wait
ব্যাখ্যা

 Correct Answer: B
    Wait-Die (older waits) / Wound-Wait (older preempts younger) → use timestamps to prevent cycles.

Other options:

A) Conservative 2PL = locks everything upfront.
C) Timeout = abort after time, not timestamp.
D) Waits-for graph = detection, not prevention.

২৪.
The primary goal of concurrency control in DBMS is to:
  1. Prevent deadlocks
  2. Ensure atomicity of transactions
  3. Ensure consistency of database during simultaneous transactions
  4. Increase transaction speed
সঠিক উত্তর:
Ensure consistency of database during simultaneous transactions
উত্তর
সঠিক উত্তর:
Ensure consistency of database during simultaneous transactions
ব্যাখ্যা

 Correct Answer: C – Ensure consistency during concurrent transactions
    Multiple transactions may access and modify data simultaneously → concurrency control ensures database remains consistent.

Other options:

   A) Deadlock prevention is part of concurrency control, but not the primary goal. 
   B) Atomicity is ensured per transaction; concurrency control ensures interactions do not violate consistency.
   D) Speed may be affected; it’s not the main objective.

২৫.
Which property ensures that the effect of concurrent transactions is equivalent to some serial execution?
  1. Atomicity
  2. Consistency
  3. Serializability
  4. Durabilit
সঠিক উত্তর:
Serializability
উত্তর
সঠিক উত্তর:
Serializability
ব্যাখ্যা

Correct Answer: C – Serializability
Serializability = correctness criterion for concurrent execution → ensures database state is as if transactions ran one after another.

Other options:

    A, B, D = ACID properties, not specifically for concurrent execution.

২৬.
Which is an advantage of multiversion concurrency control (MVCC)?
  1. Only one transaction can read at a time
  2. Readers don’t block writers, and writers don’t block readers
  3. It requires no storage overhead
  4. It prevents all deadlocks
সঠিক উত্তর:
Readers don’t block writers, and writers don’t block readers
উত্তর
সঠিক উত্তর:
Readers don’t block writers, and writers don’t block readers
ব্যাখ্যা

Correct Answer: B
    MVCC = multiple versions of data. Readers access snapshot, writers update new version → avoids blocking.

Other options:

    A) False, many readers allowed.
    C) Requires extra storage.
    D) Deadlocks possible among writers.

২৭.
Which of the following SQL categories is used to define the structure of a database?
  1. DML
  2. DCL
  3. DDL
  4. TCL
সঠিক উত্তর:
DDL
উত্তর
সঠিক উত্তর:
DDL
ব্যাখ্যা

Correct Answer: C – DDL (Data Definition Language)

   Commands: CREATE, ALTER, DROP, TRUNCATE.
    Used for schema definition, table creation, etc.

Other options:
    A) DML = insert/update/delete data.
    B) DCL = manage permissions (GRANT, REVOKE).
    D) TCL = manage transactions (COMMIT, ROLLBACK).

২৮.
Which SQL command is used to retrieve data from a table?
  1. GET
  2. SELECT
  3. FETCH
  4. RETRIEVE
সঠিক উত্তর:
SELECT
উত্তর
সঠিক উত্তর:
SELECT
ব্যাখ্যা

 Correct Answer: B – SELECT

SELECT is standard command to query and display data from a table.

Other options:

A, C, D = incorrect SQL keywords; may be used in programming APIs but not standard SQL.

২৯.
Which SQL command is used to remove all rows from a table but keep its structure?
  1. DROP
  2. DELETE
  3. TRUNCATE
  4. REMOVE
সঠিক উত্তর:
TRUNCATE
উত্তর
সঠিক উত্তর:
TRUNCATE
ব্যাখ্যা

Correct Answer: C – TRUNCATE
    Removes all rows quickly, keeps structure, cannot be rolled back in most DBMS.

Other options:
    A) DROP = deletes table completely (structure + data).
    B) DELETE = row by row removal, can use WHERE, supports rollback.
    D) REMOVE = not a valid SQL command.

৩০.
Which of the following ensures uniqueness of values in a column?
  1. PRIMARY KEY
  2. FOREIGN KEY
  3. CHECK
  4. DEFAULT
সঠিক উত্তর:
PRIMARY KEY
উত্তর
সঠিক উত্তর:
PRIMARY KEY
ব্যাখ্যা

Correct Answer: A – PRIMARY KEY
   A primary key uniquely identifies each row, cannot be NULL.

Other options:

    B) FOREIGN KEY = ensures referential integrity.
    C) CHECK = validates condition (e.g., salary > 0).
    D) DEFAULT = assigns default values if none provided

৩১.
Which SQL clause is used to group rows that have the same values?
  1. ORDER BY
  2. DISTINCT
  3. GROUP BY
  4. HAVING
সঠিক উত্তর:
GROUP BY
উত্তর
সঠিক উত্তর:
GROUP BY
ব্যাখ্যা

 Correct Answer: C– GROUP BY
Used with aggregate functions (COUNT, SUM, AVG).

Other options:
    A) ORDER BY = sorts rows.
    C) DISTINCT = removes duplicates.
    D) HAVING = applies conditions on groups, not rows

৩২.
Which of the following is true about a FOREIGN KEY?
  1. It allows duplicate values
  2. It enforces referential integrity
  3. It can reference any column
  4. It ensures uniqueness
সঠিক উত্তর:
It enforces referential integrity
উত্তর
সঠিক উত্তর:
It enforces referential integrity
ব্যাখ্যা

Correct Answer: B – Referential Integrity
      Foreign Key = references primary key in another table. Ensures consistency.

Other options
:
    A) Duplicates allowed, but must match referenced PK.
    C) Must reference primary/unique key, not just any column.
    D) Uniqueness enforced by primary key, not foreign key.

৩৩.
In SQL, a trigger can be set to fire:
  1. Before or after INSERT/UPDATE/DELETE
  2. Only at system startup
  3. Only after COMMIT
  4. Only for SELECT queries
সঠিক উত্তর:
Before or after INSERT/UPDATE/DELETE
উত্তর
সঠিক উত্তর:
Before or after INSERT/UPDATE/DELETE
ব্যাখ্যা

Correct Answer: A
       Triggers fire on data modifications (INSERT/UPDATE/DELETE). Used for auditing, enforcing rules.

Other options:

     B) System startup triggers exist in some DBs, but not standard.
    C) Not limited to COMMIT.
    D) SELECT doesn’t fire triggers.

৩৪.
Which of the following is used to control access to the database?
  1. DCL
  2. DDL
  3. DML
  4. TCL
সঠিক উত্তর:
DCL
উত্তর
সঠিক উত্তর:
DCL
ব্যাখ্যা

 Correct Answer: A – DCL (Data Control Language)

Commands: GRANT, REVOKE → manage permissions.

Other options:

B) DDL → defines schema.

C) DML → manipulate data.

D) TCL → manages transactions (COMMIT, ROLLBACK).

৩৫.
Which is the first step in query processing?
  1. Query optimization
  2. Query execution
  3. Query parsing
  4. Query translation
সঠিক উত্তর:
Query parsing
উত্তর
সঠিক উত্তর:
Query parsing
ব্যাখ্যা

 Correct Answer: C – Query Parsing
            Parsing = checks syntax + semantics of SQL query. Produces parse tree.

Other options:

    A) Optimization comes later.
    B) Execution is the final step.
   D) Translation = after parsing, before optimization

৩৬.
The major goal of query optimization is to:
  1. Increase redundancy
  2. Minimize query execution cost
  3. Increase query length
  4. Ensure syntax correctness
সঠিক উত্তর:
Minimize query execution cost
উত্তর
সঠিক উত্তর:
Minimize query execution cost
ব্যাখ্যা

 Correct Answer: B
    Optimizer chooses lowest cost execution plan (CPU + I/O).

 Other options:

     A) Redundancy ↑ = bad.
    C) Length irrelevant.
•   D) Syntax correctness checked in parsing, not optimization.

৩৭.
In query processing, projection reduces:
  1. Number of tuples
  2. Number of joins
  3. Number of relations
  4. Number of attributes
সঠিক উত্তর:
Number of attributes
উত্তর
সঠিক উত্তর:
Number of attributes
ব্যাখ্যা

Correct Answer: D
Projection = choose specific columns (attributes).

Other options:
   A) Selection reduces tuples.
   C, D unrelated.

৩৮.
Which file organization stores records sorted on a key field?
  1. Heap
  2. Sequential
  3. Indexed
  4. Hashed
সঠিক উত্তর:
Sequential
উত্তর
সঠিক উত্তর:
Sequential
ব্যাখ্যা

Correct Answer: B – Sequential
Records physically stored in order → efficient for range queries.
 
Wrong options:
A) Heap = unordered.
C) Indexed = index helps, but data may be unordered.
D) Hashed = key determines storage location

৩৯.
Which is a primary advantage of indexed file organization?
  1. Faster retrieval
  2. Cheaper storage
  3. No maintenance needed
  4. Allows duplicates freely
সঠিক উত্তর:
Faster retrieval
উত্তর
সঠিক উত্তর:
Faster retrieval
ব্যাখ্যা

Correct Answer: A – Faster Retrieval
 Index points directly to record → reduces search time.

Wrong options:

B) Index adds storage overhead.
C) Indexes require updates on insert/delete.
D) Constraints control duplicates, not index type

৪০.
Which of the following is true about B+ tree index?
  1. Internal nodes store full records
  2. Only root stores keys
  3. All keys stored at leaves
  4. Cannot support range queries
সঠিক উত্তর:
All keys stored at leaves
উত্তর
সঠিক উত্তর:
All keys stored at leaves
ব্যাখ্যা

Correct Answer:C–
  In B+ Tree
    Internal nodes guide search; leaves store actual key pointers.
    Supports fast point and range queries.

Other options:
    B) Root guides search, not only storage.
    C) Internal nodes = keys only, not full records.
    D) B+ tree ideal for range queries.

৪১.
In hash-based indexing, records are stored according to:
  1.  Primary key
  2. Hash function of key
  3. Arrival time
  4. Sequence number
সঠিক উত্তর:
Hash function of key
উত্তর
সঠিক উত্তর:
Hash function of key
ব্যাখ্যা

Correct Answer: B – Hash Function
Hash(key) → address/block → fast direct access.

Other options:

A) Key used, but via hash.
C, D) Not used in hash index.

৪২.
In hash indexing, collision occurs when:
  1. Two records have same block
  2. Two keys map to same hash value
  3. Records inserted sequentially
  4. Index is dense
সঠিক উত্তর:
Two keys map to same hash value
উত্তর
সঠিক উত্তর:
Two keys map to same hash value
ব্যাখ্যা

 Correct Answer: B –
Hash Collision  Two keys → same hash → collision → resolved via chaining/overflow.


Other options:
    A) May result from collision, not definition.
    C) Sequential insertion unrelated.
    D) Dense/sparse = irrelevant.

৪৩.
Which of the following is dense indexing?
  1. One index entry per data record
  2. One index entry per block
  3. One index entry per table
  4. Only on primary key
সঠিক উত্তর:
One index entry per data record
উত্তর
সঠিক উত্তর:
One index entry per data record
ব্যাখ্যা

 Correct Answer: A
Dense Index:  Each record has an index entry → fast access.
 
Other options:

     B) Sparse index → one per block.
    C) Not practical.
    D) Index can be on any key.

৪৪.
In a relational database, a minimal superkey is known as:
  1. Foreign Key
  2. Candidate Key
  3. Primary Key
  4. Composite Key
সঠিক উত্তর:
Candidate Key
উত্তর
সঠিক উত্তর:
Candidate Key
ব্যাখ্যা

Correct Answer: B – Candidate Key

Superkey:
Any set of attribute(s) that can uniquely identify a row (tuple) in a relation.
Example: In a Student table (RollNo, Name, Email), {RollNo, Email} is a superkey.

Minimal Superkey:
If no proper subset of a superkey can uniquely identify tuples → it is minimal.
These minimal superkeys are called Candidate Keys.
Example: {RollNo}, {Email} are candidate keys.

Primary Key:
Among candidate keys, one is chosen as the primary key.
Example: {RollNo}.

Composite Key:
A key formed by combining multiple attributes (e.g., {CourseID, StudentID}).

Foreign Key:
Attribute(s) in one table that refers to the primary key of another table.

৪৫.
Consider relation R(A, B, C) with functional dependencies:
A → B
B → C
Which is a candidate key?
  1. A
  2. B
  3. C
  4. (A, B)
সঠিক উত্তর:
A
উত্তর
সঠিক উত্তর:
A
ব্যাখ্যা

Correct Answer: A 

A → B and B → C → so
A → B, C.

Hence A determines all attributes (A, B, C).

Therefore, A is the minimal super key → candidate key.

 Wrong options:

B) B → C, but B cannot determine A → not candidate key.

C) C does not determine A or B.

D) (A, B) is a superkey, but not minimal → not candidate key.

৪৬.
What is a data dictionary? 
  1. A tool to store user data
  2. A collection of all the data in a database
  3. A repository that stores metadata about the database
  4. A special database table
সঠিক উত্তর:
A repository that stores metadata about the database
উত্তর
সঠিক উত্তর:
A repository that stores metadata about the database
ব্যাখ্যা

Answer: c) A repository that stores metadata about the database

A data dictionary is not user data, but a structured repository that contains metadata (data about data) in a database.
 It stores:

Names of tables
Columns/fields of each table (name, data type, size, constraints)
Primary keys, foreign keys
Views, indexes, triggers, stored procedures
Access rights, security info.

৪৭.
Which of the following is a non-relational database? 
  1. Oracle
  2. MySQL
  3. MongoDB
  4. PostgreSQL
সঠিক উত্তর:
MongoDB
উত্তর
সঠিক উত্তর:
MongoDB
ব্যাখ্যা

Answer: c) MongoDB

Relational Database (RDBMS):

1. Stores data in tables (rows & columns).
2. Follows relational model proposed by E.F. Codd.
3. Uses SQL (Structured Query Language).
4. Examples: Oracle, MySQL, PostgreSQL, SQL Server.

Non-Relational Database (NoSQL):

1. Stores data in other formats (document, key-value, graph, wide-column).
2. Flexible schema (no need for strict table structure).
3. Often used for big data, real-time apps, unstructured/semi-structured data.

Examples: MongoDB, Cassandra, CouchDB, Neo4j.

MongoDB specifically:

It is a document-oriented NoSQL database.
Stores data in JSON-like documents (BSON internally).