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
81
The main trade-off of denormalization is between:
Answer:
Query performance and data consistency
Denormalization is primarily done to improve query performance (read speed) by reducing joins. However, this is achieved by adding redundant data, which increases the risk of update/insert/delete anomalies and complicates maintaining data consistency.
82
The main reason to normalize a database to BCNF instead of just 3NF is to:
Answer:
Handle anomalies that can arise when a table has multiple overlapping candidate keys.
BCNF is a stricter version of 3NF that resolves certain anomalies that 3NF does not. These issues typically occur in rare situations where a table has more than one candidate key, and the candidate keys are composite and overlap (share one or more attributes).
83
To make all the changes within the current transaction permanent in the database, which TCL command is used?
Answer:
`COMMIT`
The `COMMIT` command is used to save all the work done in the current transaction. Once a transaction is committed, its changes are permanent and visible to other users.
84
What is a large collection of files called?
Answer:
Database
A database is a structured and organized collection of multiple related files. This structure allows for efficient management, access, and updating of the data contained within those files.
85
To specify that a field in a database contains only numbers, you would set:
Answer:
Data type
The data type of a field determines what kind of data it can hold, such as numeric, text, date/time, etc.
86
Which type of JOIN returns rows when there is at least one match in both tables?
Answer:
INNER JOIN
The `INNER JOIN` keyword selects records that have matching values in both tables. It is the most common type of join.
87
Normalization is a ______ process.
Answer:
Top-down
Normalization is generally considered a top-down process. You start with a large, unnormalized collection of data (e.g., in a single table or spreadsheet) and progressively break it down into smaller, well-structured tables by applying the rules of each normal form.
88
The `GRANT` and `REVOKE` commands, which manage user permissions, are part of which SQL sub-language?
Answer:
DCL
DCL stands for Data Control Language. It includes commands like `GRANT` and `REVOKE` which are used to define and manage access rights and permissions for database users.
89
A program that interacts with the database at the time of its execution is known as:
Answer:
An online application
Online applications, such as airline reservation systems or banking systems, interact with the database in real-time to process transactions and queries as they occur.
90
The `HAVING` clause is used in conjunction with which other clause?
Answer:
GROUP BY
The `HAVING` clause was added to SQL because the `WHERE` keyword could not be used with aggregate functions. `HAVING` is used to filter groups created by the `GROUP BY` clause.