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
4731
If you try to insert a row with a primary key value that already exists, the database will:
Answer:
Reject the insertion due to a constraint violation.
The primary key constraint enforces uniqueness. Attempting to insert a duplicate value will result in an error, and the operation will be aborted to maintain entity integrity.
4732
Which of the following is a TCL command?
Answer:
ROLLBACK
TCL stands for Transaction Control Language. Its commands are used to manage transactions in the database. ROLLBACK is a TCL command that undoes transactions or changes that have not yet been saved to the database.
4733
Which SQL command is used to create a new table in a database?
Answer:
`CREATE TABLE`
The `CREATE TABLE` command is a Data Definition Language (DDL) statement used to define a new table and specify its columns and their data types.
4734
Which of the following fields in a student file can be used as a primary key?
Answer:
Social Security Number
A primary key must be a unique identifier for each record in a table. Fields like Class, GPA, or Major can have duplicate values for different students. A Social Security Number, however, is unique to each individual and therefore serves as an excellent primary key.
4735
If a table has only one non-key attribute, it is guaranteed to be in at least which normal form (assuming it's in 1NF)?
Answer:
3NF
With only one non-key attribute, there can be no transitive dependency (a non-key depending on another non-key). If the table has a single-attribute primary key, it is also in 2NF. Therefore, it is guaranteed to be in at least 3NF.
4736
Which set of language categories accurately describes the primary functions within Structured Query Language (SQL)?
Answer:
Data Definition Language (DDL), Data Manipulation Language (DML), and Data Control Language (DCL)
SQL (Structured Query Language) is a powerful language designed for managing and manipulating relational databases. It is functionally divided into several sub-languages, each serving a distinct purpose:
* **Data Definition Language (DDL):** This includes commands used to define, alter, and drop database structures. Examples include `CREATE TABLE`, `ALTER TABLE`, and `DROP DATABASE`.
* **Data Manipulation Language (DML):** This set of commands is used for managing data within schema objects. Common DML commands are `SELECT` (to retrieve data), `INSERT` (to add new data), `UPDATE` (to modify existing data), and `DELETE` (to remove data).
* **Data Control Language (DCL):** These commands are used to control access to data and the database. Examples include `GRANT` (to give user privileges) and `REVOKE` (to remove user privileges).
While Transaction Control Language (TCL) (e.g., `COMMIT`, `ROLLBACK`) is also an important part of SQL, DDL, DML, and DCL represent the fundamental and most commonly recognized categories of SQL's capabilities. Option A correctly lists these three core components.
4737
The person responsible for the overall design, implementation, and maintenance of a database is called a:
Answer:
Database Administrator (DBA)
The Database Administrator, or DBA, is the professional responsible for managing and maintaining the database environment, including security, performance, backups, and recovery.
4738
A form is defined by:
Answer:
Where data is placed on the screen
In the context of a database, a form primarily serves as a user interface for data entry and viewing. Its definition controls the layout and placement of data fields on the screen to create an intuitive user experience.
4739
The `CREATE`, `ALTER`, and `DROP` commands all belong to which category of SQL statements?
Answer:
Data Definition Language (DDL)
DDL commands are used to define and manage the database schema. `CREATE` builds objects, `ALTER` modifies them, and `DROP` deletes them.
4740
In the DBMS approach, application programs perform the:
Answer:
Processing functions
In a modern database architecture, the DBMS itself is responsible for low-level tasks like data storage and access control. Application programs are built on top of the DBMS to perform the specific business logic and processing functions required by the user.