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
101
Which of the following can contain duplicate values?
Answer:
Foreign Key
A foreign key column can contain duplicate values. For instance, in a `Orders` table, the `CustomerID` (a foreign key) can appear multiple times if one customer places multiple orders.
102
In a 2-tier architecture, the application logic is typically embedded in the:
Answer:
Client machine
In a standard client-server (2-tier) architecture, the client machine handles both the user interface (presentation) and the business logic (application), while the server machine manages the data storage.
103
Which SQL statement is used to delete data from a database?
Answer:
DELETE
The DELETE statement is the standard DML command used to remove one or more existing records from a table. A WHERE clause can be used to specify which records to delete.
104
The relational model is based on which mathematical concept?
Answer:
Set theory and first-order predicate logic
The relational model is rigorously founded on the mathematical concepts of set theory and predicate logic. A relation is defined as a set of tuples (rows), and operations on these relations are based on relational algebra and calculus.
105
What is the main building block of the network model?
Answer:
Records and sets
The network model's structure is built upon two fundamental concepts: records, which contain the data fields, and sets, which define the one-to-many relationships between different record types.
106
The main purpose of keys and constraints in a database is to:
Answer:
Enforce data integrity and business rules.
While keys can help with performance via indexing, their primary purpose is to model relationships and enforce the accuracy, consistency, and validity of data according to predefined business rules.
107
In the context of a relational database, what fundamental component is used to define a specific type of data or characteristic for each entry in a table?
Answer:
A column (or field), which describes an attribute common to all records.
In a relational database table, a column, also known as a field, serves to define a specific attribute or characteristic that is common to every record (row) in that table. For instance, in a 'Customers' table, columns might be 'CustomerID', 'FirstName', 'LastName', and 'Email'. Each of these columns describes a particular type of information about each customer. Options A, B, and D describe other crucial database components: a row is a single record, a table is the entire structure, and a primary key is a specific type of column used for unique identification, but the general concept of a specific data type or characteristic is represented by a column.
108
An attribute that can be calculated from other attributes is called a:
Answer:
Derived attribute
A derived attribute is an attribute whose value can be computed or derived from the values of other attributes. For example, a person's `Age` can be derived from their `DateOfBirth`.
109
A data model that combines the features of the relational model with concepts from object-oriented programming, such as user-defined types and inheritance, is called the:
Answer:
Object-Relational Model
The Object-Relational Model (ORM) is a hybrid model that aims to bridge the gap between relational databases and object-oriented programming languages by adding object-oriented features to a relational database system.
110
What is an audit trail?
Answer:
The recorded history of operations performed on a file
An audit trail, or log, is a chronological record of all operations and changes made to a file or database. This history is crucial for security, accountability, and for tracking how data has been modified over time.