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
321
A partial dependency, which is eliminated in 2NF, can only exist in tables that have:
Answer:
A composite primary key (a primary key made of two or more attributes).
A partial dependency occurs when a non-key attribute is functionally dependent on only a part of the composite primary key. If the primary key is a single attribute, a partial dependency cannot exist.
322
Which of the following is a DCL command?
Answer:
GRANT
DCL stands for Data Control Language. Its commands are used to control access and grant permissions to database users. GRANT is a DCL command used to give users privileges to access or perform operations on the database.
323
The ascending order of a data hierarchy is:
Answer:
Bit-byte-field-record-file-database
Data is organized in a hierarchy starting from the smallest unit. A bit is the smallest unit, 8 bits form a byte (a character), bytes are grouped into fields (e.g., a name), fields are grouped into a record (e.g., a customer's information), records are collected into a file, and related files form a database.
324
Which of the following is considered a legacy database system based on a pre-relational model?
Answer:
IMS (Information Management System)
IMS is an early hierarchical database management system developed by IBM. It is considered a legacy system, predating the now-dominant relational model used by systems like Oracle and MySQL.
325
Data Warehousing provides:
Answer:
Storage, functionality, and query responsiveness
Data warehouses are optimized for storing vast amounts of data, providing analytical functionality, and responding quickly to complex queries.
326
Which of the following is a procedural language?
Answer:
Relational Algebra
Relational algebra is a procedural query language. It provides a set of operations that take one or two relations as input and produce a new relation as their result. The user specifies the steps or procedures to get the required result.
327
The `BETWEEN` operator is used to:
Answer:
Select values within a given range.
The `BETWEEN` operator selects values within a given range. The values can be numbers, text, or dates. The range is inclusive, meaning the begin and end values are included.
328
Which DDL command is used to add a new column to a table?
Answer:
`ALTER TABLE table_name ADD COLUMN ...`
The `ALTER TABLE` statement is used to modify an existing table's structure. The `ADD COLUMN` clause is used with `ALTER TABLE` to add a new column.
329
Which constraint is a combination of `NOT NULL` and `UNIQUE`?
Answer:
PRIMARY KEY
A PRIMARY KEY constraint is essentially a UNIQUE constraint and a NOT NULL constraint combined. It enforces that the values in the column(s) are both unique and not null.
330
What is a transitive dependency?
Answer:
A dependency where a non-key attribute depends on another non-key attribute.
A transitive dependency occurs in a relation when a non-prime attribute is functionally dependent on another non-prime attribute. This indirect dependency (e.g., A → B and B → C, where A is the key) is what 3NF aims to eliminate.