What does an RDBMS consist of?

  • A. a) Collection of Records
  • B. b) Collection of Keys
  • C. c) Collection of Tables
  • D. d) Collection of Fields
Correct Answer: C. c) Collection of Tables
A foreign key is a column (or a set of columns) in one table that refers to the primary key of another table. It establishes a link between the two tables, ensuring data consistency and integrity.  

1. sampletestcases.com

sampletestcases.com

2. medium.com

medium.com

Imagine this:

You have a table called "Customers" with columns like "Customer ID", "Name", "Address".

You have another table called "Orders" with columns like "Order ID", "Customer ID", "Order Date", "Total Amount".

The "Customer ID" in the "Orders" table is a foreign key. It references the "Customer ID" in the "Customers" table. This means that every order must be associated with an existing customer.

Key points about foreign keys:

It maintains referential integrity, ensuring that related data exists.

It helps to normalize data by reducing redundancy.

It allows you to retrieve related data efficiently through joins.

By using foreign keys, you create a structured and connected database where information can be easily managed and retrieved.

If you think there is any confusion in the given MCQs, you can comment below.

Follow us on WhatsApp

docmcqs.com is Pakistan's No.1 online platform for preparing for all types of exams including PPSC, FPSC, KPSC, SPSC, Ministry of Defence, and for one-paper MCQs. This includes Pedagogy MCQs, general knowledge MCQs, current affairs MCQs, and much more.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top