Skip to main content

Chapter 2

Database Management System

TU BIT past exam questions

Past questions and answers

60 questions set from this chapter; 1 is most repeated (set, or a close variant set, in 3 or more exams). Most repeated first.

  • Most repeated · 3 of 5 exams
  • 2083 · 1+4 marks

What is database recovery? Explain shadow paging with a diagram.

Similar questions: What is shadow paging? How it (2080) · Define database recovery and explain how (2082)

Answer

Database recovery: restoring the database to a correct, consistent state after a failure, so committed transactions persist and uncommitted ones leave no effect.

Shadow paging: recovery without a log, using a page table.

 Current page table      Disk pages            Shadow page table
 1 --------------------> page 1 (old)  <-----------------  1
 2 --------------------> page 2' (new) ;  page 2 (old) <--  2
 3 --------------------> page 3 (old)  <-----------------  3
  1. At transaction start, the current page table is copied into the shadow page table, saved on disk and never altered.
  2. On an update to page 2, a new copy 2' is written in a free block; only the current table points to it.
  3. Commit: the current table becomes the new shadow table via an atomic pointer switch; old pages are freed.
  4. Failure: discard the current table and new pages; the shadow table gives the original consistent database. No undo/redo needed.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 5 marks

What is shadow paging? How it is used for database recovery?

Similar questions: What is database recovery? Explain shadow (2083)

Answer

Shadow paging is a recovery technique that does not use a log. The database is divided into fixed-size pages, and a page table (directory) with nn entries points to them.

Working

  1. At the start of a transaction the current page table is copied to a shadow page table, which is saved on disk and never changed during the transaction. Both initially point to the same pages.
  2. When a page is first written, a new copy of the page is created on a free block, the current table points to the new copy and the update is done there. The shadow table still points to the old page.
  3. Commit: the current page table is written to disk and becomes the new shadow table (by switching a pointer to it atomically). Old pages are freed.

Recovery: after a crash or failure before commit, the current table is discarded and the shadow table is used, so the database returns to its state before the transaction. No undo/redo is needed.

Advantages: no log overhead, fast recovery. Disadvantages: data fragmentation, garbage collection, copying of page table, hard in concurrent transactions.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 5 marks

What is data independence? How three schema architecture ensures logical and physical data independence?

Similar questions: Explain the three-schema architecture with a (2083)

Answer

Data independence is the ability to change the schema at one level of the database without having to change the schema at the next higher level.

  • Logical data independence - the conceptual schema can change (add/remove an attribute or entity) without changing external schemas or application programs.
  • Physical data independence - the internal schema can change (new file organisation, indexes, storage device) without changing the conceptual schema or external views.

How the three-schema architecture ensures it

The architecture has external, conceptual and internal levels, joined by two mappings.

  • Conceptual/internal mapping: when storage structure changes, only this mapping is modified, so the conceptual schema (and everything above it) is unaffected: physical independence.
  • External/conceptual mapping: when the conceptual schema changes, the mapping is adjusted so that views stay the same: logical independence.

Logical independence is harder to achieve because applications depend on the logical structure.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082 · 5 marks

Define database recovery and explain how shadow paging supports it.

Similar questions: What is database recovery? Explain shadow (2083)

Answer

Database recovery is the process of restoring the database to the most recent consistent state that existed before a failure (transaction, system or media failure), ensuring atomicity and durability of transactions.

Shadow paging

The database is made of fixed-size pages, located through a page table.

  1. When a transaction starts, the current page table is copied as the shadow page table and stored on disk; it is never modified during the transaction.
  2. On a write, the page is not overwritten: a new copy is made in a free block and the current page table points to it. The shadow table keeps pointing to the original page.
  3. On commit, the current table is written to disk and becomes the new shadow table (an atomic pointer switch).
  4. On failure/abort, the current table and the new pages are discarded and the shadow table is used, restoring the pre-transaction state.

It requires no log and no undo/redo, and gives fast recovery, but suffers from page fragmentation, garbage collection and difficulty with concurrent transactions.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2083 · 3+2 marks

Explain the three-schema architecture with a diagram. Differentiate logical and physical data independence with one example each.

Similar questions: What is data independence? How three (2080)

Answer

Three-schema architecture

   External level :  View A   View B   View C
                        \       |       /
                   external/conceptual mapping
   Conceptual level:     Conceptual schema
                   conceptual/internal mapping
   Internal level :      Internal schema
                              |
                       Physical database
  • External - user views of parts of the database.
  • Conceptual - the logical structure of the entire database for the community.
  • Internal - physical storage structure.

Logical vs physical data independence

Logical data independencePhysical data independence
Ability to change the conceptual schema without changing external schemas/programsAbility to change the internal schema without changing the conceptual schema
Harder to achieveEasier to achieve
Example: adding a new attribute Email to STUDENT does not affect a view that shows only Name and RollExample: adding an index on Roll or moving the file to another disk does not change the tables or queries

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 5 marks

What is an E-R Diagram? Explain various symbols used in the E-R Diagram.

Answer

An E-R (Entity-Relationship) diagram is a graphical model of the data of an organisation. It shows the entities, their attributes and the relationships among them. It is used to design a database at the conceptual level, before it is mapped to relational tables.

Symbols used

SymbolMeaning
RectangleEntity set (strong entity), for example STUDENT
Double rectangleWeak entity, which has no key of its own
EllipseAttribute
Underlined ellipseKey attribute
Double ellipseMultivalued attribute
Dashed ellipseDerived attribute, for example Age derived from DOB
Ellipses joined to an ellipseComposite attribute, for example Name made of First and Last
DiamondRelationship set
Double diamondIdentifying relationship of a weak entity
LineLinks entities to relationships and attributes to entities
1, N, M on linesCardinality (1:1, 1:N, M:N)
Double lineTotal participation

Example: STUDENT (rectangle) is linked through the diamond ENROLLS to COURSE (rectangle) with cardinality M:N, and Roll_no (underlined ellipse) is the key of STUDENT.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 5 marks

What is Transaction? State and explain the properties of Transaction.

Answer

Transaction: a logical unit of database work made of one or more read and write operations that takes the database from one consistent state to another. Either all its operations are done or none is. Example: transferring Rs 1,000 from account A to B (read A, A = A - 1000, write A, read B, B = B + 1000, write B).

ACID properties

  1. Atomicity: the transaction is "all or nothing". If it fails midway, all its changes are undone (rolled back). Handled by the recovery manager.
  2. Consistency: a transaction takes the database from one valid state to another, preserving all integrity constraints. In the transfer example, the total A + B stays the same.
  3. Isolation: concurrent transactions do not interfere. Each behaves as if it were running alone, and intermediate results are hidden from others. Handled by concurrency control.
  4. Durability: once a transaction commits, its changes are permanent and survive system failures. Handled by logs and recovery.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 10 marks

Using the EMPLOYEE, DEPARTMENT, PROJECT, DEPENDENT, and DEPT_LOCATIONS relations, answer: (a) SQL: retrieve all attributes of employees in the 'Computer' department (no. 5). (b) SQL: for each department, get its number, employee count, and average salary. (c) SQL: for each project with more than two employees, get its number, name, and employee count. (d) Relational Algebra: select EMPLOYEE tuples in department 10 or with salary above Rs 50,000. (e) Relational Algebra: get names of employees with no dependents.

Answer

Assume the usual company schema:

EMPLOYEE(Fname, Lname, Ssn, Salary, Dno), DEPARTMENT(Dnumber, Dname), PROJECT(Pnumber, Pname, Dnum), WORKS_ON(Essn, Pno, Hours), DEPENDENT(Essn, Dependent_name, ...), DEPT_LOCATIONS(Dnumber, Dlocation).

(a) All attributes of employees in the 'Computer' department (number 5):

SELECT *
FROM EMPLOYEE
WHERE Dno = 5;

(b) For each department, the number, number of employees and average salary:

SELECT Dno, COUNT(*) AS Num_Employees, AVG(Salary) AS Avg_Salary
FROM EMPLOYEE
GROUP BY Dno;

(c) Projects with more than two employees, giving the number, name and employee count:

SELECT P.Pnumber, P.Pname, COUNT(*) AS Num_Employees
FROM PROJECT P, WORKS_ON W
WHERE P.Pnumber = W.Pno
GROUP BY P.Pnumber, P.Pname
HAVING COUNT(*) > 2;

(d) Relational algebra, employees in department 10 or with salary above Rs 50,000:

σDno=10 ∨ Salary>50000(EMPLOYEE)\sigma_{Dno=10 \ \lor\ Salary>50000}(EMPLOYEE)

(e) Relational algebra, names of employees with no dependents:

