Key Concepts
- 1What is the difference between Degree and Cardinality of a relation?
- 2What is a Primary Key?
- 3What is the difference between DDL and DML?
Important Formulas & Facts
Degree is the number of columns (attributes) in a relation/table. Cardinality is the number of rows (tuples) in a relation/table. Degree is a structural property that rarely changes; cardinality changes whenever rows are added or deleted.
A column (or minimal set of columns) that uniquely identifies each row in a table. It cannot contain NULL values, must be unique for every row, and each table can have only one primary key. Example: RollNo in a Student table.
DDL (Data Definition Language) defines and modifies the structure (schema) of database objects — commands: CREATE, ALTER, DROP. DML (Data Manipulation Language) manipulates the actual data stored in tables — commands: INSERT, UPDATE, DELETE, SELECT.
Must-Know Questions
Q1What is a Database Management System (DBMS)?
A DBMS is software that manages databases, allowing users to create, read, update, and delete data while providing security, integrity, and concurrent access.
Q2Which of the following is an example of a Relational Database Management System (RDBMS)?
MySQL is a widely used RDBMS that stores data in tables with rows and columns. MS Word is a word processor, Python is a programming language, and MS Paint is a graphics tool.
Q3The number of columns in a relation is called its:
Degree refers to the number of attributes (columns) in a relation. For example, a table with 5 columns has a degree of 5.
Q4The number of rows (tuples) in a relation is called its:
Cardinality refers to the number of tuples (rows) present in a relation at any given point in time. It changes as records are inserted or deleted.
Q5Which type of key uniquely identifies each row in a table and cannot contain NULL values?
A Primary Key uniquely identifies each record in a table. It must be unique for every row and cannot be NULL. Every table should have exactly one primary key.
Practice Database Concepts
Reinforce what you just revised with practice questions