Computer Science - IT MCQs
Topic Notes: Computer Science - IT
<p>MCQs and preparation resources for competitive exams, covering important concepts, past papers, and detailed explanations.</p>
Plato
- Biography: Ancient Greek philosopher (427–347 BCE), student of Socrates and teacher of Aristotle, founder of the Academy in Athens.
- Important Ideas:
- Theory of Forms
- Philosopher-King
- Ideal State
181
An example of a many-to-many relationship would be between which two tables?
Answer:
Students and Classes
One student can enroll in many classes, and one class can have many students. This requires a junction table (e.g., an "Enrollment" table) to link them.
182
To establish a relationship, the linked fields (primary and foreign keys) must:
Answer:
Have the same data type
This is a requirement for creating a relationship. You cannot link a Number field to a Text field. While it's good practice for them to have the same name, it is not strictly required.
183
The "Cascade Delete Related Records" option means that:
Answer:
If you delete a primary key record, Access will automatically delete all related records in the "many" table.
This is a powerful but potentially dangerous option. For example, if you turn this on and delete a customer, all of their orders will also be permanently deleted.
184
The "Cascade Update Related Fields" option for referential integrity means that:
Answer:
If you update a primary key value, Access will automatically update the matching foreign key values in the related table.
This feature helps maintain data consistency. If a `CustomerID` changes from 101 to 505, this option will automatically find all orders for customer 101 and change their `CustomerID` to 505.
185
What is a "One-to-One" relationship?
Answer:
Each record in one table can have one, and only one, matching record in another table.
This type of relationship is less common. It might be used to split a table with many columns or for security reasons, such as separating employee contact information from sensitive payroll information.
186
A "Composite Key" is a primary key that consists of:
Answer:
Two or more fields combined to create a unique identifier
Sometimes, a single field isn't enough to guarantee uniqueness. For example, in an OrderDetails table, the primary key might be the combination of `OrderID` and `ProductID` to uniquely identify each line item.
187
What does the "infinity" symbol (∞) signify on a relationship line in the Relationships window?
Answer:
The "many" side of a one-to-many relationship
The relationship line is typically shown with a "1" on the "one" side (the primary key side) and an infinity symbol on the "many" side (the foreign key side).
188
The Relationships window in Access is used to:
Answer:
Define the relationships between tables by linking their common fields
This is a graphical tool where you can drag a key field from one table and drop it onto the corresponding foreign key field in another table to establish a link.
189
Which of the following would be the best choice for a primary key in a "Students" table?
Answer:
Student ID Number
A Student ID Number is designed to be unique for every student. Names and dates of birth can have duplicates, making them poor choices for a primary key.
190
A "Junction Table" (or linking table) is required to create which type of relationship?
Answer:
Many-to-Many
Relational databases cannot directly model a many-to-many relationship. You must create a third table, called a junction table, that breaks the M:N relationship down into two one-to-many relationships.