MySQL Test 1 – DBMS and RDBMS Concepts
In this lesson: Free online DBMS/RDBMS test — 50 marks, timer, instant result and answer review. Check your preparation now. In Hindi & English.
MySQL Test 1 – DBMS and RDBMS Concepts (50 Marks)
Question Palette
Green = answered, Purple = review, White = not answered.
Answer key with explanations
Attempt the test and submit it first, then use this key to revise. Each answer has a short explanation so you understand why it is correct.
Show all 50 answers
- What is a DBMS?
Answer: B. Software to create, store, manage and query databases – A Database Management System (MySQL, Oracle, PostgreSQL) lets users define, store, retrieve and protect data.
- Which is an advantage of a DBMS over a file system?
Answer: C. Reduced data redundancy and better consistency – A DBMS stores shared data once and enforces constraints, so copies do not go out of sync.
- In RDBMS, data is stored in the form of:
Answer: A. Tables (relations) – A relational database organises data into tables made of rows and columns.
- A row in a table is also called a:
Answer: C. Tuple – Row = tuple = record. Column = attribute = field.
- A column in a table is also called an:
Answer: D. Attribute – Each column describes one property (attribute) of the entity.
- The number of rows in a relation is called its:
Answer: D. Cardinality – Cardinality counts rows (tuples); degree counts columns (attributes).
- The number of columns in a relation is called its:
Answer: B. Degree – A table with columns RollNo, Name, Marks has degree 3.
- The set of allowed values for an attribute is called its:
Answer: D. Domain – Example: the domain of Gender could be {'M','F','O'}; the domain of Marks could be 0–100.
- Which key uniquely identifies each row and cannot be NULL?
Answer: D. Primary key – A primary key must be unique and NOT NULL; a table has only one primary key.
- All attributes or attribute sets that can uniquely identify a row are:
Answer: B. Candidate keys – From the candidate keys, one is chosen as primary key; the rest become alternate keys.
- A candidate key that is NOT chosen as primary key is called:
Answer: B. Alternate key – If RollNo is the primary key, AadhaarNo (also unique) is an alternate key.
- A column in one table that refers to the primary key of another table is a:
Answer: A. Foreign key – Foreign keys link tables, e.g. Marks.RollNo references Students.RollNo.
- A primary key made of two or more columns is called a:
Answer: B. Composite key – Example: (RollNo, Subject) together identify a row in a Marks table.
- A super key is:
Answer: A. Any set of attributes that uniquely identifies a row – Every candidate key is a minimal super key; adding extra columns to a key still gives a super key.
- Referential integrity ensures that:
Answer: D. A foreign key value matches an existing primary key value or is NULL – You cannot insert marks for a student RollNo that does not exist in Students.
- Which of these is NOT a DBMS model?
Answer: A. Spreadsheet model – Classic data models: hierarchical, network, relational, and object-oriented.
- The overall logical design of a database is called the:
Answer: D. Schema – Schema is the structure; instance is the data stored at a particular moment.
- The data stored in a database at a particular moment is called:
Answer: B. Instance – The instance changes with every insert/update/delete; the schema changes rarely.
- Data about data (table names, column types) is called:
Answer: A. Metadata – The data dictionary/information_schema stores metadata.
- Which level of data abstraction describes how data is physically stored?
Answer: B. Physical (internal) level – Three levels: physical, logical/conceptual, and view/external.
- Physical data independence means:
Answer: C. Changing storage structure without changing the logical schema – E.g. adding an index or moving files does not require changing application queries.
- In an ER diagram, an entity is shown by a:
Answer: B. Rectangle – Rectangle = entity, ellipse = attribute, diamond = relationship.
- In an ER diagram, a relationship is shown by a:
Answer: A. Diamond – Example: Student —<Enrolls>— Course.
- A Student can enrol in many Courses and a Course has many Students. The relationship is:
Answer: D. Many-to-many – M:N relationships are implemented with a separate linking table such as Enrollment(RollNo, CourseID).
- An attribute that can be calculated from other attributes (e.g. Age from DOB) is:
Answer: A. Derived attribute – Derived attributes are usually not stored; they are computed when needed.
- An attribute that can have several values for one entity (e.g. phone numbers) is:
Answer: B. Multivalued attribute – In a relational design, multivalued attributes are moved to a separate table.
- First Normal Form (1NF) requires that:
Answer: C. Every column holds atomic (single) values – A column like Subjects = 'Maths, Science' violates 1NF.
- A table is in 2NF if it is in 1NF and:
Answer: B. No non-key attribute depends on only part of a composite key – 2NF removes partial dependencies, which only arise with composite keys.
- 3NF removes which type of dependency?
Answer: B. Transitive dependency – If RollNo → PinCode and PinCode → City, then City depends transitively on RollNo; move it to a PinCode table.
- BCNF is a stricter form of:
Answer: D. 3NF – In BCNF, every determinant must be a candidate key.
- The main purpose of normalisation is to:
Answer: A. Reduce redundancy and update anomalies – Normalised tables avoid insert, update and delete anomalies.
- Deleting the last student of a course also deletes the course details. This is a:
Answer: A. Delete anomaly – It happens when unrelated facts are stored in the same table.
- Which property of a transaction means 'all or nothing'?
Answer: D. Atomicity – ACID: Atomicity, Consistency, Isolation, Durability.
- Which ACID property ensures committed data survives a power failure?
Answer: B. Durability – InnoDB writes a redo log so committed transactions are not lost.
- Which ACID property keeps concurrent transactions from seeing each other's uncommitted changes?
Answer: B. Isolation – Isolation levels (READ COMMITTED, REPEATABLE READ…) control this.
- Which of the following is an open-source RDBMS?
Answer: A. MySQL – MySQL (and MariaDB, PostgreSQL) are open-source relational database systems.
- The default storage engine in MySQL 8 is:
Answer: B. InnoDB – InnoDB supports transactions, row-level locking and foreign keys.
- Which storage engine does NOT support transactions?
Answer: B. MyISAM – MyISAM uses table-level locking and has no COMMIT/ROLLBACK.
- SQL stands for:
Answer: B. Structured Query Language – SQL is the standard language for relational databases.
- Which category of SQL commands defines structure (CREATE, ALTER, DROP)?
Answer: C. DDL – DDL = Data Definition Language.
- Which category includes INSERT, UPDATE and DELETE?
Answer: D. DML – DML = Data Manipulation Language.
- GRANT and REVOKE belong to:
Answer: D. DCL – DCL = Data Control Language, used for permissions.
- COMMIT, ROLLBACK and SAVEPOINT belong to:
Answer: D. TCL – TCL = Transaction Control Language.
- Which constraint prevents NULL values in a column?
Answer: C. NOT NULL – NOT NULL forces a value to be supplied for that column.
- Which constraint allows only distinct values but (in MySQL) permits multiple NULLs?
Answer: B. UNIQUE – Unlike PRIMARY KEY, a UNIQUE column can contain NULLs.
- A CHECK constraint is used to:
Answer: C. Allow only values that satisfy a condition – Example: CHECK (Marks BETWEEN 0 AND 100). MySQL enforces CHECK from version 8.0.16.
- A view in SQL is:
Answer: A. A virtual table based on a SELECT query – Views store the query, not the data; they simplify complex queries and hide columns.
- An index is mainly used to:
Answer: A. Speed up searching and sorting – Indexes make SELECT faster but add a small cost to INSERT/UPDATE.
- Which person is responsible for managing users, backups and performance of a database?
Answer: B. Database Administrator (DBA) – The DBA controls access, backups, tuning and recovery.
- Two tables are joined using a common column. In a good design this column is usually:
Answer: D. A primary key in one table and a foreign key in the other – PK–FK pairs define the relationship and keep data consistent.
