Computer Science/IT MCQs
Topic Notes: Computer Science/IT
MCQs and preparation resources for competitive exams, covering important concepts, past papers, and detailed explanations.
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
111
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.
112
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).
113
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.
114
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.
115
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.
116
In a One-to-Many relationship between a "Customers" table and an "Orders" table, the primary key of the Customers table would be the _________ in the Orders table.
Answer:
Foreign Key
The `CustomerID` field, which is the primary key in the Customers table, is added to the Orders table to link each order to a customer. In the Orders table, `CustomerID` is the foreign key.
117
What does "Referential Integrity" ensure?
Answer:
That the relationships between tables remain consistent and valid
Enforcing referential integrity prevents "orphan" records. For example, it would prevent you from creating an order for a `CustomerID` that does not exist in the Customers table.
118
The most common type of relationship between two tables in a relational database is:
Answer:
One-to-Many
This relationship is very common. For example, one customer (the "one" side) can have many orders (the "many" side).
119
What is a "Foreign Key"?
Answer:
A primary key from one table that is placed into a second table to form a relationship
A foreign key is the "link" between two tables. For example, the `CustomerID` (primary key in the Customers table) would be placed in the Orders table as a foreign key to link each order to a specific customer.
120
What is a "Primary Key" in a database table?
Answer:
A field, or combination of fields, that uniquely identifies each record in the table
The primary key is crucial for ensuring that you can uniquely identify every single row. It cannot contain duplicate values and cannot be null (empty).