Skip to content
Exercises · Q3

Q.Fill in the blanks:

a) ____________ declares that an index in one table is related to that in another table.
i) Primary Key
ii) Foreign Key
iii) Composite Key
iv) Secondary Key
b) The symbol Asterisk (*) in a select query retrieves ____________.
i) All data from the table
ii) Data of primary key only
iii) NULL data
iv) None of the mentioned
CBSENCERTMCQ· 1mImportance★★★★★est
64% · 29/45 Questions
✓ Free question

  1. A Foreign Key is the constraint that declares that a column (index) in one table is related to a column in another table.
  2. The asterisk * in a SELECT is shorthand for all columns — all data from the table.

a) "____ declares that an index in one table is related to that in another table."

That is the definition of a FOREIGN KEY: a column (or set of columns) in one table whose values must match the primary key of another table, formally linking the two.

CREATE TABLE MATCH_DETAILS (
    MatchID     VARCHAR(3) PRIMARY KEY,
    FirstTeamID INT,
    FOREIGN KEY (FirstTeamID) REFERENCES TEAM(TeamID)
);

The FOREIGN KEY ... REFERENCES line is exactly the "related to another table" declaration — MATCH_DETAILS.FirstTeamID may now hold only values that exist in TEAM.TeamID.

Why the other options fail:

  • (i) Primary Key identifies rows within its own table — it declares nothing about another table.
  • (iii) Composite Key just means a key made of multiple columns; still within one table.
  • (iv) Secondary Key is a non-key attribute used for retrieval — again, no cross-table relationship.

Correct: (ii) Foreign Key.

b) "The symbol Asterisk (*) in a select query retrieves ____."

SELECT * FROM student;
namestudent_idgender
Suhana109F
Rivaan102M

* expands to every column of the table, so the query returns all data from the table — every column of every row (subject only to any WHERE filter, absent here).

  • (ii) primary-key-only would need SELECT student_id ...; (iii) NULLs are not specially selected by *; (iv) is ruled out because (i) is true.

Correct: (i) All data from the table.

✓Final answer

a) (ii) Foreign Key — it declares that a column in one table references (is related to) a column in another table.

b) (i) All data from the table — * is shorthand for every column.

Unlock everything free for 14 days

  • Full step-by-step solutions
  • Concept-first explanations
  • Methods, shortcuts & mistakes
  • PYQ mapping + timed mock tests

Full access for 14 days. No credit card required.