Question 1
EasyIn the relational model, what is a tuple?
- A.
A row of a table
- B.
A whole table
- C.
A column of a table
- D.
A database
Show answer and explanation
Answer: A
A relation is a table; a tuple is a row; an attribute is a column.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
DBMS
In the relational model, what is a tuple?
A row of a table
A whole table
A column of a table
A database
Answer: A
A relation is a table; a tuple is a row; an attribute is a column.
What is a primary key?
A column that may repeat
The first column of every table
A minimal set of columns that uniquely identifies each row, and cannot be NULL
Any column with numbers
Answer: C
A table has one primary key; its values must be unique and non-null.
What is a foreign key?
A column that refers to the primary key of another (or the same) table
A key from another database server
A primary key with NULLs
A key used to encrypt data
Answer: A
Foreign keys link tables and enforce referential integrity.
What is the degree of a relation?
The number of tables
The number of its attributes (columns)
The number of its rows
The number of keys
Answer: B
Degree counts columns; cardinality counts rows.
What is the cardinality of a relation?
The number of its columns
The number of its keys
The number of its indexes
The number of its tuples (rows)
Answer: D
A table with 100 rows has cardinality 100.
Which constraint says a primary key column may not be NULL?
Entity integrity
Domain constraint
Referential integrity
Check constraint
Answer: A
Entity integrity: every row must be identifiable, so no part of the primary key may be NULL.
What is a candidate key?
A foreign key
A key containing NULL
Any attribute
A minimal set of attributes that could serve as the primary key
Answer: D
A table may have several candidate keys; one is chosen as the primary key and the others are alternate keys.
In the relational model, what is a relation?
A row
A database user
A table
A column
Answer: C
A relation is a table made of tuples (rows) and attributes (columns).
In the relational model, what is an attribute?
A row of a relation
A named column of a relation
A database file
A table name
Answer: B
Each attribute holds one kind of value for every tuple.
What is the domain of an attribute?
The set of values the attribute is allowed to take
The number of rows
The website of the database
The table the attribute belongs to
Answer: A
For example, the domain of 'age' might be whole numbers from 0 to 150.