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
6281
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.
6282
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.
6283
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.
6284
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.
6285
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.
6286
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.
6287
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.
6288
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.
6289
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.
6290
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.