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
351
The key used to uniquely identify a record in a database table is:
Answer:
Primary key
The primary key is a unique identifier for each record in a database table, ensuring that no two rows are identical.
352
A regular subquery is processed:
Answer:
From the bottom up
In SQL, the innermost subquery is executed first, and its result is used by the outer query, continuing until the outermost query is processed.
353
What is a key difference between a `UNIQUE` constraint and a `PRIMARY KEY` constraint?
Answer:
A `PRIMARY KEY` does not allow NULL values, while a `UNIQUE` constraint can allow one NULL value.
The main difference is that a primary key constraint is a combination of `UNIQUE` and `NOT NULL`. A unique constraint enforces uniqueness but typically allows a single `NULL` value in the column.
354
In the relational model, what is a tuple?
Answer:
A row in a table.
In the formal terminology of the relational model, a row in a table is called a tuple. It represents a single, implicitly structured data item in a table, consisting of a set of attribute values.
355
Denormalization introduces ______ in a controlled manner.
Answer:
Redundancy
The core idea of denormalization is to strategically add redundant data to the database. This is a controlled process designed to improve performance, unlike the uncontrolled redundancy that normalization aims to eliminate.
356
The logical level of data abstraction describes:
Answer:
The entire database structure for a community of users.
The logical level (or conceptual level) describes what data is stored in the database and what relationships exist among that data. It hides the details of physical storage structures and concentrates on describing the entire database.
357
What is an insertion anomaly?
Answer:
The inability to insert data about one entity without inserting data about another unrelated entity.
An insertion anomaly occurs when you cannot add a new record to the database because a required attribute value is not yet known. For example, you cannot add a new course if no students are enrolled in it yet.
358
What does the `GROUP BY` clause do?
Answer:
It groups rows that have the same values into summary rows.
The `GROUP BY` statement groups rows that have the same values in specified columns into summary rows, like "find the number of customers in each country". It is often used with aggregate functions (`COUNT`, `MAX`, `MIN`, `SUM`, `AVG`).
359
A(n) _ is a collection of related data organized for easy access, management, updating, grouping, and summarizing.
Answer:
Database
A database is a structured set of data held in a computer, especially one that is accessible in various ways.
360
What is a key difference between the `DELETE` and `TRUNCATE` commands?
Answer:
`DELETE` can remove specific rows with a `WHERE` clause, while `TRUNCATE` removes all rows.
The primary functional difference is selectivity. `DELETE` can be used with a `WHERE` clause to remove specific rows, whereas `TRUNCATE` always removes all rows from the table without exception.