Posts

Showing posts from November, 2025

Introduction to SQL (Structured Query Language)

Introduction to SQL (Structured Query Language) SQL is the backbone of relational database management. It allows users to interact with and manipulate data stored in databases effectively. A Brief History of SQL Origin: SQL was developed in the 1970s by IBM during research on relational database technology. Name: It started as SEQUEL but was later renamed SQL (Structured Query Language) due to trademark reasons. What is SQL? SQL is a programming language designed to communicate with and manipulate databases. With SQL, users perform essential database tasks, commonly summarized as CRUD : C: Create R: Read U: Update D: Delete How Does SQL Help? SQL enables users to: Retrieve Data: Extract precise information using queries. Manipulate Data: Add, modify, or remove records in the database. Define Data: Create and modify the structure of databases (tables, views, indexes). Control Data: Manage who can access and alter the database by granting or revoking permissions. ...

Third Normal Form (3NF)

What is Third Normal Form (3NF)? 3NF is a set of guidelines for organizing relational database tables to reduce data redundancy and improve data integrity. Achieving 3NF means your tables are well-structured and efficient. Here's what you need to know: The Two Main Rules for 3NF The table must already be in Second Normal Form (2NF). This means there are no partial dependencies; every non-key attribute is fully dependent on the whole primary key. There should be no transitive dependencies. A transitive dependency happens when a non-key column depends on another non-key column, not directly on the primary key. Transitive Dependency Example: If column A determines column B, and column B determines column C, then A indirectly determines C. In 3NF, we want to remove these indirect relationships unless the dependencies are on a candidate key. Example: Breaking Down a Table into 3NF Suppose we have a table: R (A, B, C) With the following dependencies: A → B B → C The Pr...