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
111
What is metadata?
Answer:
Data about data.
Metadata is the data that provides information about other data. In a database context, it describes the structure of the database, such as table names, column names, data types, and constraints, which helps in understanding and managing the actual data.
112
Which data model organizes data in a tree-like structure?
Answer:
Hierarchical model
The hierarchical model structures data into a tree with parent and child nodes. Each parent can have multiple children, but each child can have only one parent, resembling an organizational chart or a family tree.
113
Which constraint would you use to validate that the 'Grade' column in a student table only accepts values from 'A', 'B', 'C', 'D', 'F'?
Answer:
CHECK
The `CHECK` constraint is used to limit the value range that can be placed in a column. It enforces domain integrity by ensuring that all values in a column satisfy a certain condition or a set of conditions.
114
A database table can have how many foreign keys?
Answer:
Multiple
A table can have multiple foreign keys. Each foreign key establishes a relationship with another table (or sometimes the same table), so a single table can be related to many other tables.
115
Which SQL clause is used to filter the results of a query based on a specified condition?
Answer:
WHERE
The `WHERE` clause is used to extract only those records that fulfill a specified condition. It is used to filter rows before any groupings are made.
116
Sort/Report generators:
Answer:
Require more disk space than indexed/report generators
Sort/report generators often require additional temporary disk space to perform the sorting operation on the data before the final report can be generated. Indexed generators can often produce reports more efficiently by using existing indexes.
117
Which DCL command is used to take away previously granted permissions from a user?
Answer:
`REVOKE`
The `REVOKE` command is the DCL statement that is used to withdraw access privileges or permissions that were previously given to a user or role using the `GRANT` command.
118
Which data model forms the basis for the vast majority of modern database systems, including MySQL, Oracle, and SQL Server?
Answer:
Relational Model
The relational model, due to its simplicity, flexibility, and solid theoretical foundation, became the dominant data model for commercial data processing and is the foundation for almost all modern DBMS.
119
In the relational model, what is a relation?
Answer:
A table of data.
In the relational model, the formal term for a table is a relation. A relation is a two-dimensional structure composed of tuples (rows) and attributes (columns) that stores data about a specific entity.
120
A user-defined constraint is typically implemented using which constraint type?
Answer:
CHECK
The CHECK constraint is the most flexible for implementing custom business rules and user-defined integrity constraints, as it validates data based on a logical expression.