MySQL Test 1 – DBMS और RDBMS Concepts (50 Marks)
MySQL Test 1 – DBMS and RDBMS Concepts (50 Marks) Hindi Instructions
MySQL Test 1 – DBMS and RDBMS Concepts (50 Marks)
Question Palette
Green = answered, Purple = review, White = not answered.
उत्तर कुंजी और व्याख्या
पहले test पूरा करें और submit करें, फिर अपने उत्तर यहाँ मिलाएँ। हर उत्तर के साथ छोटा explanation है ताकि ग़लती का कारण समझ आए।
सभी 50 उत्तर दिखाएँ
- What is a DBMS?
उत्तर: 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?
उत्तर: 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:
उत्तर: A. Tables (relations) – A relational database organises data into tables made of rows and columns.
- A row in a table is also called a:
उत्तर: C. Tuple – Row = tuple = record. Column = attribute = field.
- A column in a table is also called an:
उत्तर: D. Attribute – Each column describes one property (attribute) of the entity.
- The number of rows in a relation is called its:
उत्तर: D. Cardinality – Cardinality counts rows (tuples); degree counts columns (attributes).
- The number of columns in a relation is called its:
उत्तर: B. Degree – A table with columns RollNo, Name, Marks has degree 3.
- The set of allowed values for an attribute is called its:
उत्तर: 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?
उत्तर: 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:
उत्तर: 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:
उत्तर: 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:
उत्तर: 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:
उत्तर: B. Composite key – Example: (RollNo, Subject) together identify a row in a Marks table.
- A super key is:
उत्तर: 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:
उत्तर: 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?
उत्तर: A. Spreadsheet model – Classic data models: hierarchical, network, relational, and object-oriented.
- The overall logical design of a database is called the:
उत्तर: 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:
उत्तर: B. Instance – The instance changes with every insert/update/delete; the schema changes rarely.
- Data about data (table names, column types) is called:
उत्तर: A. Metadata – The data dictionary/information_schema stores metadata.
- Which level of data abstraction describes how data is physically stored?
उत्तर: B. Physical (internal) level – Three levels: physical, logical/conceptual, and view/external.
- Physical data independence means:
उत्तर: 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:
उत्तर: B. Rectangle – Rectangle = entity, ellipse = attribute, diamond = relationship.
- In an ER diagram, a relationship is shown by a:
उत्तर: A. Diamond – Example: Student —<Enrolls>— Course.
- A Student can enrol in many Courses and a Course has many Students. The relationship is:
उत्तर: 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:
उत्तर: 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:
उत्तर: B. Multivalued attribute – In a relational design, multivalued attributes are moved to a separate table.
- First Normal Form (1NF) requires that:
उत्तर: 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:
उत्तर: 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?
उत्तर: 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:
उत्तर: D. 3NF – In BCNF, every determinant must be a candidate key.
- The main purpose of normalisation is to:
उत्तर: 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:
उत्तर: A. Delete anomaly – It happens when unrelated facts are stored in the same table.
- Which property of a transaction means 'all or nothing'?
उत्तर: D. Atomicity – ACID: Atomicity, Consistency, Isolation, Durability.
- Which ACID property ensures committed data survives a power failure?
उत्तर: 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?
उत्तर: B. Isolation – Isolation levels (READ COMMITTED, REPEATABLE READ…) control this.
- Which of the following is an open-source RDBMS?
उत्तर: A. MySQL – MySQL (and MariaDB, PostgreSQL) are open-source relational database systems.
- The default storage engine in MySQL 8 is:
उत्तर: B. InnoDB – InnoDB supports transactions, row-level locking and foreign keys.
- Which storage engine does NOT support transactions?
उत्तर: B. MyISAM – MyISAM uses table-level locking and has no COMMIT/ROLLBACK.
- SQL stands for:
उत्तर: B. Structured Query Language – SQL is the standard language for relational databases.
- Which category of SQL commands defines structure (CREATE, ALTER, DROP)?
उत्तर: C. DDL – DDL = Data Definition Language.
- Which category includes INSERT, UPDATE and DELETE?
उत्तर: D. DML – DML = Data Manipulation Language.
- GRANT and REVOKE belong to:
उत्तर: D. DCL – DCL = Data Control Language, used for permissions.
- COMMIT, ROLLBACK and SAVEPOINT belong to:
उत्तर: D. TCL – TCL = Transaction Control Language.
- Which constraint prevents NULL values in a column?
उत्तर: 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?
उत्तर: B. UNIQUE – Unlike PRIMARY KEY, a UNIQUE column can contain NULLs.
- A CHECK constraint is used to:
उत्तर: 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:
उत्तर: 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:
उत्तर: 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?
उत्तर: 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:
उत्तर: D. A primary key in one table and a foreign key in the other – PK–FK pairs define the relationship and keep data consistent.
