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
121
An attribute that is part of a candidate key is called a:
Answer:
Prime attribute
In normalization terminology, any attribute that is part of any candidate key of a relation is called a prime attribute. An attribute that is not part of any candidate key is a non-prime attribute.
122
A 'weak entity' is an entity that:
Answer:
Cannot be uniquely identified by its attributes alone.
A weak entity does not have a primary key of its own and depends on the existence of another 'strong' or 'owner' entity. Its identifier is formed by combining its own partial key with the primary key of the owner entity.
123
Which type of JOIN returns all rows from the left table and the matched rows from the right table?
Answer:
LEFT JOIN (or LEFT OUTER JOIN)
A `LEFT JOIN` returns all records from the left table (table1), and the matched records from the right table (table2). The result is NULL from the right side if there is no match.
124
What is the main difference between a PRIMARY KEY and a UNIQUE constraint?
Answer:
A primary key cannot have NULL values, while a unique key can have one NULL value.
Both enforce uniqueness. However, a PRIMARY KEY constraint automatically has a NOT NULL constraint, so it cannot be NULL. A UNIQUE constraint, by default in most SQL systems, allows for one (and only one) row to have a NULL value. Also, a table can only have one primary key, but multiple unique constraints.
125
Which command would you use to change the data type of a column in an existing table?
Answer:
`ALTER TABLE`
The `ALTER TABLE` statement is a DDL command used to add, delete, or modify columns in an existing table. You would use `ALTER TABLE ... MODIFY COLUMN` or a similar syntax depending on the specific SQL dialect.
126
An MIS structure with one main computer system is known as:
Answer:
Centralized MIS structure
A centralized Management Information System (MIS) architecture is characterized by its reliance on a single, main computer system for all data processing, storage, and management tasks.
127
Which SQL statement is used to extract data from a database?
Answer:
SELECT
The SELECT statement is the primary command used for querying a database. It allows you to retrieve data from one or more tables based on criteria that you specify.
128
The command to take back a permission from a user is:
Answer:
`REVOKE`
`REVOKE` is a DCL command that removes user access rights or privileges to database objects that were previously granted using the `GRANT` command.
129
Changing cardinalities in a database is:
Answer:
A common database design task
Modifying relationship cardinalities (e.g., one-to-one to one-to-many) is a standard part of evolving and refining a database schema.
130
Which level of data abstraction describes *how* the data is actually stored on the storage device?
Answer:
Physical Level
The physical level is the lowest level of data abstraction and describes the complex low-level data structures and storage details. It defines how data is physically stored on disk.