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
171
In the Relationships window, how do you delete a relationship?
Answer:
Right-click the relationship line and choose "Delete"
You can manage relationships by right-clicking the line that connects the tables to either edit its properties or remove it entirely.
172
A well-designed relational database minimizes:
Answer:
Data redundancy
The main goal of normalization and creating relationships is to store each piece of information only once. This saves space and, more importantly, improves data consistency and accuracy.
173
Which data type is ideal for a primary key that has no real-world meaning but just needs to be unique?
Answer:
AutoNumber
The AutoNumber data type is perfect for creating "surrogate" primary keys. It automatically generates a new, unique number for each record, saving the user from having to invent one.
174
What happens if you try to enter a value into a foreign key field that does not exist in the related primary key field (with referential integrity enforced)?
Answer:
Access will display an error message and prevent you from adding the record
This is the core function of referential integrity. It prevents the creation of orphan records by ensuring that the foreign key value always points to a valid, existing record in the primary table.
175
A "Candidate Key" is:
Answer:
A field or set of fields that could potentially be used as the primary key
A table might have several fields that are unique (e.g., StudentID, SocialSecurityNumber). Any of these could serve as the primary key. They are all considered candidate keys until one is chosen as the primary key.
176
When Access displays a "Subdatasheet" (a small '+' sign next to a record), it is showing:
Answer:
Records from a related table based on a one-to-many relationship
The subdatasheet is a direct visual representation of the relationship. Clicking the '+' next to a customer record will show you all the orders for that customer directly within the customer table's datasheet view.
177
A "self-join" or "self-referencing relationship" is when:
Answer:
A table is joined to itself
This is used to model hierarchical data within a single table. For example, in an "Employees" table, you could have a `SupervisorID` field that is a foreign key linking to the `EmployeeID` (primary key) of the same table.
178
In a relationship between a "Departments" table and an "Employees" table, which is the "one" side?
Answer:
Departments
One department can have many employees. Therefore, "Departments" is the "one" side of the relationship.
179
Can a primary key field contain a Null (empty) value?
Answer:
No, a primary key must always have a value
The fundamental rule of a primary key is that it must uniquely identify a record. A Null value is not unique and therefore is not allowed. Access automatically enforces this rule.
180
What is the primary benefit of creating relationships between tables?
Answer:
It reduces data redundancy and improves data integrity
Instead of typing a customer's full name and address on every single order, you store it once in the Customers table and simply link to it. This saves space and ensures that if the customer's address changes, you only need to update it in one place.