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
311
Which command is used to add, delete, or modify columns in an existing table?
Answer:
`ALTER TABLE`
The `ALTER TABLE` command is a DDL statement used to change the structure of an existing table, such as adding a column, dropping a column, or changing a column's data type.
312
Which key uniquely identifies database records without referring to other data?
Answer:
Candidate Key
A candidate key can uniquely identify rows in a table; [cite: 300] [cite_start]one of them is chosen as the primary key. [cite: 301]
313
A key characteristic of a database system is that the data is integrated and:
Answer:
Shared
A fundamental principle of the database approach is that data is a shared resource. It is integrated into a single repository that can be accessed by many different users and applications throughout an organization.
314
The model for a record management system might be:
Answer:
All of above
A record management system is designed to digitally replicate real-world methods of organizing information. Therefore, its logical model could be based on simple structures like a handwritten list, a Rolodex, or a more complex business form.
315
Which SQL keyword is used to sort the result-set of a query in ascending or descending order?
Answer:
`ORDER BY`
The `ORDER BY` clause is used to sort the records in the result set. By default, it sorts in ascending order (`ASC`), but it can be specified to sort in descending order (`DESC`).
316
Which data model uses the concept of 'owners' and 'members' to describe relationships?
Answer:
Network model
In the CODASYL network model, relationships (called sets) are defined between two record types: an 'owner' record type and a 'member' record type. This structure allows for the representation of many-to-many relationships.
317
Which DCL command would a database administrator use to give a user permission to perform `SELECT` operations on a table?
Answer:
`GRANT SELECT ON table_name TO user;`
The `GRANT` command is the standard DCL statement used to provide specific privileges (like `SELECT`, `INSERT`, `UPDATE`, etc.) on database objects to users or roles.
318
Which constraint ensures that all entries in a specific column must have a value and cannot be left empty?
Answer:
NOT NULL
The `NOT NULL` constraint enforces that a column cannot accept NULL values. This means that a value must be entered for that column when a new record is inserted or an existing record is updated.
319
Which operator combines the result-set of two or more SELECT statements but removes duplicate rows?
Answer:
UNION
The `UNION` operator is used to combine the result sets of two or more SELECT statements. It returns all unique rows selected by each query. `UNION ALL` performs the same function but includes all duplicate rows.
320
What does the 'Isolation' property of ACID guarantee?
Answer:
Transactions are processed in a serialized manner, even if executed concurrently.
Isolation ensures that the concurrent execution of transactions results in a system state that would be obtained if transactions were executed serially, one after the other. It prevents transactions from interfering with each other.