April 24, 2024

My Blog

My WordPress Blog

Stack in Data Structures and Normalization in DBMS

3 min read
Stack in Data


The computer science engineering syllabus for the GATE exam is published annually by the authorities on their official website. The syllabus is the first thing candidates need to know before they start preparing. The GATE exam is highly competitive, so candidates must review each topic in detail to rank well.

Candidates should also read the information booklet for all other important exam information. Candidates should also review the exam pattern and marking scheme, along with the GATE syllabus. The distribution of grades for a section varies by subject. In general, the General Aptitude (GA) syllabus is weighted 15%, while selected subjects are weighted 85%.

Data structure and DBMS are two important subjects in the syllabus. Here, we have briefly described stacks in data structures and normalization in dbms.

Stacks in Data Structures

A stack is an abstract data type, a linear data structure containing an ordered sequence of elements. The stack works according to the LIFO method (Last In First Out). That is, the last inserted element is removed first. The stack in data structure is similar to a stack that holds disks on top of each other. Since we are deleting the top slab, the last placed slab is on top.

Here are some basic operations on the stack:

PUSH: The PUSH operation inserts a new element onto the stack. Items in the stack are always inserted from the top. So, it’s important to check if the top of the stack is empty. TOP=Max-1: when this condition becomes false, it means the stack is full. If I try to insert it again, I get a “stack overflow” message.

POP: It means to remove an element from the stack. Always check to see if the top of the stack is NULL before deleting, i.e., TOP=NULL. If this condition is met, it means the stack is empty. The delete operation fails, and further attempts result in a “stack underflow message.”

Normalization in DBMS

A database management system (DBMS) is basically a computerised data management system. Users of the system can perform various operations on such systems to manipulate the data in the database and manage the database structure themselves. Database management systems (DBMS) are classified by data structure or type.

The topic of GATE DBMS also includes this important topic. Almost every year, there are questions about normalization. Thus, candidates should cover as much of the syllabus as possible to achieve a high ranking.

Normal Forms in DBMS

The process of organising data or information in a database is called normalization. This process helps eliminate repetition and data redundancy from a set of relationships or a single relationship. It also helps remove some undesirable traits, such as Updates, Inserts, and Deletes of Anomalies. Normalization in DBMS also helps avoid all unnecessary attributes in the database, such as delete, update, and insert anomalies.

DBMS Normal Forms

There are four major forms:

  • 1NF: A relation is in 1NF when it consists of an atomic value.
  • 2NF: A relation is in 2NF when it is already in 1NF, but all the non-key attributes fully and functionally depend on their primary keys.
  • 3NF: A relation is in 3NF when it is already in 2NF, but it does not consist of any transition dependencies.
  • 4NF: A relation is in 4NF when it is in BCNF or Boyce-Codd Normal Form, but it does not have any multi-valued dependencies.
  • 5NF: A relation is in the 5NF when it is already in 4NF, but it does not consist of the join dependencies.

Leave a Reply

Your email address will not be published. Required fields are marked *