πFname,Lname(EMPLOYEE⋈Ssn=Essn′(ρR(Essn′)(πSsn(EMPLOYEE))−ρR(Essn′)(πEssn(DEPENDENT))))\pi_{Fname,Lname}\Big(EMPLOYEE \bowtie_{Ssn=Essn'} \big(\rho_{R(Essn')}(\pi_{Ssn}(EMPLOYEE)) - \rho_{R(Essn')}(\pi_{Essn}(DEPENDENT))\big)\Big)

In simpler steps:

NO_DEP←πSsn(EMPLOYEE)−πEssn(DEPENDENT)NO\_DEP \leftarrow \pi_{Ssn}(EMPLOYEE) - \pi_{Essn}(DEPENDENT)

RESULT←πFname,Lname(NO_DEP⋈Ssn=SsnEMPLOYEE)RESULT \leftarrow \pi_{Fname,Lname}(NO\_DEP \bowtie_{Ssn=Ssn} EMPLOYEE)

Here the set difference gives the Ssn values that appear in EMPLOYEE but never in DEPENDENT, and the join then recovers their names.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 5 marks

What are different types of Database Users? Explain in Brief.

Answer

Database users are classified by how they interact with the database.

  1. Database Administrator (DBA): controls the whole database system. The DBA defines the schema, grants access and authorisation, monitors performance, and manages backup and recovery.
  2. Database designers: identify the data to be stored and choose structures to represent it. They design the conceptual and logical schema, working with the end users.
  3. Application programmers (software developers): write programs in a host language (Java, C, PHP) with embedded SQL to give users access to the data.
  4. Naive (parametric) end users: use the database through ready-made applications and forms without knowing its details, for example bank tellers and ticket booking clerks.
  5. Sophisticated users: engineers, analysts and scientists who write their own queries in SQL or use tools to explore the data.
  6. Casual (specialised) users: occasional users such as middle or senior managers who query the database now and then.
  7. System analysts: work out the requirements of naive users and specify transactions that meet them.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 5 marks

What is Primary key and Foreign Key? Why is this required in the DBMS?

Answer

Primary key: an attribute, or minimal set of attributes, chosen from the candidate keys that uniquely identifies each tuple (row) of a relation. It cannot be NULL or duplicated. Example: Roll_no in STUDENT.

Foreign key: an attribute, or set of attributes, in one relation that refers to the primary key of the same or another relation. Its values must either match an existing primary key value in the referenced relation or be NULL. Example: Dno in EMPLOYEE refers to Dnumber in DEPARTMENT.

CREATE TABLE EMPLOYEE (
  Ssn CHAR(9) PRIMARY KEY,
  Name VARCHAR(40),
  Dno INT,
  FOREIGN KEY (Dno) REFERENCES DEPARTMENT(Dnumber)
);

Why they are required

  • The primary key identifies every record uniquely, so records can be searched, updated and deleted exactly. It enforces entity integrity.
  • The foreign key links relations, so related data can be combined through joins.
  • The foreign key enforces referential integrity. It prevents a record from referring to a non-existent record, such as an employee in a department that does not exist.
  • Together they reduce redundancy and keep the data consistent.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 5 marks

What is Integrity constraint? What are the three main categories of Integrity constraints.

Answer

Integrity constraints are rules that the data in a database must satisfy at all times, so that the data stay accurate, valid and consistent. The DBMS checks them whenever data are inserted, updated or deleted, and rejects operations that violate them.

Three main categories

  1. Inherent (model-based) constraints: rules that are part of the data model itself. For example, a relation cannot have duplicate tuples, and tuples have no ordering.
  2. Schema-based (explicit) constraints: rules declared in the schema using DDL. They include:
    • Domain constraints: values must be of the stated type and range.
    • Key constraints: the key attribute values must be unique.
    • Entity integrity: a primary key cannot be NULL.
    • Referential integrity: a foreign key must match an existing primary key or be NULL.
    • NOT NULL, UNIQUE and CHECK constraints.
  3. Application-based (semantic) constraints: business rules that cannot be expressed in the schema and are enforced by the application programs or by triggers and assertions. For example, "an employee's salary cannot exceed that of his or her supervisor".

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 5 marks

What is Functional Dependency? Explain 3NF with Examples.

Answer

Functional dependency (FD): for a relation RR, an attribute set YY is functionally dependent on XX, written X→YX \to Y, if each value of XX is associated with exactly one value of YY. That is, if two tuples agree on XX they must agree on YY. Example: Roll_no→NameRoll\_no \to Name.

Third Normal Form (3NF)

A relation is in 3NF if it is in 2NF and no non-prime attribute is transitively dependent on the primary key. Equivalently, for every non-trivial FD X→AX \to A, either XX is a superkey or AA is a prime attribute.

Transitive dependency: A→BA \to B and B→CB \to C (with BB not a key) give A→CA \to C.

Example

STUDENT(Roll_no, Name, Dept_id, Dept_name) with Roll_no→Dept_idRoll\_no \to Dept\_id and Dept_id→Dept_nameDept\_id \to Dept\_name.

Here Dept_nameDept\_name depends transitively on Roll_noRoll\_no through Dept_idDept\_id, so the relation is not in 3NF. It causes redundancy, since the department name is repeated for every student, and update anomalies.

Decompose it into:

  • STUDENT(Roll_no, Name, Dept_id)
  • DEPARTMENT(Dept_id, Dept_name)

Now every non-key attribute depends only on the key, so both relations are in 3NF.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 5 marks

What is Schedule? Explain Serializability and Conflict Schedule.

Answer

Schedule: a schedule (or history) is the chronological order in which the operations of a set of concurrent transactions are executed. The order of operations inside each transaction is preserved. A schedule is serial if the transactions run one after another without interleaving, and non-serial if their operations are interleaved.

Serializability

A non-serial schedule is serializable if it produces the same result as some serial schedule of the same transactions. Serializability is the accepted criterion of correctness for concurrent execution. A serializable schedule gives the benefits of concurrency without losing consistency. The two main types are conflict serializability and view serializability.

Conflict schedule (conflict serializability)

Two operations conflict if they belong to different transactions, access the same data item, and at least one is a write. So read-write, write-read and write-write pairs conflict.

Two schedules are conflict equivalent if every pair of conflicting operations appears in the same order in both. A schedule is conflict serializable if it is conflict equivalent to a serial schedule.

Testing uses a precedence graph, with one node per transaction and an edge Ti→TjT_i \to T_j if an operation of TiT_i conflicts with and comes before an operation of TjT_j. The schedule is conflict serializable if and only if the graph has no cycle.

Example: r1(X),w1(X),r2(X),w2(X)r_1(X), w_1(X), r_2(X), w_2(X) has only the edge T1→T2T_1 \to T_2, so it is conflict serializable and equals the serial order T1,T2T_1, T_2.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 5 marks

What is starvation in DBMS? Explain with example.

Answer

Starvation (or livelock) in a DBMS is a situation in which a transaction waits for an indefinitely long time, or is repeatedly rolled back or denied resources, while other transactions continue to proceed. Unlike a deadlock, the system as a whole keeps working, but one transaction never gets to finish.

Causes

  • An unfair lock waiting scheme, or priority-based scheduling in which low-priority transactions are always bypassed.
  • A transaction that keeps getting selected as the victim in deadlock resolution.
  • Shared locks: a stream of readers holding shared locks can stop a writer from ever getting an exclusive lock.

Example

T1T_1 holds a shared lock on item XX. T2T_2 requests an exclusive lock on XX and must wait. Before T1T_1 releases, T3T_3 requests and gets a shared lock on XX, then T4T_4, and so on. Since new shared locks keep being granted, T2T_2 waits forever.

Solutions

  • Use a first-come first-served queue for lock requests.
  • Increase the priority of a transaction the longer it waits (ageing).
  • Do not repeatedly pick the same transaction as the deadlock victim.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 5 marks

During ER-to-Relational Mapping, explain with example to map 1:N and N:M relationship into a relation?

Answer

Mapping a 1:N relationship

Use the foreign key approach. Take the primary key of the "one" side and add it as a foreign key in the relation of the "many" side. Any attribute of the relationship also goes to the N side.

Example: DEPARTMENT (1) —WORKS_FOR— (N) EMPLOYEE.

  • DEPARTMENT(<u>Dnumber</u>, Dname)
  • EMPLOYEE(<u>Ssn</u>, Name, Salary, Dno), where Dno is a foreign key referencing DEPARTMENT(Dnumber)

Mapping an N:M relationship

Create a new relation (a relationship or junction relation). Its attributes are the primary keys of both participating entities, which become foreign keys, plus any attributes of the relationship. The primary key is the combination of the two foreign keys.

Example: EMPLOYEE (N) —WORKS_ON— (M) PROJECT, with the attribute Hours.

  • EMPLOYEE(<u>Ssn</u>, Name)
  • PROJECT(<u>Pnumber</u>, Pname)
  • WORKS_ON(<u>Essn</u>, <u>Pno</u>, Hours), where Essn references EMPLOYEE(Ssn) and Pno references PROJECT(Pnumber)

A separate relation is needed for N:M because a single foreign key column cannot hold multiple values on either side.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 5 marks

What is NoSQL? What are the types of NoSQL? Explain.

Answer

NoSQL ("Not Only SQL") refers to non-relational database systems that store and retrieve data in forms other than the fixed tables of relational databases. They use flexible or no schema, scale horizontally across many servers, and handle very large volumes of structured, semi-structured and unstructured data with high availability. They are used in big data and real-time web applications, and commonly follow the BASE model.

Types of NoSQL databases

  1. Key-value stores: data are kept as unique key and value pairs, like a hash table. Very fast for simple lookups. Examples: Redis, DynamoDB.
  2. Document stores: data are kept as documents, typically JSON or BSON, which can have different structures. Example: MongoDB, CouchDB.
  3. Column-family (wide-column) stores: data are stored in columns grouped into families instead of rows, which suits large analytical workloads. Examples: Cassandra, HBase.
  4. Graph databases: data are stored as nodes and edges with properties, suited to highly connected data such as social networks and recommendations. Examples: Neo4j, ArangoDB.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 5 marks

Explain Data Models, Schemas, and Instances.

Answer

Data model: a collection of concepts used to describe the structure of a database, including data types, relationships and constraints. It gives the means to achieve data abstraction. Categories are:

  • High-level (conceptual) models, such as the E-R model, which are close to how users see data.
  • Representational (logical) models, such as the relational, hierarchical and network models, which are used by many commercial DBMSs.
  • Low-level (physical) models, which describe how data are stored in files, with record formats and access paths.

Schema: the overall description of the database, specified at design time. It rarely changes. Also called the intension. Under the three-schema architecture there are the internal schema (physical storage), conceptual schema (the whole database for all users) and external schemas (user views). Example: STUDENT(Roll_no, Name, Dept).

Instance (database state): the actual data stored in the database at a particular moment. It changes with every insert, update or delete. Also called the extension. Example: the set of rows currently in STUDENT.

The schema is like the type declaration of a variable, and the instance is like its current value.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 10 marks

Define a transaction, draw its state diagram, and discuss the typical states it passes through.

Answer

Transaction: a logical unit of work made of one or more database operations (read, write) that must be executed completely or not at all. It is delimited by the statements BEGIN_TRANSACTION and END_TRANSACTION, and must preserve the ACID properties.

State diagram

                   +----------------------- READ/WRITE ----+
                   v                                       |
BEGIN --> [ ACTIVE ] --END_TRANSACTION--> [ PARTIALLY COMMITTED ] --COMMIT--> [ COMMITTED ] --> [ TERMINATED ]
              |                                   |
            ABORT                               ABORT
              v                                   v
           [ FAILED ] ------- rollback --------> (back out)
              |
              v
         [ TERMINATED ]

States

  1. Active: the initial state. The transaction stays here while it executes its read and write operations.
  2. Partially committed: entered after the last operation has been executed. The changes may still only be in main memory, so a failure could still prevent a safe commit. The system checks whether the changes can be made permanent and writes the log to disk.
  3. Committed: entered after successful completion. All changes have been recorded permanently in the database, and the transaction cannot be undone.
  4. Failed: entered when normal execution cannot go on, either because of an abort in the active state or because a check in the partially committed state failed.
  5. Terminated (aborted): the transaction has left the system. Changes made by a failed transaction are rolled back, and the transaction may then be restarted or killed.

A transaction ends either in the committed state or, after rollback, in the aborted state.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 10 marks

Define functional dependency and explain the four informal quality measures for relational schema design.

Answer

Functional dependency (FD): a constraint between two attribute sets XX and YY of a relation RR, written X→YX \to Y. It means that the value of XX uniquely determines the value of YY, so any two tuples with the same XX value must have the same YY value. Example: Ssn→EnameSsn \to Ename. FDs are used to find keys and to normalise relations.

Four informal quality measures (guidelines) for relational schema design

  1. Semantics of the attributes: each relation should represent one entity type or relationship type, so that its meaning is clear. Attributes of several entities should not be mixed in one relation. For example, EMPLOYEE and DEPARTMENT data should be in separate relations, with a foreign key linking them.

  2. Reducing redundant information in tuples (and update anomalies): storing the same data many times wastes space and causes anomalies.

    • Insertion anomaly: a new department cannot be recorded without an employee.
    • Deletion anomaly: deleting the last employee of a department removes the department's information.
    • Modification anomaly: a change to a department name must be made in many tuples.

    Base relations should be designed so that no such anomalies occur.

  3. Reducing NULL values in tuples: attributes that are often NULL should not be placed in the base relation. NULLs waste space, make joins and aggregate functions ambiguous, and their meaning is unclear (unknown, not applicable, or not recorded). Put such attributes in a separate relation.

  4. Disallowing spurious tuples: relations should be designed so that joining them gives back exactly the original information and no false tuples. Decompositions must have the lossless join (non-additive join) property. Relations should be joined only on attributes that are primary key or foreign key pairs.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 10 marks

Explain the symbols used in the E-R model.

Answer

The Entity-Relationship (E-R) model describes data using entities, attributes and relationships. Its diagram uses the following symbols.

SymbolNameMeaning
RectangleEntityA real-world object or concept, for example EMPLOYEE, with entity type shown as the label
Double rectangleWeak entityAn entity with no key of its own, depending on an owner entity, for example DEPENDENT
Ellipse (oval)AttributeA property of an entity or relationship, for example Name
Ellipse with underlined nameKey attributeUniquely identifies each entity, for example Ssn
Double ellipseMultivalued attributeMay hold several values, for example Phone numbers
Dashed ellipseDerived attributeComputed from other attributes, for example Age from Birth_date
Ellipse connected to sub-ellipsesComposite attributeDivided into parts, for example Address (Street, City)
DiamondRelationshipAssociation between entities, for example WORKS_FOR
Double diamondIdentifying relationshipLinks a weak entity with its owner entity
LineLinkConnects attributes to entities, and entities to relationships
Single line / double lineParticipationPartial participation, and total participation (every entity must take part)
1, N, M labelsCardinality ratioOne-to-one (1:1), one-to-many (1:N), many-to-many (M:N)
(min,max) pairStructural constraintMinimum and maximum number of relationship instances per entity
Triangle (ISA)Specialisation / generalisationSubclass and superclass hierarchy

Example: EMPLOYEE (rectangle, with key Ssn) —WORKS_FOR (diamond)— DEPARTMENT (rectangle), with cardinality N:1 and total participation of EMPLOYEE.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 5 marks

Define NoSQL and explain its characteristics related to data models and query languages.

Answer

NoSQL ("Not Only SQL") systems are non-relational databases designed for large-scale, distributed data storage with flexible schemas, high availability and horizontal scalability. They give up some strict consistency (they follow BASE: Basically Available, Soft state, Eventually consistent) in return for performance and scale.

Characteristics related to data models

  • Schema-less or flexible schema: records in the same collection may have different fields, so the structure can change without migration.
  • Data are not necessarily stored in tables. Models include key-value, document, column-family and graph.
  • Data are often denormalised and aggregated (a whole object stored together), so joins are rarely needed.
  • Built for horizontal scaling through sharding and replication across commodity servers.

Characteristics related to query languages

  • There is no single standard like SQL. Each system has its own API or query language, for example MongoDB's JSON-style queries and Cassandra's CQL.
  • Queries are usually simple, based on a key or a document, with limited or no join and complex multi-table query support.
  • Operations are often exposed through simple programming APIs such as get, put and delete, or through REST.
  • Some systems provide SQL-like languages (CQL), or map-reduce for batch processing.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 5 marks

Explain the purpose of the system log and its typical entry types.

Answer

System log (transaction log / journal): a sequential, append-only file kept on stable storage in which the DBMS records all operations that change the database. Entries are written before the changes reach the database itself (write-ahead logging).

Purpose

  • To recover from failures. After a crash, the log is used to undo the effects of uncommitted transactions and to redo committed transactions whose changes did not reach disk.
  • To support transaction rollback, so that atomicity is maintained when a transaction aborts.
  • To help ensure durability of committed transactions.

Typical entry types (T is a transaction id)

  1. [start_transaction, T]: transaction T has started.
  2. [write_item, T, X, old_value, new_value]: T changed item X from the old value to the new value. The old value is used for undo and the new value for redo.
  3. [read_item, T, X]: T has read item X (needed only in some protocols).
  4. [commit, T]: T finished successfully and its changes can be made permanent.
  5. [abort, T]: T was aborted and its changes must be undone.
  6. [checkpoint]: marks a point at which the buffers were flushed to disk. Recovery then needs to examine only the log after it.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 5 marks

Define normalization and explain 2NF with an example.

Answer

Normalization is the process of organising the attributes and relations of a database by applying a series of normal forms (1NF, 2NF, 3NF, BCNF), in order to reduce data redundancy and avoid insertion, deletion and update anomalies. It works by decomposing a relation into smaller relations using functional dependencies, without losing information.

Second Normal Form (2NF)

A relation is in 2NF if it is in 1NF and no non-prime attribute is partially dependent on any candidate key. That is, every non-key attribute depends on the whole of the key, not just a part of it. A relation with a single-attribute key is automatically in 2NF if it is in 1NF.

Example

ENROLL(Student_id, Course_id, Student_name, Grade), with key (Student_id, Course_id).

FDs: (Student_id,Course_id)→Grade(Student\_id, Course\_id) \to Grade and Student_id→Student_nameStudent\_id \to Student\_name.

Student_name depends on only part of the key, so there is a partial dependency and the relation is not in 2NF. The student's name is repeated for each course taken.

Decompose into:

  • STUDENT(<u>Student_id</u>, Student_name)
  • ENROLL(<u>Student_id</u>, <u>Course_id</u>, Grade)

Now every non-key attribute depends on the full key, so both relations are in 2NF.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 5 marks

Explain concurrent execution of transactions in a multiuser system and why concurrency control is needed.

Answer

Concurrent execution in a multiuser system

In a multiuser DBMS many users submit transactions at the same time. Instead of running them one after another (serially), the system interleaves their operations, for example while one transaction waits for disk I/O the CPU runs another. The interleaved order of operations is a schedule. This improves CPU and disk utilisation, throughput (transactions per second) and response time, especially for short transactions.

Why concurrency control is needed

If interleaving is uncontrolled, the database can be left in an inconsistent state. Problems include:

  1. Lost update: two transactions read the same item and both update it, so one update overwrites the other. For example T1T_1 and T2T_2 both read balance 1000. T1T_1 adds 100 and T2T_2 subtracts 50, and the later write wins, so one change is lost.
  2. Dirty read (temporary update): a transaction reads a value written by another transaction that later aborts, so it has used data that never existed.
  3. Incorrect summary: an aggregate function reads some items before and some after another transaction updates them, giving a wrong total.
  4. Unrepeatable read: a transaction reads the same item twice and gets different values because another transaction changed it in between.

Concurrency control protocols, such as locking, timestamp ordering and multiversion methods, make the schedules serializable, so that isolation and consistency are kept while concurrency is still allowed.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 5 marks

Using relational algebra, retrieve the name, department number, and department name of "John Smith" from the EMPLOYEE, PROJECT, WORKS_ON, and DEPARTMENT relations.

Answer

Assume the schema:

EMPLOYEE(Fname, Lname, Ssn, Dno), DEPARTMENT(Dnumber, Dname), PROJECT(Pnumber, Pname, Dnum), WORKS_ON(Essn, Pno, Hours).

The name and department number come from EMPLOYEE, and the department name comes from DEPARTMENT through Dno = Dnumber. Only these two relations are needed to answer the query. PROJECT and WORKS_ON are needed only if project details are requested.

Step 1, select John Smith:

JS←σFname=′John′ ∧ Lname=′Smith′(EMPLOYEE)JS \leftarrow \sigma_{Fname='John' \ \land\ Lname='Smith'}(EMPLOYEE)

Step 2, join with DEPARTMENT:

JSD←JS⋈Dno=DnumberDEPARTMENTJSD \leftarrow JS \bowtie_{Dno=Dnumber} DEPARTMENT

Step 3, project the required attributes:

RESULT←πFname, Lname, Dno, Dname(JSD)RESULT \leftarrow \pi_{Fname,\,Lname,\,Dno,\,Dname}(JSD)

As one expression:

πFname,Lname,Dno,Dname(σFname=′John′∧Lname=′Smith′(EMPLOYEE)⋈Dno=DnumberDEPARTMENT)\pi_{Fname,Lname,Dno,Dname}\Big(\sigma_{Fname='John' \land Lname='Smith'}(EMPLOYEE)\bowtie_{Dno=Dnumber}DEPARTMENT\Big)

Note that selection is applied before the join, so that the join works on a much smaller relation.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 5 marks

Discuss the types of failures and define catastrophic failure.

Answer

A failure is any event that stops a transaction or the DBMS from completing normally, leaving the database possibly inconsistent. Recovery restores a consistent state.

Types of failures

  1. Transaction failure - a single transaction aborts because of a logical error (division by zero, bad input, integrity violation) or a system error (deadlock victim).
  2. System crash - a hardware, software or power failure (OS bug, power cut) loses the contents of volatile memory (buffers) but disk data remains intact.
  3. Disk failure - a head crash, bad sector or controller fault destroys part of the disk data.
  4. Physical problems and catastrophes - fire, flood, theft, earthquake, sabotage, or operator mistakes.
  5. Concurrency-control enforcement - a transaction is aborted/rolled back to preserve serializability.

Catastrophic failure

A catastrophic failure is one in which the stable storage itself (disk) is damaged or destroyed, e.g. a disk crash, fire or flood, so the database cannot be recovered by the log alone. Recovery needs a backup (archive) copy of the database: the last full backup is restored and the log/redo of committed transactions since the backup is applied. Hence regular backups, off-site copies and mirrored (RAID) disks are used to protect against it.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 5 marks

Define the relational data model and explain how a relation differs from a flat file.

Answer

Relational data model

The relational model (E. F. Codd, 1970) represents the database as a collection of relations. Each relation is a table of rows (tuples) and columns (attributes). Every attribute has a domain (set of allowed atomic values), a relation has a schema R(A1,A2,…,An)R(A_1, A_2, \dots, A_n) and a set of tuples. Integrity is maintained through keys, entity integrity and referential integrity, and data is manipulated by relational algebra/SQL.

Relation versus flat file

RelationFlat file
Tuples form a mathematical set: no duplicates, no orderRecords may be duplicated and are ordered physically
Attribute values are atomic and drawn from a domainFields can be repeating or unstructured
Keys (primary/foreign) identify tuples and link relationsNo built-in keys or relationships
Integrity constraints enforced by DBMSValidation in application programs
Access by declarative language (SQL), independent of storageAccess by program logic that depends on file format
Several related relations avoid redundancy (normalization)Redundancy and inconsistency are common

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 5 marks

Define a database and explain the characteristics of the database approach.

Answer

Database: an organised collection of logically related data, stored so that it can be easily accessed, managed and updated, e.g. a college's student records. A DBMS is the software that defines, creates, controls and shares it.

Characteristics of the database approach

  1. Self-describing nature - the database holds a catalog (metadata) describing structure, types and constraints along with the data.
  2. Insulation between programs and data (data abstraction) - program-data and program-operation independence; the structure can change without rewriting programs.
  3. Support for multiple views - different users see different customised subsets of the data.
  4. Sharing of data and multiuser transaction processing - concurrent access with concurrency control and ACID transactions.
  5. Controlled redundancy - data is stored once, avoiding duplication and inconsistency.
  6. Integrity and security - constraints, authorisation and access control protect data.
  7. Backup and recovery - the DBMS restores data after failures.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 5 marks

Explain the three layers of the three-schema architecture.

Answer

The three-schema (ANSI/SPARC) architecture separates the user's view of data from its physical storage using three levels.

 External level   View 1   View 2  ...  View n
                      \      |       /
                   external/conceptual mapping
 Conceptual level     Conceptual schema
                   conceptual/internal mapping
 Internal level       Internal schema  ->  stored database
  1. Internal level (physical) - the internal schema describes physical storage: file organisation, record layout, indexes, access paths and data compression.
  2. Conceptual level (logical) - the conceptual schema describes the structure of the whole database for all users: entities, attributes, relationships, data types and constraints, hiding storage detail. Usually expressed in a representational data model.
  3. External level (view) - each external schema (user view) describes the part of the database a particular group of users needs and hides the rest.

DBMS mappings translate requests between levels. The architecture gives logical and physical data independence.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 10 marks

Define serial, non-serial and serializable schedules with example. How can you test serializability in a schedule? Explain with an example.

Answer

Schedule: the chronological order of operations of a set of concurrent transactions, preserving the order inside each transaction.

Serial schedule - transactions run one after another with no interleaving. For T1,T2T_1, T_2: all of T1T_1 then all of T2T_2 (or the reverse).

Non-serial schedule - operations of different transactions are interleaved.

Serializable schedule - a non-serial schedule whose outcome equals that of some serial schedule, so it is correct.

Example, with T1T_1: R(A), W(A), R(B), W(B) and T2T_2: R(A), W(A):

Serial (T1T_1, T2T_2)Non-serial
R1(A) W1(A) R1(B) W1(B) R2(A) W2(A)R1(A) W1(A) R2(A) W2(A) R1(B) W1(B)

The non-serial schedule is serializable because it is equivalent to the serial order T1→T2T_1 \to T_2 (T2T_2 never touches B).

Testing conflict serializability (precedence graph)

  1. Create a node for each transaction.
  2. Add edge Ti→TjT_i \to T_j if an operation of TiT_i conflicts with a later operation of TjT_j on the same item (R-W, W-R or W-W with different transactions).
  3. The schedule is conflict serializable iff the graph has no cycle. A topological order of the graph gives the equivalent serial schedule.

Example: SS: R1(A) W1(A) R2(A) W2(A) R1(B) W1(B). Conflicts on A: W1(A) before R2(A) and W2(A), so edge T1→T2T_1 \to T_2. B is only used by T1T_1. The graph T1→T2T_1 \to T_2 has no cycle, so SS is serializable, equivalent to T1,T2T_1, T_2.

Counter-example: R1(A) W2(A) W1(A) gives T1→T2T_1 \to T_2 (R1 before W2) and T2→T1T_2 \to T_1 (W2 before W1): a cycle, so it is not serializable.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 5 marks

What is Transaction? State and explain the states of transaction with transition diagram.

Answer

A transaction is a logical unit of database work, a sequence of read/write operations that takes the database from one consistent state to another (e.g. transferring Rs 500 between accounts). It must satisfy ACID properties.

States of a transaction

          +--> Partially committed --> Committed --+
Active ---+                                         +--> Terminated
          +--> Failed ---------------> Aborted ----+
  1. Active - the initial state; the transaction is executing its reads and writes.
  2. Partially committed - after the final operation has executed, but changes may still only be in memory buffers.
  3. Committed - changes are safely written to the database (log forced to disk); the transaction ended successfully and its effects are permanent.
  4. Failed - normal execution cannot continue (error, system failure, or check in the partially committed state fails).
  5. Aborted - the transaction is rolled back and the database restored to its state before the transaction. It may then be restarted or killed.

Committed and aborted are the terminal (terminated) states.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 10 marks

From the relations given below, answer the following questions: EMPLOYEE (Ssn, Ename, Bdate, Address, Sex, Salary, Super_ssn, Dno), DEPARTMENT (Dname, Dnumber, Mgr_ssn, Mgr_start_date), PROJECT (Pname, Pnumber, Plocation, Dnum), DEPENDENT (Essn, Dependent_name, Sex, Bdate, Relationship), DEPT_LOCATIONS (Dnumber, Dlocation): (a) Retrieve the name and address of all employees who work for the 'Computer' department in SQL, (b) For each Department, retrieve the department number, the number of employees in the department, and their average salary using SQL, (c) Retrieve the employees name and their Dname and Pname ordered by the employee's Dname, (d) Retrieve the name and salary of all employees who work in department number 5 using Relational Algebra, (e) Retrieve the name of the manager of each department using Relational Algebra.

Answer

(a)

SELECT E.Ename, E.Address
FROM EMPLOYEE E JOIN DEPARTMENT D ON E.Dno = D.Dnumber
WHERE D.Dname = 'Computer';

(b)

SELECT Dno, COUNT(*) AS No_of_employees, AVG(Salary) AS Avg_salary
FROM EMPLOYEE
GROUP BY Dno;

(c) An employee is linked to a project through the department that controls it (Dnum).

SELECT E.Ename, D.Dname, P.Pname
FROM EMPLOYEE E, DEPARTMENT D, PROJECT P
WHERE E.Dno = D.Dnumber AND P.Dnum = D.Dnumber
ORDER BY D.Dname;

(d) πEname, Salary(σDno=5(EMPLOYEE))\pi_{Ename,\,Salary}\big(\sigma_{Dno=5}(EMPLOYEE)\big)

(e) πDname, Ename(DEPARTMENT⋈Mgr_ssn=SsnEMPLOYEE)\pi_{Dname,\,Ename}\big(DEPARTMENT \bowtie_{Mgr\_ssn = Ssn} EMPLOYEE\big) which gives the manager's name for each department (project EnameEname only if just the name is wanted).

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 5 marks

What are the Advantages of using DBMS? Explain in brief.

Answer

Advantages of using a DBMS

  1. Controlling redundancy - data is stored once, saving space and avoiding inconsistency.
  2. Data consistency and integrity - constraints (key, domain, referential) keep data valid.
  3. Data sharing - many users and applications access the same data concurrently.
  4. Security - authorisation and access rights restrict who can see or change data.
  5. Backup and recovery - the DBMS restores the database after failures.
  6. Data independence - programs are insulated from changes in storage structure.
  7. Multiple user views and efficient query processing - indexes and query optimisation give fast access, and each user group gets its own view.
  8. Standards enforcement and reduced application development time - common naming and formats, and ready-made services like SQL.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 5 marks

What is Attributes? Explain different types of Attributes with example.

Answer

An attribute is a property that describes an entity, e.g. the entity STUDENT has attributes Roll_no, Name, Address, Phone.

Types of attributes

  1. Simple (atomic) - cannot be divided further, e.g. Roll_no, Gender.
  2. Composite - can be divided into smaller parts, e.g. Name = (First, Middle, Last); Address = (Street, City, District).
  3. Single-valued - holds one value per entity, e.g. Date_of_birth.
  4. Multivalued - can hold several values, e.g. Phone_numbers, Skills (shown with a double ellipse).
  5. Derived - computed from another attribute, e.g. Age from Date_of_birth (dashed ellipse).
  6. Stored - the base attribute from which a derived one is computed, e.g. Date_of_birth.
  7. Key attribute - uniquely identifies each entity, e.g. Roll_no (underlined).
  8. Null-valued - value is unknown or not applicable, e.g. Middle_name.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 5 marks

Define relation, instance and schema. Explain with example

Answer

Relation - a table of rows and columns representing a set of tuples over a set of attributes; formally a subset of D1×D2×⋯×DnD_1 \times D_2 \times \dots \times D_n.

Schema (relation schema) - the structure of the relation: its name, attributes and domains. It is the design and changes rarely. Example: STUDENT(Roll_no,Name,Address,Phone)STUDENT(Roll\_no, Name, Address, Phone).

Instance - the set of tuples in the relation at a particular moment. It changes with every insertion, deletion or update.

Example

Schema: STUDENT(Roll_no,Name,Address)STUDENT(Roll\_no, Name, Address)

Instance:

Roll_noNameAddress
1RamKathmandu
2SitaPokhara

Adding a third row creates a new instance of the same schema.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 5 marks

What is Normalization? Explain the 2NF with Examples.

Answer

Normalization is the process of organising relations by decomposing them, using functional dependencies, to remove redundancy and the insertion, deletion and update anomalies.

Second Normal Form (2NF): a relation is in 2NF if it is in 1NF and every non-prime attribute is fully functionally dependent on the whole primary key, i.e. there is no partial dependency on part of a composite key.

Example: ENROLL(Student_id,Course_id,Student_name,Grade)ENROLL(Student\_id, Course\_id, Student\_name, Grade) with key (Student_id,Course_id)(Student\_id, Course\_id).

  • (Student_id,Course_id)→Grade(Student\_id, Course\_id) \to Grade (full dependency)
  • Student_id→Student_nameStudent\_id \to Student\_name (partial dependency), so not in 2NF. The student's name repeats for every course.

Decomposition into 2NF

  • STUDENT(Student_id‾,Student_name)STUDENT(\underline{Student\_id}, Student\_name)
  • ENROLL(Student_id‾,Course_id‾,Grade)ENROLL(\underline{Student\_id}, \underline{Course\_id}, Grade)

Now each non-key attribute depends on the full key of its relation.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 5 marks

What is Shared/Exclusive (Read/Write) Locks? How it is different from binary Locks.

Answer

Binary lock - has only two states, locked (1) and unlocked (0), per data item. A transaction must lock item XX before accessing it and unlock afterwards; only one transaction can hold the lock at a time.

Shared/exclusive (read/write) lock - three operations: read_lock(X), write_lock(X), unlock(X).

  • Shared (S, read) lock - several transactions may hold it on the same item, only to read.
  • Exclusive (X, write) lock - only one transaction holds it, to read and write; no other lock is allowed with it.
Held \ RequestedSX
SYesNo
XNoNo

Difference

Binary lockShared/exclusive lock
Two statesThree states (read-locked, write-locked, unlocked)
Even readers exclude each otherMultiple readers allowed together
Lower concurrencyHigher concurrency
Simple to implementNeeds lock mode, count of readers and compatibility rules

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 5 marks

What is Deadlock in DBMS? Explain with example.

Answer

A deadlock is a situation in which two or more transactions each wait for a lock held by another in the set, so none can proceed.

Example

TimeT1T_1T2T_2
1write_lock(A)
2write_lock(B)
3write_lock(B) - waits for T2T_2
4write_lock(A) - waits for T1T_1

T1T_1 waits for T2T_2 and T2T_2 waits for T1T_1: a cycle in the wait-for graph, T1⇄T2T_1 \rightleftarrows T_2.

Handling: prevention (wait-die, wound-wait, conservative locking of all items first), detection (wait-for graph cycle, then abort a victim transaction) and timeouts.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 5 marks

What is NoSQL? Explain the characteristics of NoSQL.

Answer

NoSQL ("Not only SQL") databases are non-relational databases designed to store, retrieve and scale very large volumes of structured, semi-structured and unstructured data across distributed servers. Types: key-value (Redis), document (MongoDB), column-family (Cassandra), graph (Neo4j).

Characteristics

  1. Schema-less / flexible schema - records in a collection need not share the same structure.
  2. Horizontal scalability - scale out by adding commodity servers (sharding).
  3. Distributed and replicated - data copied over nodes for high availability and fault tolerance.
  4. High performance - simple data models and no joins give fast reads and writes.
  5. BASE rather than ACID - Basically Available, Soft state, Eventual consistency; follows the CAP theorem.
  6. Non-relational models - key-value, document, column and graph.
  7. Simple APIs - often query by key or through a custom query language instead of full SQL.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082 · 10 marks

Define a transaction, then explain how lost update and dirty read problems occur during concurrent execution, with examples.

Answer

Transaction: a logical unit of work consisting of one or more database operations (reads and writes) that must be executed completely or not at all, taking the database from one consistent state to another.

When transactions run concurrently without control, interleaving can cause the following problems.

1. Lost update problem

Two transactions read the same item and both update it; one update overwrites the other.

TimeT1T_1T2T_2A
1read(A)100
2read(A)100
3A = A - 20; write(A)80
4A = A + 50; write(A)150

The correct final value is 100−20+50=130100 - 20 + 50 = 130, but T2T_2 overwrote T1T_1's update, so 150 is stored: the update of T1T_1 is lost.

2. Dirty read (temporary update) problem

A transaction reads data written by another transaction that has not yet committed and later aborts.

TimeT1T_1T2T_2A
1read(A); A = A - 20; write(A)80
2read(A) (reads 80)80
3abort (rollback)100

T2T_2 used the value 80, which never legally existed, and may use it to compute and store wrong results.

Both are avoided by concurrency control such as locking (two-phase locking) which ensures serializable, recoverable schedules.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082 · 10 marks

Explain the need for an ER diagram and design one with at least five entities, including a weak entity, many-to-many relationships between two strong entities, a derived and multi-valued attribute, and total participation. State your assumptions.

Answer

Need for an ER diagram

An Entity-Relationship diagram is a conceptual design of a database before implementation. It: communicates requirements between designer and user, shows entities, attributes and relationships clearly, is independent of any DBMS, helps find mistakes early, and maps easily into relational tables.

Example: University system

Assumptions: a student enrols in many courses and a course has many students; a teacher teaches many courses; a department has many teachers; a student has many dependents (guardians) who are identified only through the student; every course must belong to a department; age is calculated from date of birth; a student may have several phone numbers.

Entities

  1. STUDENT(<u>Sid</u>, Name, DOB, /Age/, {Phone})
  2. COURSE(<u>Cid</u>, Title, Credit_hours)
  3. TEACHER(<u>Tid</u>, Name, Salary)
  4. DEPARTMENT(<u>Did</u>, Dname)
  5. GUARDIAN (weak entity)(<u>Gname</u> - partial key, Relation)

Relationships

  • STUDENT M:N COURSE through ENROLLS (attribute Grade).
  • TEACHER M:N COURSE through TEACHES.
  • DEPARTMENT 1:N TEACHER through WORKS_IN.
  • DEPARTMENT 1:N COURSE through OFFERS; COURSE has total participation (double line).
  • STUDENT 1:N GUARDIAN through the identifying relationship HAS (double diamond); GUARDIAN totally participates.
 [Sid]  [Name] [DOB] (Age) ((Phone))
   \      |     |    :     /
    +-----[ STUDENT ]-----+
               |
        <ENROLLS>(Grade)
               |
 [Did]--[DEPARTMENT]==<OFFERS>==[[COURSE]]--<TEACHES>--[TEACHER]
 (rectangle=entity, diamond=relationship, dashed oval=derived /Age/,
  double oval=multivalued {Phone}, double line = total participation,
  double rectangle = weak entity GUARDIAN with partial key Gname)

Here Age is derived (from DOB) and Phone is multivalued. The weak entity GUARDIAN depends on its owner STUDENT.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082 · 10 marks

Explain why normalization is needed and define 1NF, 2NF, and 3NF with examples.

Answer

Need for normalization

Poorly designed relations store the same fact many times. This leads to anomalies:

  • Insertion anomaly - cannot add a fact without unrelated data.
  • Deletion anomaly - deleting a row loses other facts.
  • Update anomaly - a changed value must be updated in many rows or becomes inconsistent.

Normalization decomposes relations, using functional dependencies (FDs), to reduce redundancy, avoid anomalies, save space and keep data consistent, while preserving lossless join and dependencies.

First Normal Form (1NF): all attributes hold only atomic (indivisible) values; no repeating groups or multivalued attributes.

Example: STUDENT(Sid,Name,Phone)STUDENT(Sid, Name, Phone) with Phone = {9841, 9851} for one student is not in 1NF. Fix: one phone per row: (1,Ram,9841)(1, Ram, 9841) and (1,Ram,9851)(1, Ram, 9851), or a separate STUDENT_PHONE(Sid,Phone)STUDENT\_PHONE(Sid, Phone).

Second Normal Form (2NF): in 1NF and no partial dependency: every non-prime attribute depends on the whole candidate key.

Example: ENROLL(Sid,Cid,Sname,Grade)ENROLL(Sid, Cid, Sname, Grade), key (Sid,Cid)(Sid, Cid); Sid→SnameSid \to Sname is partial. Decompose into STUDENT(Sid,Sname)STUDENT(Sid, Sname) and ENROLL(Sid,Cid,Grade)ENROLL(Sid, Cid, Grade).

Third Normal Form (3NF): in 2NF and no transitive dependency of a non-prime attribute on the key. For every FD X→AX \to A, either XX is a superkey or AA is a prime attribute.

Example: EMP(Eid,Ename,Dno,Dname)EMP(Eid, Ename, Dno, Dname) with Eid→DnoEid \to Dno and Dno→DnameDno \to Dname, so Eid→DnameEid \to Dname is transitive. Decompose into EMP(Eid,Ename,Dno)EMP(Eid, Ename, Dno) and DEPT(Dno,Dname)DEPT(Dno, Dname).

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082 · 5 marks

Write SQL to create and update a table, and explain the use of CASCADE on delete. State your assumptions.

Answer

Assumption: a Department table and an Employee table where each employee belongs to a department.

Create

CREATE TABLE Department (
    Dno    INT PRIMARY KEY,
    Dname  VARCHAR(40) NOT NULL
);

CREATE TABLE Employee (
    Eid     INT PRIMARY KEY,
    Ename   VARCHAR(50) NOT NULL,
    Salary  DECIMAL(10,2) DEFAULT 0,
    Dno     INT,
    FOREIGN KEY (Dno) REFERENCES Department(Dno)
        ON DELETE CASCADE
);

Update

UPDATE Employee SET Salary = Salary * 1.10 WHERE Dno = 2;
ALTER TABLE Employee ADD Phone VARCHAR(15);

Use of CASCADE on delete

ON DELETE CASCADE on a foreign key means that when a row in the parent (referenced) table is deleted, all child rows referencing it are automatically deleted. Thus DELETE FROM Department WHERE Dno = 2; also removes all employees of department 2. This keeps referential integrity without orphan rows. The alternatives are SET NULL, SET DEFAULT and RESTRICT/NO ACTION. Cascade should be used carefully since it can remove much data.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082 · 5 marks

Explain how GROUP BY and HAVING are used, with syntax and an example.

Answer

GROUP BY groups rows having the same values in the given column(s) so that aggregate functions (COUNT, SUM, AVG, MAX, MIN) are computed per group.

HAVING filters groups after grouping (conditions on aggregates). WHERE filters individual rows before grouping, and cannot use aggregates.

Syntax

SELECT column, aggregate_function(column)
FROM table
[WHERE row_condition]
GROUP BY column
[HAVING group_condition]
[ORDER BY column];

Example: departments having more than 3 employees, with average salary:

SELECT Dno, COUNT(*) AS Total, AVG(Salary) AS Avg_sal
FROM Employee
WHERE Salary > 10000
GROUP BY Dno
HAVING COUNT(*) > 3;

Order of execution: FROM, WHERE, GROUP BY, HAVING, SELECT, ORDER BY.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082 · 5 marks

Describe the three-schema architecture and how it provides data independence.

Answer

The three-schema architecture (ANSI/SPARC) has three levels:

  • External level - many user views; each describes only the data a user group needs.
  • Conceptual level - one conceptual schema describing the whole database logically (entities, relationships, constraints), hiding storage details.
  • Internal level - the internal schema describing physical storage, file structures, indexes and access paths.
 External views  ->  Conceptual schema  ->  Internal schema
      (mapping)            (mapping)

Data independence

  • Logical data independence: the conceptual schema can be altered (add an attribute or table) without changing external views or application programs; only the external/conceptual mapping is adjusted.
  • Physical data independence: the internal schema can be altered (change file structure, add an index, move to another disk) without changing the conceptual schema; only the conceptual/internal mapping changes.

Hence, changes at a lower level do not affect the upper levels.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082 · 5 marks

Explain how data is stored and retrieved in NoSQL databases, with examples.

Answer

NoSQL databases store data in models other than tables, designed for scale and flexibility; each type has its own storage and retrieval method.

TypeStorageRetrievalExample
Key-valuePairs of unique key and opaque value in a hash tableGET keyRedis, DynamoDB
DocumentJSON/BSON documents in collections, with flexible fieldsQuery by field, or by _idMongoDB, CouchDB
Column-familyData grouped by column families, rows with row keysQuery by row key and columnsCassandra, HBase
GraphNodes and edges with propertiesTraversal queriesNeo4j

Examples

Key-value (Redis):

SET user:1 "Ram"
GET user:1

Document (MongoDB):

db.students.insertOne({ sid: 10, name: "Aarav", phones: ["9841", "9851"] })
db.students.find({ name: "Aarav" })

Data is distributed over many nodes by sharding (partitioning on a key) and replicated for availability. Indexes on keys or fields speed retrieval, and consistency is usually eventual.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082 · 5 marks

Explain the two-phase locking protocol and how it can lead to deadlock.

Answer

Two-phase locking (2PL) is a protocol that guarantees conflict-serializable schedules. Every transaction has two phases:

  1. Growing (expanding) phase - the transaction may acquire locks but cannot release any.
  2. Shrinking phase - the transaction may release locks but cannot acquire any new ones.

The lock point is the moment the last lock is acquired. Transactions executed under 2PL are serializable in the order of their lock points.

Variants: basic 2PL, conservative (locks all items before starting; deadlock-free), strict (holds exclusive locks until commit/abort; avoids cascading rollbacks) and rigorous 2PL.

How it leads to deadlock

Since locks are acquired incrementally while holding others, circular waiting can occur:

T1T_1T2T_2
lock-X(A)
lock-X(B)
lock-X(B) - waits for T2T_2
lock-X(A) - waits for T1T_1

Neither can reach its shrinking phase, so both wait forever. 2PL (except conservative) therefore does not prevent deadlock; it must be detected (wait-for graph) and resolved by aborting a victim, or prevented by wait-die/wound-wait.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082 · 5 marks

Discuss the types of constraints in the Extended ER model.

Answer

The Extended ER (EER) model adds specialization/generalization and categories. Its constraints are:

  1. Disjointness constraint on specialization - disjoint (d): an entity belongs to at most one subclass (e.g. EMPLOYEE is either SECRETARY or ENGINEER); overlapping (o): an entity can belong to several subclasses (e.g. PART can be both manufactured and purchased).
  2. Completeness (participation) constraint - total: every entity of the superclass must belong to at least one subclass (double line); partial: some may belong to none (single line).

These combine into four types: disjoint-total, disjoint-partial, overlapping-total, overlapping-partial.

  1. Attribute-defined (predicate-defined) vs user-defined membership - in an attribute-defined subclass membership is decided by a condition on an attribute (e.g. Job_type = 'Secretary'); in user-defined it is chosen by the user.
  2. Inheritance constraint - subclasses inherit all attributes and relationships of the superclass; with multiple superclasses (a category/union type) an entity belongs to only one of the superclasses.
  3. Specialization lattice/hierarchy constraints - single inheritance in a hierarchy; multiple inheritance in a lattice.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082 · 5 marks

Define a view and show how to create one in SQL, with an example.

Answer

A view is a virtual table defined by a stored SQL query on one or more base tables. It stores no data of its own; the query runs whenever the view is used. Views simplify complex queries, hide columns (security), and give logical data independence.

Syntax

CREATE VIEW view_name AS
SELECT columns FROM tables [WHERE condition];

Example

CREATE VIEW CS_Students AS
SELECT Sid, Name, City
FROM Student
WHERE Program = 'BIT';

SELECT * FROM CS_Students WHERE City = 'Pokhara';
DROP VIEW CS_Students;

Users can query the view like a table. Simple views (one table, no aggregates) are updatable; views with joins, aggregates or DISTINCT generally are not.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082 · 5 marks

Using relational algebra, for the relations Person(Pid, pname, dob, paid) and Doctor(Did, pid, dname, dspeciality): (a) retrieve the names of persons who are doctors, and (b) retrieve all doctors whose speciality is pediatric.

Answer

(a) Names of persons who are doctors (join on pidpid): πpname(Person⋈Person.Pid=Doctor.pidDoctor)\pi_{pname}\big(Person \bowtie_{Person.Pid = Doctor.pid} Doctor\big)

(b) Doctors whose speciality is pediatric: σdspeciality=′pediatric′(Doctor)\sigma_{dspeciality = 'pediatric'}(Doctor)

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2083 · 10 marks

SQL on Student, Course, and Enrollment tables: (a) create the tables with suitable data types; (b) insert student SID 10, 'Aarav', Pokhara, BIT; (c) list students from Kathmandu; (d) find students enrolled in the 'Database' course; (e) update SID 10's city to Kathmandu.

Answer

(a) Create tables

CREATE TABLE Student (
    SID      INT PRIMARY KEY,
    Name     VARCHAR(50) NOT NULL,
    City     VARCHAR(30),
    Program  VARCHAR(20)
);

CREATE TABLE Course (
    CID     INT PRIMARY KEY,
    CName   VARCHAR(50) NOT NULL,
    Credit  INT
);

CREATE TABLE Enrollment (
    SID  INT,
    CID  INT,
    PRIMARY KEY (SID, CID),
    FOREIGN KEY (SID) REFERENCES Student(SID),
    FOREIGN KEY (CID) REFERENCES Course(CID)
);

(b) Insert

INSERT INTO Student (SID, Name, City, Program)
VALUES (10, 'Aarav', 'Pokhara', 'BIT');

(c) Students from Kathmandu

SELECT * FROM Student WHERE City = 'Kathmandu';

(d) Students enrolled in the 'Database' course

SELECT S.SID, S.Name
FROM Student S
JOIN Enrollment E ON S.SID = E.SID
JOIN Course C ON E.CID = C.CID
WHERE C.CName = 'Database';

(e) Update city

UPDATE Student SET City = 'Kathmandu' WHERE SID = 10;

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2083 · 10 marks

Define entity, attribute, and relationship with examples. Design an ER diagram for a school with teachers and students, including a unique teacher ID, a unique student ID, derived age, multiple phone numbers per student, and many-to-many teaching with academic year.

Answer

Definitions

  • Entity - a real-world object that is distinguishable, e.g. a student, teacher.
  • Attribute - a property describing an entity, e.g. Name, DOB.
  • Relationship - an association among entities, e.g. a teacher teaches a subject.

ER design: School

Entities and attributes:

  • TEACHER(<u>Teacher_ID</u>, Name, Subject)
  • STUDENT(<u>Student_ID</u>, Name, DOB, /Age/, {Phone})
  • SUBJECT/CLASS as required (here the relationship links TEACHER and STUDENT directly)

Relationship TEACHES between TEACHER and STUDENT: M:N, with the relationship attribute Academic_Year.

 (Teacher_ID) (Name)            (Student_ID) (Name) (DOB) :Age: ((Phone))
        \     /                       \       |      |    :     /
        [ TEACHER ] ---M--<TEACHES>--N--- [ STUDENT ]
                              |
                       (Academic_Year)
  • Underlined Teacher_ID and Student_ID are key attributes (unique).
  • Age (dashed oval) is derived from DOB.
  • Phone (double oval) is multivalued: a student can have many numbers.
  • TEACHES is many-to-many (a teacher teaches many students and a student is taught by many teachers); Academic_Year is stored on the relationship.

Mapping to tables: TEACHER(Teacher_ID,… )TEACHER(Teacher\_ID, \dots), STUDENT(Student_ID,Name,DOB)STUDENT(Student\_ID, Name, DOB), STUDENT_PHONE(Student_ID,Phone)STUDENT\_PHONE(Student\_ID, Phone), TEACHES(Teacher_ID,Student_ID,Academic_Year)TEACHES(Teacher\_ID, Student\_ID, Academic\_Year).

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2083 · 4+3+3 marks

Explain transactions and ACID properties briefly. List the transaction states. Explain serial schedules and why they are always considered correct.

Answer

Transaction: a logical unit of work made of one or more database operations that moves the database from one consistent state to another.

ACID properties

  • Atomicity - all operations are done or none (all-or-nothing); handled by the recovery manager.
  • Consistency - a transaction preserves database integrity constraints.
  • Isolation - concurrent transactions do not see each other's intermediate results; handled by concurrency control.
  • Durability - once committed, changes persist even after failures.

Transaction states: active, partially committed, committed, failed, aborted (terminated).

Serial schedules

A serial schedule executes transactions one after another, with no interleaving of operations. It is always considered correct because each transaction, run alone on a consistent database, leaves it consistent (by the consistency property); so running them one at a time in any order also leaves it consistent. There is no interference, so no lost update, dirty read or inconsistent result occurs (though different serial orders may give different results, each is correct). The drawback is poor throughput, which is why serializable schedules are used.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2083 · 1+3+1 marks

Define a DBMS, list 5 advantages over file-based systems, and give one real-life example.

Answer

DBMS: a software system that lets users define, create, maintain and control access to a database, e.g. MySQL, Oracle.

Advantages over file-based systems

  1. Reduced data redundancy and inconsistency.
  2. Data sharing by many users concurrently.
  3. Data independence between programs and storage.
  4. Integrity constraints and security (access control).
  5. Backup and recovery, and efficient querying with SQL.

Real-life example: a bank's system storing customers, accounts and transactions in one database accessed by ATMs, branches and online banking.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2083 · 1+4 marks

Define a weak entity type. Give an example with a diagram showing the weak entity, owner, identifying relationship, and partial key.

Answer

Weak entity type: an entity type that does not have a key attribute of its own; it is identified only through its relationship with an owner (identifying) entity, and has total participation in that identifying relationship.

Example: EMPLOYEE and DEPENDENT. A dependent is identified by the owner employee's SSN together with the dependent's name (the partial key).

 [SSN]--[Name]
     \  /
   [ EMPLOYEE ] ===<< HAS >>=== [[ DEPENDENT ]]--(Dep_name)  (Relation)
    (owner)    (identifying)       (weak entity)    (partial key,
                relationship                         dashed underline)
  • Weak entity: double rectangle DEPENDENT.
  • Owner (strong) entity: EMPLOYEE.
  • Identifying relationship: double diamond HAS, with a double line (total participation) from DEPENDENT.
  • Partial key: Dep_name, drawn with a dashed underline; the full key is (SSN,Dep_name)(SSN, Dep\_name).

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2083 · 3+2 marks

Define domain constraint and referential integrity constraint. What happens when a DELETE violates referential integrity?

Answer

Domain constraint: the value of every attribute must be an atomic value from the attribute's domain (data type, range, format). Example: AgeAge must be an integer between 0 and 120; a NOT NULL or CHECK clause can enforce it.

Referential integrity constraint: a foreign key value in a tuple of the referencing relation must either match an existing primary key value in the referenced relation or be NULL. Example: Employee.DnoEmployee.Dno must exist in Department.DnumberDepartment.Dnumber.

When a DELETE violates referential integrity (deleting a parent tuple still referenced by child tuples), the DBMS can:

  1. Restrict / reject the delete (default).
  2. Cascade - delete the referencing tuples too (ON DELETE CASCADE).
  3. Set NULL - set the foreign key in referencing tuples to NULL (ON DELETE SET NULL).
  4. Set default - set it to a default value.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2083 · 3+2 marks

Explain the two-phase locking protocol. How can deadlock in transactions be detected?

Answer

Two-phase locking (2PL): each transaction acquires and releases locks in two phases.

  • Growing phase: locks are acquired; none released.
  • Shrinking phase: locks are released; none acquired.

Once a transaction releases its first lock it cannot lock again. This guarantees conflict-serializable schedules. (Strict 2PL holds exclusive locks until commit.)

Deadlock detection

  1. Wait-for graph: nodes are transactions; add edge Ti→TjT_i \to T_j when TiT_i waits for a lock held by TjT_j. The graph is checked periodically; a cycle means deadlock.
  2. A victim transaction in the cycle is chosen (e.g. the youngest or least work done) and aborted/rolled back to break the cycle.
  3. A simpler method is a timeout: a transaction waiting longer than a limit is assumed deadlocked and aborted.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2083 · 2+3 marks

Define functional dependency. Define First Normal Form (1NF) with an example.

Answer

Functional dependency (FD): a constraint between two sets of attributes XX and YY of a relation, written X→YX \to Y, meaning that if two tuples have the same value of XX they must have the same value of YY (XX determines YY). Example: Roll_no→NameRoll\_no \to Name.

First Normal Form (1NF): a relation is in 1NF if all attribute values are atomic (single, indivisible), with no multivalued attributes or repeating groups.

Example

Not in 1NF:

SidNamePhone
1Ram9841, 9851

In 1NF:

SidNamePhone
1Ram9841
1Ram9851

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2083 · 2+3 marks

What is concurrency control and why is it needed? Differentiate shared (S) and exclusive (X) locks.

Answer

Concurrency control is the set of techniques a DBMS uses to manage the simultaneous execution of transactions so that they do not interfere and the database stays consistent (isolation, serializability).

Why needed: uncontrolled interleaving causes the lost update, dirty read, unrepeatable read and incorrect summary problems, leading to inconsistent data.

Shared vs exclusive locks

Shared (S) lockExclusive (X) lock
Used for readingUsed for reading and writing
Many transactions may hold it at onceOnly one transaction may hold it
Compatible with other S locksIncompatible with S and X locks
Allows higher concurrencyGives exclusive access, blocks others

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2083 · 2.5+2.5 marks

Write short notes on NoSQL databases and database users.

Answer

(a) NoSQL databases

NoSQL ("not only SQL") databases are non-relational systems for large-scale, distributed data that is structured, semi-structured or unstructured.

  • Schema-less and flexible; horizontally scalable by sharding; data replicated for availability.
  • High read/write performance; follows BASE (eventual consistency) and the CAP theorem.
  • Types: key-value (Redis), document (MongoDB), column-family (Cassandra), graph (Neo4j).
  • Used in big data, social networks, real-time web applications.

(b) Database users

  1. Database administrators (DBA) - manage the DBMS, schema, security, backup and performance.
  2. Database designers - decide data to store and design structures and constraints.
  3. End users - casual users (occasional queries), naive/parametric users (use ready forms, e.g. bank tellers), sophisticated users (analysts using query languages) and standalone users.
  4. System analysts and application programmers - determine end-user requirements and write programs/applications.
  5. DBMS designers and implementers, tool developers and operators/maintenance staff.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

Questions from TU BIT 2078 Third Semester Data Structures and Algorithms (TU IOST semester board exam, 2078 (BS), via StudyNp), TU BIT 2079 Third Semester Data Structures and Algorithms (TU IOST semester board exam, 2079 (BS), via StudyNp), TU BIT 2080 Third Semester Data Structures and Algorithms (TU IOST semester board exam, 2080 (BS), via StudyNp), TU BIT 2082 Third Semester Data Structures and Algorithms (TU IOST semester board exam, 2082 (BS), via StudyNp), TU BIT 2083 Third Semester Data Structures and Algorithms (TU IOST semester board exam, 2083 (BS), via StudyNp), TU BIT 2078 Third Semester Database Management System (TU IOST semester board exam, 2078 (BS), via StudyNp), TU BIT 2079 Third Semester Database Management System (TU IOST semester board exam, 2079 (BS), via StudyNp), TU BIT 2080 Third Semester Database Management System (TU IOST semester board exam, 2080 (BS), via StudyNp), TU BIT 2082 Third Semester Database Management System (TU IOST semester board exam, 2082 (BS), via StudyNp), TU BIT 2083 Third Semester Database Management System (TU IOST semester board exam, 2083 (BS), via StudyNp), TU BIT 2078 Third Semester Numerical Methods (TU IOST semester board exam, 2078 (BS), via StudyNp), TU BIT 2079 Third Semester Numerical Methods (TU IOST semester board exam, 2079 (BS), via StudyNp), TU BIT 2080 Third Semester Numerical Methods (TU IOST semester board exam, 2080 (BS), via StudyNp), TU BIT 2082 Third Semester Numerical Methods (TU IOST semester board exam, 2082 (BS), via StudyNp), TU BIT 2083 Third Semester Numerical Methods (TU IOST semester board exam, 2083 (BS), via StudyNp), TU BIT 2078 Third Semester Operating Systems (TU IOST semester board exam, 2078 (BS), via StudyNp), TU BIT 2079 Third Semester Operating Systems (TU IOST semester board exam, 2079 (BS), via StudyNp), TU BIT 2080 Third Semester Operating Systems (TU IOST semester board exam, 2080 (BS), via StudyNp), TU BIT 2082 Third Semester Operating Systems (TU IOST semester board exam, 2082 (BS), via StudyNp), TU BIT 2083 Third Semester Operating Systems (TU IOST semester board exam, 2083 (BS), via StudyNp), TU BIT 2078 Third Semester Principles of Management (TU IOST semester board exam, 2078 (BS), via StudyNp), TU BIT 2079 Third Semester Principles of Management (TU IOST semester board exam, 2079 (BS), via StudyNp), TU BIT 2080 Third Semester Principles of Management (TU IOST semester board exam, 2080 (BS), via StudyNp), TU BIT 2082 Third Semester Principles of Management (TU IOST semester board exam, 2082 (BS), via StudyNp) and TU BIT 2083 Third Semester Principles of Management (TU IOST semester board exam, 2083 (BS), via StudyNp). Answers are written for this site; check them against your class notes.