Skip to content
GK24
GK NotesComputer AwarenessDatabases and DBMS

Databases and DBMS: Models, Keys, SQL and Normalisation

Notes on databases and DBMS for exams: data models, tables and keys, SQL command groups, normalisation, ACID properties and popular database software.

By · Published · 4 min read

Databases and DBMS: Models, Keys, SQL and Normalisation — GK24 title card
Databases and DBMS: Models, Keys, SQL and Normalisation — GK24 title card

A database is an organised collection of related data that a computer can store, search and update without losing its structure. A Database Management System (DBMS) is the software that sits between the user and that stored data: it creates the database, accepts queries, enforces rules and returns results. Examiners in banking, SSC and railway papers treat this chapter as pure definition work, so the marks go to students who know the vocabulary exactly.

Why a DBMS replaced file systems

Before database software, every program kept its own data file. The same address was typed into three files, one copy was corrected and the others were not, and no program could read another's file. A DBMS removes these faults. It reduces data redundancy, so a fact is stored once. It keeps data consistent, because one correction reaches every user. It shares data among many users at the same time through concurrency control. It protects data by giving each user only the rights the administrator grants. It also supports backup and recovery, so a power failure does not destroy the day's work. The cost is that a DBMS is large, needs trained staff and needs more memory than a simple file.

Data models, oldest to newest

A data model decides how records are joined to one another. The hierarchical model, used in IBM's IMS in the 1960s, is the oldest: records form a tree and each child has exactly one parent. The network model allows a child to have many parents, so it stores a graph. The relational model, proposed by Edgar Frank Codd in 1970, stores everything in simple two-dimensional tables and joins them by matching values, and it is the model behind almost every exam question. The object-oriented model stores objects with their methods and is the newest of the four.

The words for a table and its parts

Everyday wordRelational termMeaning
TableRelationThe whole two-dimensional structure
Row or recordTupleOne complete entry, such as one student
Column or fieldAttributeOne property, such as roll number
Number of columnsDegreeCounted on the attributes
Number of rowsCardinalityCounted on the tuples
Allowed valuesDomainThe set a column may draw from

Keys: the heart of the chapter

  • Super key: any set of attributes that identifies a row uniquely.
  • Candidate key: a minimal super key, with no spare attribute in it.
  • Primary key: the candidate key the designer chooses; it can never be null and never repeat.
  • Alternate key: a candidate key that was not chosen as the primary key.
  • Composite key: a primary key made of two or more columns together.
  • Foreign key: a column that holds values of another table's primary key and so links the two tables.

SQL and its four command groups

Structured Query Language is the standard language of relational databases. It was created at IBM in the 1970s as SEQUEL and is a non-procedural language: the user states what is wanted, not how to fetch it. Its commands fall into groups that papers ask by name. DDL, the Data Definition Language, changes structure: CREATE, ALTER, DROP, TRUNCATE and RENAME. DML, the Data Manipulation Language, changes or reads the rows: INSERT, UPDATE, DELETE and SELECT. DCL, the Data Control Language, handles rights with GRANT and REVOKE. TCL, the Transaction Control Language, closes or undoes a transaction with COMMIT, ROLLBACK and SAVEPOINT. Remember the trap: DELETE removes chosen rows and can be rolled back, while TRUNCATE empties the whole table as a structural command.

Normalisation and the ACID properties

Normalisation splits a large table into smaller ones so that the same fact is not repeated and an update cannot leave the database half correct. First normal form removes repeating groups and keeps every value atomic. Second normal form removes partial dependency on part of a composite key. Third normal form removes transitive dependency, where a non-key column depends on another non-key column. Boyce-Codd normal form is a stricter form of the third. A transaction, meanwhile, must satisfy four properties known by the word ACID: atomicity, so all its steps happen or none do; consistency, so the database moves from one valid state to another; isolation, so parallel transactions do not disturb each other; and durability, so a committed change survives a crash.

Software students should be able to name

Oracle, MySQL, PostgreSQL, Microsoft SQL Server, IBM Db2 and SQLite are relational systems; Microsoft Access is the desktop DBMS bundled with Office. MongoDB is a NoSQL system that stores documents instead of rows and is asked as the odd one out. The person who designs and maintains the whole system is the Database Administrator, and the diagram that shows entities, attributes and relationships before a table is built is the Entity Relationship diagram, drawn with rectangles for entities, ovals for attributes and diamonds for relationships.

Exam Point of View

