Demo Database

About the Demo Database

All examples in this tutorial use a small online-store database with five tables. Every example's Run button creates the tables it needs, so you can experiment freely.

TableHolds
Customerscompanies that place orders
Employeesstaff, their department, salary and manager
Productsitems for sale with price and stock
Ordersone row per order: who ordered, who handled it, when, and the total
OrderDetailsthe products and quantities inside each order

Customers

CustomerIDCustomerNameContactNameCityCountry
1Aarav TradersAarav ShahMumbaiIndia
2Blue Harbor FoodsEmma ClarkLondonUK
3Cedar & CoLiam BrownTorontoCanada
4Delta MartPriya NairBengaluruIndia
5Evergreen GrocersNoah WilsonNew YorkUSA
6Fjord SuppliesIngrid OlsenOsloNorway
7Golden SpoonMei ChenNULLSingapore
8Harbor LightsOlivia MartinLondonUK

Note: Golden Spoon has no City (it is NULL), and Fjord Supplies and Harbor Lights have never placed an order. These rows are useful later for NULL handling and outer joins.

Employees

EmployeeIDFirstNameLastNameDepartmentSalaryManagerIDHireDate
1RahulVermaSales72000NULL2019-04-01
2SaraKhanSales5800012021-07-15
3DavidLeeSales6100012020-11-02
4AnanyaIyerSupport4500052022-01-10
5JamesTaylorSupport67000NULL2018-09-23
6FatimaAliFinance80000NULL2017-03-05

ManagerID points to another row in the same table (Sara and David report to Rahul).

Products

ProductIDProductNameCategoryPriceStock
1Basmati Rice 5kgGrocery12.5120
2Green Tea 100 bagsBeverages6.75300
3Olive Oil 1LGrocery9.9980
4Dark ChocolateSnacks3.490
5Espresso Beans 1kgBeverages1845
6Almonds 500gSnacks8.25NULL

Orders

OrderIDCustomerIDEmployeeIDOrderDateAmount
101122024-01-05245.5
102432024-01-1289.9
103222024-02-03412
104132024-02-1856.25
1055NULL2024-03-01150
106322024-03-09320.75
107432024-03-2227
108722024-04-02198.4

Order 105 has no EmployeeID (an online order nobody handled).

OrderDetails

OrderDetailIDOrderIDProductIDQuantity
1101110
210125
3102412
410358
5103320
610423
710516
8106510
910664
1010746
1110839
1210827