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
1
A______________is a collection of data organized in a manner that allows access, retrieval and use of that data.
Answer:
Database
A database is a structured and organized collection of data stored electronically in a computer system. It is designed to be easily accessed, managed, updated, and retrieved, allowing for efficient data handling.
2
What is represented by a column in a database table?
Answer:
Characteristics
In a relational database table, a column represents a specific attribute or characteristic of the entity the table describes. For example, in a 'Students' table, columns might represent characteristics like 'FirstName', 'LastName', and 'StudentID'.
3
What types of language does SQL encompass?
Answer:
All of the above
SQL (Structured Query Language) is a comprehensive language for managing relational databases. It includes sublanguages for different tasks: Data Definition Language (DDL) for creating and modifying database structure (e.g., `CREATE TABLE`), Data Manipulation Language (DML) for adding, updating, and querying data (e.g., `SELECT`, `INSERT`), and Data Control Language (DCL) for managing permissions (e.g., `GRANT`).
4
What term describes the state of data in a database at a specific moment?
Answer:
Extension
In database terminology, the 'extension' (or database state) refers to the actual data contained in the database at a particular point in time. This is the set of all tuples (rows) in all relations (tables). The 'intension', by contrast, refers to the database schema or structure.
5
Under which circumstances is a 'batch processing' approach generally the most suitable method for data handling?
Answer:
When a significant volume of data transactions can be accumulated and processed together periodically.
Batch processing is a computing paradigm designed for efficiency when dealing with large volumes of data. It involves collecting and processing transactions or data records in groups (batches) at scheduled intervals rather than individually as they occur. This method reduces overhead associated with starting and stopping processes for each transaction, making it highly efficient for tasks like payroll processing, end-of-day banking reconciliations, or large-scale report generation, where immediate feedback is not critical. Option (a) describes real-time processing. Option (c) doesn't fully capture the essence as batch processing often runs on powerful systems, though it can be resource-efficient in its scheduling. Option (d) is incorrect because while data integrity is always important, batch processing inherently introduces delays compared to real-time systems.
6
Which of the following challenges is commonly associated with traditional file management systems, particularly concerning the relationship between data organization and application programs?
Answer:
Absence of data independence, requiring application changes for data structure modifications.
Traditional file management systems suffer from 'program-data dependence' or 'lack of data independence.' This means that the structure of the data files is tightly integrated with the application programs that access them. If the file structure (e.g., adding a new field, changing a data type) is modified, the application programs that interact with that file must also be updated to reflect these changes. This makes systems inflexible, difficult to maintain, and prone to errors. Other common problems include data redundancy (duplicate data stored in multiple files), data inconsistency (different versions of the same data), and difficulty in sharing data.
7
Which statement accurately describes a fundamental distinction between a `UNIQUE` constraint and a `PRIMARY KEY` constraint in a relational database?
Answer:
A column with a `PRIMARY KEY` constraint cannot contain `NULL` values, while a column with a `UNIQUE` constraint can typically contain one `NULL` value.
The core difference lies in their handling of `NULL` values and their role in table identification. A `PRIMARY KEY` constraint inherently enforces both uniqueness and non-nullability; no column participating in a primary key can contain `NULL` values. This ensures that every row can be uniquely identified. Conversely, a `UNIQUE` constraint ensures that all non-NULL values in the constrained column(s) are distinct. However, most database systems (e.g., SQL Server, MySQL, PostgreSQL, Oracle) allow a single `NULL` value within a column or set of columns under a `UNIQUE` constraint, as `NULL` is generally considered to be 'unknown' and thus not equal to any other value, including another `NULL`. While both typically create an index for performance (option A is often true but not the fundamental *distinction*), the `NULL` allowance is the key differentiator. A table can only have one `PRIMARY KEY` (which can be composite, spanning multiple columns), while it can have multiple `UNIQUE` constraints (invalidating option B). Option D is incorrect because their purposes, especially regarding `NULL`s and table identification, are distinct.
8
What is the meaning of the acronym DBMS?
Answer:
Database management system
DBMS stands for Database Management System. It is a software system that enables users to create, define, maintain, and control access to a database. It acts as an interface between the user and the database itself.
9
Which of the following best describes the fundamental purpose of a Database Management System (DBMS)?
Answer:
To manage and organize data by facilitating its storage, retrieval, manipulation, and ensuring its integrity.
A Database Management System (DBMS) serves a comprehensive role in an organization's data infrastructure. While it contributes to efficient storage and retrieval (part of option A), security (part of option C), and reducing redundancy (part of option D), its fundamental and encompassing purpose is to manage and organize data effectively. This includes defining data structures, storing data reliably, enabling easy retrieval and manipulation (updating, deleting), and critically, ensuring data integrity (accuracy, consistency, and validity) over time. Option B best captures this multifaceted objective, as it encompasses all these essential functions.
10
Which of the following statements does NOT describe a benefit typically associated with adopting a database management system (DBMS) approach to data storage and management?
Answer:
The inherent ability to recover or link to data that has been intentionally deleted.
Option A, 'Minimizing or eliminating redundant data storage,' is a core advantage of the database approach, as it centralizes data and reduces duplication. Option C, 'Enhancing the overall security and access control of data,' is also a significant benefit, as DBMSs provide robust mechanisms for permission management. Option D, 'Achieving separation between application programs and the data they access' (program/data independence), allows changes to the database schema without requiring extensive modifications to application code. Option B, 'The inherent ability to recover or link to data that has been intentionally deleted,' is not a standard, inherent advantage of the database approach. While database systems often have backup and recovery mechanisms, and sometimes transaction logs that can help in data recovery, the 'ability to associate deleted data' is not a primary design principle or inherent feature; once data is deleted, it's generally removed from the active dataset, and its recovery depends on specific backup and recovery procedures, not an 'inherent ability to associate' it.