Papers ask this chapter as vocabulary. Expect the oldest data model (hierarchical), the proposer of the relational model (E. F. Codd, 1970), the relational word for a row or a column, and the meaning of degree against cardinality. Key questions are certain: which key cannot be null, which key links two tables, and the difference between a candidate key and an alternate key. SQL is asked by command group, so fix CREATE and TRUNCATE as DDL, INSERT and SELECT as DML, GRANT and REVOKE as DCL, and COMMIT and ROLLBACK as TCL. The classic traps are DELETE against TRUNCATE, cardinality against degree, and picking MongoDB when the question asks for a relational system. One-mark full forms of DBMS, RDBMS, SQL, DDL, DML and ACID are almost free marks.

Important Facts

Full form of DBMSDatabase Management System
Oldest data modelHierarchical model (used in IBM IMS)
Relational model proposed byEdgar Frank Codd, in 1970
Row and column in relational termsRow is a tuple, column is an attribute
Degree and cardinalityDegree is the number of attributes, cardinality the number of tuples
Key that cannot be nullPrimary key
Key that links two tablesForeign key
DDL commandsCREATE, ALTER, DROP, TRUNCATE, RENAME
DML commandsINSERT, UPDATE, DELETE, SELECT
DCL commandsGRANT, REVOKE
TCL commandsCOMMIT, ROLLBACK, SAVEPOINT
ACIDAtomicity, Consistency, Isolation, Durability
NoSQL document databaseMongoDB
Desktop DBMS in MS OfficeMicrosoft Access

Practice MCQs on this topic

Q1.Computer AwarenessAsked in: Delhi · 7 Aug 2021, Shift 2Easy

Which of the following is the oldest database model?

  1. A.Hierarchical
  2. B.Object oriented
  3. C.Deductive
  4. D.Relational
Show answer

Correct answer: A. Hierarchical

Explanation

The correct answer is A, hierarchical. The hierarchical model is the first data model used in commercial database software; IBM built its Information Management System on it in the 1960s for the Apollo programme. It arranges records as a tree in which every child record has exactly one parent, so data is reached by moving down a path from the root. Option B is wrong because the object oriented model, which stores objects together with their methods, is the newest of the four and belongs to the late 1980s. Option C is wrong because the deductive model, which adds logical rules to stored facts, came even later and remains mostly a research model. Option D is wrong because the relational model was proposed by Edgar Frank Codd in 1970, after the hierarchical and network models were already in use, though it later replaced both in practice.

Q2.Computer AwarenessMedium

Who proposed the relational model of databases?

  1. A.Charles Babbage
  2. B.Edgar Frank Codd
  3. C.Dennis Ritchie
  4. D.James Gosling
Show answer

Correct answer: B. Edgar Frank Codd

Explanation

The correct answer is B, Edgar Frank Codd. Codd, a British computer scientist working at IBM, set out the relational model in a paper published in 1970, proposing that all data be held in simple two-dimensional tables and joined by matching values rather than by fixed pointers. Every relational database, from Oracle to MySQL, rests on that idea, and he is therefore called the father of the relational database. Option A is wrong because Charles Babbage designed the Difference Engine and the Analytical Engine in the nineteenth century and is called the father of the computer. Option C is wrong because Dennis Ritchie developed the C language and, with Ken Thompson, the Unix operating system. Option D is wrong because James Gosling created the Java programming language at Sun Microsystems, which has nothing to do with the relational model.

Q3.Computer AwarenessEasy

In relational database terminology, a row of a table is called a:

  1. A.Attribute
  2. B.Domain
  3. C.Tuple
  4. D.Relation
Show answer

Correct answer: C. Tuple

Explanation

The correct answer is C, tuple. In the vocabulary of the relational model a table is a relation, and one complete horizontal entry of that table, such as all the details of a single student, is a tuple; the ordinary words for it are row and record. Option A is wrong because an attribute is a column of the table, that is one property such as roll number or date of birth, and is counted by the degree of the relation. Option B is wrong because a domain is the set of values an attribute is allowed to take, for example the whole numbers one to one hundred for a marks column. Option D is wrong because the relation is the entire table, not one of its rows. Keep the pairing firm: relation is the table, tuple the row, attribute the column, and cardinality counts the tuples.

Q4.Computer AwarenessEasy

Which of the following is a Data Definition Language (DDL) command in SQL?

  1. A.INSERT
  2. B.CREATE
  3. C.SELECT
  4. D.UPDATE
Show answer

Correct answer: B. CREATE

Explanation

The correct answer is B, CREATE. The Data Definition Language deals with the structure of the database rather than with the data inside it, and CREATE is its basic command, used to build a table, a view or the database itself; ALTER, DROP, TRUNCATE and RENAME belong to the same group. Option A is wrong because INSERT adds new rows to an existing table and is therefore a Data Manipulation Language command. Option C is wrong because SELECT reads rows and returns a result set, which is again manipulation of data, not definition of structure; some books place it in a separate Data Query Language. Option D is wrong because UPDATE changes values already stored in rows and is also DML. Remember the split by what changes: structure means DDL, contents mean DML, rights mean DCL with GRANT and REVOKE.

