B
Biggan.me
Science & Math Calculators
Information & Communication Technology (HSC ICT)NCTB HSC ICT (Chapter 6)Relational Database Management (RDBMS)SQL Engine

Relational Database & SQL Simulator

Interactive HSC ICT relational database and SQL simulator. Run SELECT, WHERE, INNER JOIN, and GROUP BY queries with live ER schema visualization.

SQL Preset:
SQL Query Terminal

Formula & Derivation

Theoretical foundation, dimensional analysis, and governing boundary conditions.

SQL Statement Structure vs Logical Execution Order

In computer science examinations, candidates are frequently tested on the logical execution order of SQL clauses, which differs significantly from lexical syntax order.

Lexical Syntax Order:

1. SELECT (Attributes & Aggregates)

2. FROM (Target tables & JOINs)

3. WHERE (Row-level filters)

4. GROUP BY (Aggregation groups)

5. ORDER BY (Sort criteria)

Engine Execution Order:

1. FROM / JOIN (Table Cartesian/Join)

2. WHERE (Filter records)

3. GROUP BY (Form groups)

4. SELECT (Column projection)

5. ORDER BY (Sort final rows)

Solved Textbook Examples

Three fully worked pedagogical exemplars: standard textbook, advanced edge-case, and authentic past board examination.

Foundational / Projection & Selectionbg-emerald-500/10 text-emerald-400 border border-emerald-500/20
Write an SQL query to retrieve the Name and GPA of all students belonging to the "Science" group from the Student table.
Given Parameters:
  • Table: Student
  • Condition: GroupName = "Science"
  • Fields: Name, GPA
Procedural Solution:
Projection (choose target columns): SELECT Name, GPA
Data source: FROM Student
Selection (row filter condition): WHERE GroupName = 'Science';
Final Answer:SELECT Name, GPA FROM Student WHERE GroupName = 'Science';
Board Exam Standard (Relational Join)bg-cyan-500/10 text-cyan-400 border border-cyan-500/20
Formulate an INNER JOIN query between Student and Result tables using the StudentID key to display Roll, Name, and GPA.
Given Parameters:
  • Student Primary Key: StudentID
  • Result Foreign Key: StudentID
  • Desired output columns: Student.Roll, Student.Name, Result.GPA
Procedural Solution:
Identify shared relational key: StudentID.
Construct JOIN clause: FROM Student INNER JOIN Result ON Student.StudentID = Result.StudentID
Select qualified attributes: SELECT Student.Roll, Student.Name, Result.GPA
Final Answer:SELECT Student.Roll, Student.Name, Result.GPA FROM Student INNER JOIN Result ON Student.StudentID = Result.StudentID;
Aggregation & Grouping (GROUP BY & COUNT)bg-purple-500/10 text-purple-400 border border-purple-500/20
Count the total number of enrolled students grouped by their academic track (GroupName) from the Student table.
Given Parameters:
  • Table: Student
  • Grouping column: GroupName
  • Aggregate function: COUNT(*)
Procedural Solution:
Select group identifier and counter: SELECT GroupName, COUNT(*)
Specify relation: FROM Student
Partition by categorical attribute: GROUP BY GroupName;
Final Answer:SELECT GroupName, COUNT(*) FROM Student GROUP BY GroupName;

Board Exam & Laboratory Checklist

✓ একক রূপান্তর (SI Units)Convert all inputs to SI units prior to calculation.
✓ সূত্র ও পক্ষান্তর উল্লেখExplicitly isolate target variable before substitution.
✓ তাৎপর্যপূর্ণ অঙ্ক ও রাউন্ডিংPreserve required precision without premature truncation.

Practical Applications

How this scientific principle drives chemical engineering, aerospace, medicine, and research.

From banking transaction ledgers to university admissions registries and global cloud architectures, relational database management systems remain the cornerstone of enterprise software. This client-side simulator provides zero-latency query execution without requiring local database servers or administrative permissions.

Frequently Asked Questions

Answers to common conceptual misconceptions and board examination guidelines.

What is the fundamental difference between a Primary Key and a Foreign Key?
A Primary Key uniquely identifies each row (tuple) in a database relation and cannot contain NULL values. A Foreign Key is an attribute in one table that references the Primary Key of another table, enforcing referential integrity between the two entities.
What is the distinction between DDL and DML?
Data Definition Language (DDL) statements (e.g., CREATE, ALTER, DROP) manage the structure and schema of the database. Data Manipulation Language (DML) statements (e.g., SELECT, INSERT, UPDATE, DELETE) manage and query data instances within tables.
What are the main types of relational cardinality?
Relational cardinality describes entity relationships: One-to-One (1:1), One-to-Many (1:N), Many-to-One (N:1), and Many-to-Many (M:N). In relational engines, M:N relationships are normalized into two 1:N relations using a junction table.