Menu
Database Management System (DBMS) GATE Question Answers with Explanation.
Q1 – Which one of the options given below refers to the degree (or arity) of a relation in relational database systems? (GATE 2023)
Â
Number of attributes of its relation schema.
Number of tuples stored in the relation.
Number of entries in the relation.
Number of distinct domains of its relation schema.
Ans – (1)
Explanation –
Q2 – Consider the following table named Student in a relational database. The primary key of this table is rollNum.
The SQL query below is executed on this database.
SELECT *
FROM Student
WHERE gender = ‘F’ AND
marks > 65;
The number of rows returned by the query is __________. (GATE 2023)
Ans – (2)
Explanation –
Q3 – Consider a database of fixed-length records, stored as an ordered file. The database has 25,000 records, with each record being 100 bytes, of which the primary key occupies 15 bytes. The data file is block-aligned in that each data record is fully contained within a block. The database is indexed by a primary index file, which is also stored as a block-aligned ordered file. The figure below depicts this indexing scheme.
Suppose the block size of the file system is 1024 bytes, and a pointer to a block occupies 5 bytes. The system uses binary search on the index file to search for a record with a given key. You may assume that a binary search on an index file of b blocks takes ceiling(log2 b) block accesses in the worst case.
Â
Given a key, the number of block accesses required to identify the block in the data file that may contain a record with the key, in the worst case, is _________. (GATE 2023)
Ans – (6)
Explanation –Â