Q5.Computer AwarenessMedium

Which SQL command removes all the rows of a table but keeps the table structure, and is classified as a DDL command?

  1. A.DELETE
  2. B.DROP
  3. C.TRUNCATE
  4. D.ERASE
Show answer

Correct answer: C. TRUNCATE

Explanation

The correct answer is C, TRUNCATE. TRUNCATE empties a table in one operation, leaving the columns, data types and constraints in place so that the table can be filled again at once; because it changes the object rather than selected rows it is grouped with the Data Definition Language and it is much faster than deleting row by row. Option A is wrong because DELETE is a Data Manipulation Language command that removes only the rows a WHERE clause selects and can be undone with ROLLBACK before the transaction is committed. Option B is wrong because DROP destroys the table itself, so the structure disappears along with the data. Option D is wrong because ERASE is not an SQL command at all; it is a distractor built from ordinary English. The DELETE against TRUNCATE difference is a favourite one-mark question.

Q6.Computer AwarenessEasy

Which key uniquely identifies each record in a table and can never contain a null value?

  1. A.Foreign key
  2. B.Alternate key
  3. C.Primary key
  4. D.Super key
Show answer

Correct answer: C. Primary key

Explanation

The correct answer is C, primary key. The designer picks one candidate key as the primary key of a table, and the database then enforces two rules on it: its value must be different in every row, and it can never be left null, since a missing value would make a row impossible to identify. Option A is wrong because a foreign key holds the primary key values of another table to create a link, and it may be null when no related row exists. Option B is wrong because an alternate key is simply a candidate key that was not chosen as the primary key, so it is unique but is not the identifying key of the table. Option D is wrong because a super key is any set of attributes that identifies a row, and it may carry extra attributes that are not needed for uniqueness.

Q7.Computer AwarenessEasy

An attribute of one table that refers to the primary key of another table is called a:

  1. A.Candidate key
  2. B.Foreign key
  3. C.Composite key
  4. D.Secondary index
Show answer

Correct answer: B. Foreign key

Explanation

The correct answer is B, foreign key. A foreign key is the column that stores values belonging to the primary key of another table, so a marks table can carry the roll number of a student table and the two tables can then be joined; the database uses it to enforce referential integrity, refusing a value that does not exist in the parent table. Option A is wrong because a candidate key is a minimal set of attributes that identifies rows within the same table and points nowhere else. Option C is wrong because a composite key is a primary key built from two or more columns taken together, such as roll number with subject code. Option D is wrong because a secondary index only speeds up searching on a column and creates no relationship between tables at all.

Q8.Computer AwarenessMedium

In the ACID properties of a database transaction, the letter I stands for:

  1. A.Integrity
  2. B.Indexing
  3. C.Isolation
  4. D.Inheritance
Show answer

Correct answer: C. Isolation

Explanation

The correct answer is C, isolation. Isolation means that transactions running at the same time do not see one another's incomplete work, so two clerks booking the last seat cannot both succeed; the database behaves as though the transactions ran one after the other. The four properties in full are atomicity, consistency, isolation and durability. Option A is wrong because integrity is a general term for correctness of data, enforced by constraints such as primary and foreign keys, and it is not the I of ACID. Option B is wrong because indexing is a technique for faster searching and has nothing to do with transaction guarantees. Option D is wrong because inheritance is a feature of object oriented programming, where a class takes properties from a parent class. Atomicity means all steps happen or none, and durability means a committed change survives a crash.

Q9.Computer AwarenessMedium

The number of attributes in a relation is known as its:

  1. A.Cardinality
  2. B.Degree
  3. C.Domain
  4. D.Tuple count
Show answer

Correct answer: B. Degree

Explanation

The correct answer is B, degree. The degree of a relation counts its attributes, that is its columns, so a student table holding roll number, name, class and marks has degree four whatever the number of students in it. Option A is wrong because cardinality counts the tuples, that is the rows of the table, so the same student table with two hundred students has cardinality two hundred. Option C is wrong because a domain is the set of permitted values for one attribute, for example the letters A to E for a grade column, and it is not a count at all. Option D is wrong because tuple count is only another name for cardinality, so it repeats the error in option A. Examiners frequently swap degree and cardinality in the options, so read the words attribute and tuple carefully before choosing.

Q10.Computer AwarenessHard

Removing partial dependency of a non-key attribute on part of a composite primary key brings a table to which normal form?

  1. A.First normal form
  2. B.Second normal form
  3. C.Third normal form
  4. D.Boyce-Codd normal form
Show answer

Correct answer: B. Second normal form

