This section contains carefully selected MCQs and Previous Year Questions with explanations to help students understand concepts and prepare effectively for examinations, interviews, and competitive tests.
Q: 1Suppose X is a composite attribute of an entity type and has three components, A1, A2 and A3, where only A2 is multi-valued and can be NULL. If domain sets of A1, A2 and A3 have 5, 3, and 4 elements respectively, what is the size of the domain of X?
Option D
The attribute X is a composite attribute made up of three components, A1, A2, and A3, whose domain sizes are 5, 3, and 4 respectively. Since A2 is a multi-valued attribute, it can take multiple values from its domain or even be NULL.
If the domain of A2 has 3 elements, then the number of possible subsets of A2 is 23 = 8, because each element may be either included or not.
Now, the total number of possible combinations for X is calculated as:
Domain size of X = (Domain of A1) × (Domain of A2) × (Domain of A3)
Domain size of X = 5 × 8 × 4 = 160
Q: 2
Match the following formal relational term with informal equivalents.
| (i) Relation | A. Row |
| (ii) Tuple | B. Value |
| (iii) Attribute | C. Table |
| (iv) Domain | D. Column |
Option B
In the relational model of DBMS, formal relational terms are often represented by informal table-related terms.
| Formal Term | Informal Equivalent |
|---|---|
| Relation | Table |
| Tuple | Row |
| Attribute | Column |
| Domain | Value |
Q: 3If X1,X2,X3,…,XN are the domains in a relational database model, then the relation (table) is a subset of which of the following?
Option A
A Relational Database Model stores data in the form of relations (tables). A relation consists of rows (tuples) and columns (attributes).
Each attribute in a relation has a domain. A domain is the set of all valid values that an attribute can take.
E.g.:
If a relation has N attributes, then each attribute has its own domain, represented as X₁, X₂, X₃, ..., Xₙ. The Cartesian Product of these domains, denoted by X₁ × X₂ × X₃ × ... × Xₙ, represents all possible combinations of values obtained by selecting one value from each domain.
However, a database table does not store every possible combination. It stores only those combinations that are valid and meaningful according to the rules and constraints of the database.
Therefore, a relation (table) is always a subset of the Cartesian Product of its domains.
Mathematically, if R represents a relation, then it is expressed as: R⊆X1×X2×X3×⋯×XN or Relation ⊆ Cartesian Product of Domains.
Q: 4What term refers to the complete logical definition of a database, including the description of all tables, fields, and relationships?
Option A
A Schema represents the overall logical structure of a database. It includes definitions of all tables, fields or attributes, data types, and relationships among the tables. The schema acts as a blueprint that describes how data is organized in the database.
Q: 5The value of the attributes in a database describes a particular _________.
Option A
In a database, an attribute represents a property or characteristic of an entity. The actual values stored for these attributes describe a particular entity.
For example, consider a Student entity with the attributes RollNo, Name, and Age. If the values are 101, Suresh Kulahry, 32, these attribute values describe a particular student entity.
Q: 6 A group of associated fields is called a?
Option B
In a database, a field represents a single piece of data, such as a name or fees. When several related fields are combined together to describe a complete entity, they form a Record. For example, a student record may consist of fields like rollno, name, age, and course.
Q: 7The schema of a table is an example of _________.
Option D
A Schema of a table defines the structure of the table, such as column names, data types, constraints, etc. This is not the actual data, but information about the data, which is called Metadata.
Q: 8Which type of relationship requires an associative entity that has its own attributes?
Option B
A Many-to-Many (M:N) relationship occurs when multiple records in one table are related to multiple records in another table. Such a relationship cannot be implemented directly in a relational database. To resolve this, an associative entity (junction table) is created.
THIS ASSOCIATIVE ENTITY:
Q: 9In Relational Model, which type of constraint does not allow composite and multivalued attributes?
Option B
In the Relational Model, every attribute in a table must store a single, indivisible value. This means the model does not allow composite attributes, which can be divided into sub-parts, or multivalued attributes, which can hold more than one value at the same time. The type of rule that enforces this requirement is known as a Domain Constraint.
Domain constraints define what type of values an attribute (column) can store. They ensure that:
Thus, domain constraints automatically prevent composite and multivalued attributes.
Q: 10The cardinality of a relational table with 5000 rows and 10 columns is—
Option A
In a relational database table, Cardinality refers to the total number of rows or records present in the table. It represents how many individual data entries the table holds.
The Degree refers to the total number of columns or attributes in the table, which describe the structure of each record.
| Property | Value |
|---|---|
| Number of Rows (Cardinality) | 5000 |
| Number of Columns (Degree/Arity) | 10 |
Thank you so much for taking the time to read my Computer Science MCQs section carefully. Your support and interest mean a lot, and I truly appreciate you being part of this journey. Stay connected for more insights and updates! If you'd like to explore more tutorials and insights, check out my YouTube channel.
Don’t forget to subscribe and stay connected for future updates.