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
221
What feature enables record search in databases?
Answer:
Query
Queries allow users to extract specific data based on defined conditions. [cite: 288]
222
In an Entity-Relationship (ER) diagram, what does a rectangle represent?
Answer:
An entity set
In standard ER notation, a rectangle is used to represent an entity set, which is a collection of similar entities (e.g., a set of all students or all employees).
223
A `DOMAIN` constraint specifies the:
Answer:
Set of permissible values for a column.
Domain integrity ensures that all values in a column are from a defined set of valid values. This can be enforced using data types, CHECK constraints, and NOT NULL constraints.
224
In the terminology of the relational model, a single row of a table is also known as a:
Answer:
Tuple
In the formal relational model, a row is called a tuple. It represents a single, implicitly structured data item in a table.
225
To remove all records from a table named 'Sales' without deleting the table structure itself, which command is generally the most efficient?
Answer:
`TRUNCATE TABLE Sales;`
`TRUNCATE TABLE` is a DDL command that quickly removes all rows from a table. It is much faster than `DELETE` because it doesn't log each row deletion and typically cannot be rolled back.
226
A field or a collection of fields in a table that uniquely identifies each record is called a:
Answer:
Primary Key
The primary key is a special relational database table column (or set of columns) designated to uniquely identify all table records. A primary key’s main features are that it must contain a unique value for each row of data and it cannot contain null values.
227
What key links records from one database table to another?
Answer:
Foreign key
A foreign key is a key in one table that refers to the primary key in another table, creating a link or relationship between them.
228
Information can be transferred between the DBMS and a:
Answer:
All of the above
Most modern Database Management Systems are designed for interoperability. They typically provide export and import functions that allow data to be easily transferred to and from other types of applications, including spreadsheets, word processors, and graphics programs.
229
To remove specific rows from a table that meet a certain condition, you would use the:
Answer:
`DELETE` command
The `DELETE` command is a DML statement used to remove one or more rows from a table. A `WHERE` clause is used to specify a condition to select the rows to be deleted.
230
What is the purpose of the `AS` keyword in an SQL statement?
Answer:
To create an alias for a table or column.
The `AS` keyword is used to assign a temporary, more readable name (an alias) to a column or table in the result set of a query. This is particularly useful for columns with aggregate functions or for long table names.