17 Lecture
CS101
Midterm & Final Term Short Notes
Database Systems
A database system is a collection of data that is organized and managed to meet the information needs of an organization. It is a crucial component of most modern applications, providing a way to store and retrieve data efficiently and effective
Important Mcq's
Midterm & Finalterm Prepration
Past papers included
Download PDF
Which of the following is a popular database management system? A) MySQL B) Photoshop C) Microsoft Word D) Google Chrome Answer: A) MySQL
Which of the following is not a type of database model? A) Relational model B) Object-oriented model C) Hierarchical model D) Sequential model Answer: D) Sequential model
Which of the following is a type of join in SQL? A) Standalone join B) Inner join C) Random join D) Dynamic join Answer: B) Inner join
Which of the following SQL statements is used to create a new table? A) INSERT INTO B) DELETE FROM C) CREATE A TABLE D) UPDATE Answer: C) CREATE TABLE
What is the purpose of a primary key in a table? A) To ensure data consistency B) To enforce data validation rules C) To uniquely identify each record in the table D) To prevent unauthorized access to the table Answer: C) To uniquely identify each record in the table
Which of the following is a characteristic of a database transaction? A) It must be committed before it can be rolled back B) It must be rolled back before it can be committed C) It must be both committed and rolled back at the same time D) It must be committed or rolled back based on user input Answer: A) It must be committed before it can be rolled back
What is the purpose of the WHERE clause in an SQL query? A) To specify the order in which the results should be displayed B) To specify the columns to be displayed in the results C) To filter the results based on a condition D) To group the results based on a common attribute Answer: C) To filter the results based on a condition
Which of the following is a type of data inconsistency that can occur in a database? A) Primary key inconsistency B) Foreign key inconsistency C) Data type inconsistency D) All of the above Answer: D) All of the above
Which of the following is not a commonly used database model? A) Relational model B) Object-oriented model C) Hierarchical model D) Circular model Answer: D) Circular model
Which of the following SQL statements is used to modify data in a table? A) INSERT INTO B) DELETE FROM C) ALTER TABLE D) UPDATE Answer: D) UPDATE
Subjective Short Notes
Midterm & Finalterm Prepration
Past papers included
Download PDF
What is a data model? Answer: A data model is a conceptual representation of the data that is stored in a database. It defines the structure, relationships, and constraints of the data.
What is the most widely used data model in modern database systems? Answer: The relational model is the most widely used data model in modern database systems.
What is a database management system (DBMS)? Answer: A DBMS is a software system that manages the storage, retrieval, and manipulation of data in a database.
What is data integrity? Answer: Data integrity refers to the accuracy and consistency of the data in a database. It is maintained through a set of constraints that ensure that the data meets certain standards.
What is a primary key constraint? Answer: A primary key constraint ensures that each record in a table is uniquely identified by a specific attribute or set of attributes.
What is a foreign key constraint? Answer: A foreign key constraint ensures that the relationship between two tables is maintained, by requiring that a record in one table must exist in another table.
What is a check constraint? Answer: A check constraint ensures that the data in a table meets a specific set of criteria, such as a range of values or a pattern.
What is data normalization? Answer: Data normalization is the process of organizing data in a database to reduce redundancy and improve data consistency.
What is a first normal form (1NF)? Answer: In the first normal form, each table has a primary key, and all attributes in the table are atomic, meaning they cannot be further broken down.
What is third normal form (3NF)? Answer: In third normal form, each attribute in a table is dependent only on the primary key, and not on any other attributes in the table.