Explanation

The correct answer is B, second normal form. A table is in second normal form when it is already in first normal form and no non-key attribute depends on only a part of a composite primary key; such a partial dependency is removed by moving that attribute into a table of its own. Option A is wrong because first normal form only requires that every value be atomic and that repeating groups be removed, which says nothing about composite keys. Option C is wrong because third normal form removes transitive dependency, where one non-key attribute depends on another non-key attribute rather than on a part of the key. Option D is wrong because Boyce-Codd normal form is a stricter version of the third form, requiring every determinant to be a candidate key. Learn the order: 1NF atomic values, 2NF partial, 3NF transitive.

Q11.Computer AwarenessMedium

Which of the following is a NoSQL database?

  1. A.Oracle
  2. B.MySQL
  3. C.MongoDB
  4. D.Microsoft SQL Server
Show answer

Correct answer: C. MongoDB

Explanation

The correct answer is C, MongoDB. MongoDB stores data as documents in a flexible, JSON-like form instead of as rows in tables with a fixed set of columns, and it is queried through its own interface rather than mainly through SQL, which makes it the standard example of a NoSQL database in exam papers. Option A is wrong because Oracle Database is the best known commercial relational system and uses SQL. Option B is wrong because MySQL is an open source relational database, now owned by Oracle, and the M of the LAMP stack. Option D is wrong because Microsoft SQL Server is Microsoft's relational database and works through Transact-SQL. The clue in such questions is the word table: relational systems force a fixed table structure, while NoSQL systems do not.

Q12.Computer AwarenessMedium

The SQL commands GRANT and REVOKE belong to which category?

  1. A.DDL
  2. B.DML
  3. C.DCL
  4. D.TCL
Show answer

Correct answer: C. DCL

Explanation

The correct answer is C, DCL. The Data Control Language governs who may do what inside the database: GRANT gives a user a privilege such as the right to read or to update a table, and REVOKE withdraws a privilege already given. Option A is wrong because the Data Definition Language changes the structure of database objects through CREATE, ALTER, DROP and TRUNCATE. Option B is wrong because the Data Manipulation Language works on the rows themselves through INSERT, UPDATE, DELETE and SELECT. Option D is wrong because the Transaction Control Language manages a transaction as a unit with COMMIT to make changes permanent, ROLLBACK to undo them and SAVEPOINT to mark a place to roll back to. Fix the four groups by their purpose: structure, data, rights and transactions.

Frequently Asked Questions

What is the difference between a database and a DBMS?

A database is the stored collection of related data. A DBMS is the software that creates that database and works on it, accepting queries, enforcing rules, controlling access and returning results. MySQL is a DBMS; the student records kept inside it are the database.

Which key can never be null and never repeat?

The primary key. It is the candidate key chosen to identify every row of a table, so a null value or a repeated value would make one row impossible to find. A candidate key that was not chosen becomes an alternate key.

What is the difference between DELETE and TRUNCATE?

DELETE is a DML command that removes the rows a WHERE clause selects and can be undone with ROLLBACK before a commit. TRUNCATE is a DDL command that empties the whole table at once, keeps the structure and is far faster because it does not log every row.

What is the difference between degree and cardinality?

Degree is the number of attributes, that is the number of columns in the table. Cardinality is the number of tuples, that is the number of rows. A table with five columns and two hundred rows has degree five and cardinality two hundred.

Why is normalisation done?

To remove repeated data and the update problems it causes. Splitting one wide table into related smaller tables means a fact is stored once, so an update cannot leave one copy corrected and another wrong, and space is saved. 1NF removes repeating groups, 2NF partial dependency and 3NF transitive dependency.

Is MongoDB a relational database?

No. MongoDB is a NoSQL database that stores data as documents rather than as rows in fixed tables, so it does not use SQL as its main language. Oracle, MySQL, PostgreSQL, Microsoft SQL Server and IBM Db2 are the relational systems asked in exams.

Sources

  • Computer Science, Class XII, Unit: Database Concepts and Structured Query Language — NCERT
  • Informatics Practices, Class XII, Unit: Database Query using SQL — NCERT
View all
  • Computer Awareness

    Cyber Security and Threats: Malware, Attacks and PYQs

    30 September 2026

  • Computer Awareness

    Number Systems and Data Representation in Computers

    29 September 2026

  • Computer Awareness

    Computer Networks: Topologies, Devices and OSI Layers

    29 September 2026

  • Computer Awareness

    Internet and Email: Protocols, Ports and Terms

    28 September 2026

  • Computer Awareness

    MS PowerPoint: Views, Slide Master and Shortcuts

    28 September 2026

  • Computer Awareness

    MS Excel: Formulas, Functions and Shortcuts

    27 September 2026