Computer Science - IT MCQs
Topic Notes: Computer Science - IT
<p>MCQs and preparation resources for competitive exams, covering important concepts, past papers, and detailed explanations.</p>
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
511
What is an insertion anomaly?
Answer:
The inability to insert data about one entity without inserting data about another unrelated entity.
An insertion anomaly occurs when you cannot add a new record to the database because a required attribute value is not yet known. For example, you cannot add a new course if no students are enrolled in it yet.
512
What does the `GROUP BY` clause do?
Answer:
It groups rows that have the same values into summary rows.
The `GROUP BY` statement groups rows that have the same values in specified columns into summary rows, like "find the number of customers in each country". It is often used with aggregate functions (`COUNT`, `MAX`, `MIN`, `SUM`, `AVG`).
513
A(n) _ is a collection of related data organized for easy access, management, updating, grouping, and summarizing.
Answer:
Database
A database is a structured set of data held in a computer, especially one that is accessible in various ways.
514
What is a key difference between the `DELETE` and `TRUNCATE` commands?
Answer:
`DELETE` can remove specific rows with a `WHERE` clause, while `TRUNCATE` removes all rows.
The primary functional difference is selectivity. `DELETE` can be used with a `WHERE` clause to remove specific rows, whereas `TRUNCATE` always removes all rows from the table without exception.
515
A DBMS that is not based on the relational model is often referred to as:
Answer:
NoSQL Database
NoSQL (meaning "Not only SQL") is a broad category of database management systems that do not use the relational model. This includes document, key-value, wide-column, and graph databases.
516
The SQL function `AVG()` returns the:
Answer:
Average value of a numeric column.
The `AVG()` aggregate function calculates the average value of a set of values in a numeric column.
517
A top-to-bottom relationship in a database is established by a:
Answer:
Hierarchical schema
The hierarchical data model organizes data in a tree-like structure. This creates clear parent-child, or top-to-bottom, relationships where each parent record can have multiple child records, but each child has only one parent.
518
Which database key links records from one table to another?
Answer:
Foreign key
A foreign key is a field in one table that uniquely identifies a row of another table, establishing a link between them.
519
An 'insertion anomaly' occurs when:
Answer:
You cannot insert a valid fact into the database unless another, unrelated fact is also added.
An insertion anomaly happens when you are unable to insert information about a new entity because a necessary related piece of information is missing. For example, being unable to add a new course until at least one student enrolls in it.
520
A transparent DBMS:
Answer:
Keeps its physical structure hidden from users
A key feature of a DBMS is physical data independence, often referred to as transparency. This means the DBMS hides the complex details of how and where the data is physically stored on disks, allowing users to interact with the data through a simpler, logical model.