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
331
In which data model is data organized in a tree-like structure, where each record has one parent and can have many children?
Answer:
Hierarchical Model
The hierarchical model organizes data into a tree structure with a single root, to which all other data is linked. The hierarchy starts from the root data, and expands like a tree, adding child nodes to the parent nodes.
332
For a database table to be in Second Normal Form (2NF), it must first satisfy the requirements of:
Answer:
First Normal Form (1NF)
The normal forms are progressive. A table must be in 1NF before it can be considered for 2NF. Likewise, it must be in 2NF before it can be considered for 3NF, and so on.
333
What does the 'Durability' property of ACID ensure?
Answer:
The effects of a committed transaction are permanent.
Durability guarantees that once a transaction has been committed, it will remain so, even in the event of power loss, crashes, or errors. The changes are permanently stored on non-volatile memory.
334
What is the purpose of an index on a table?
Answer:
To speed up data retrieval operations.
An index is a special lookup table that the database search engine can use to speed up data retrieval. It works like an index in a book; instead of searching the entire table, the database can use the index to find the location of the rows that match the query criteria.
335
What is the difference between DELETE and TRUNCATE?
Answer:
TRUNCATE removes all rows from a table, while DELETE can remove one or more rows.
The DELETE command is a DML command that can remove specific rows based on a WHERE clause (or all rows if no clause is used). TRUNCATE is a DDL command that quickly removes all rows from a table and typically cannot be rolled back.
336
What is a primary key?
Answer:
A key that uniquely identifies each record in a table.
A primary key is a constraint that uniquely identifies each record in a database table. It must contain unique values for each row of data and cannot contain NULL values. A table can have only one primary key.
337
Which database professional is primarily responsible for designing and implementing the database?
Answer:
Database Designer
The Database Designer is responsible for identifying the data to be stored and for choosing appropriate structures to represent and store this data. The DBA is more focused on managing the database system after it has been designed.
338
Which database function allows you to define the data your database stores?
Answer:
Data dictionary
While the Data Definition Language (DDL) is used to define the structure, the data dictionary stores these definitions and metadata about the database.
339
Which of the following is an example of an RDBMS?
Answer:
MySQL
MySQL is a popular open-source relational database management system that uses structured query language (SQL). MongoDB, Cassandra, and Redis are examples of NoSQL databases, which use different data models.
340
What tool would you use in a database to find answers to your questions about data?
Answer:
Queries
Queries are requests used to retrieve specific data from a database based on defined criteria or questions.