Skip to content

Repository files navigation

🚀 Enterprise SQL Platform Lab

banner

SQL Server Docker Windows GitHub SSDT Power BI

Enterprise SQL Engineering from First Principles

Build • Understand • Test • Inspect • Document • Automate


📖 What This Project Is

The Enterprise SQL Platform Lab is a practical engineering project for designing, building, securing, testing, documenting, and deploying a SQL Server data platform.

It is deliberately more than a collection of SQL scripts.

The project demonstrates an end-to-end engineering approach:

Design
  ↓
Build
  ↓
Understand
  ↓
Test
  ↓
Inspect
  ↓
Document
  ↓
Automate

Automation is introduced only after the underlying platform behaviour is understood and validated.


🎯 Why This Repository Exists

Most SQL Server learning resources teach isolated technologies.

This project takes a different approach.

Infrastructure, administration, database development, metadata, data ingestion, storage, security, testing, deployment, source control and governance are engineered together as one integrated platform.

Every major component follows the same discipline:

  • ✅ Built
  • 🧠 Understood
  • 🧪 Tested
  • 🔎 Inspected
  • 📚 Documented
  • ⚙️ Prepared for automation

The result is an Enterprise SQL Engineering Playbook rather than another SQL tutorial.


🏗 Architecture at a Glance

The current engineering lifecycle is:

                    SOURCE CONTROL
                         |
                         v
                 DATABASE PROJECT
                         |
                         v
                    BUILD / DACPAC
                         |
              +----------+----------+
              |                     |
           LOCALDB              DOCKER SQL
              |                     |
              +----------+----------+
                         |
                         v
                  SECURITY
                PROVISIONING
                         |
                         v
                      TESTS
                         |
                         v
                    COMMIT
                         |
                         v
                 RELEASE ARTIFACT
                         |
                    +----+----+
                    |         |
                   TEST      PROD

The important architectural boundary is that database deployment and environment-specific security provisioning are separate concerns.

The DACPAC delivers the database implementation. Security provisioning handles environment-specific principals and role membership outside the DACPAC scope.


🏛 Enterprise Capability Model

Rather than building isolated SQL objects, this repository builds complete engineering capabilities.

Capability Status
🧱 Platform Foundations ✅ Implemented
🗂 Metadata ✅ Implemented
📥 Data Ingestion ✅ Implemented
💾 Data Storage ✅ Implemented
📊 Business Consumption 🟡 Database foundation implemented
🛡️ Platform Governance ✅ Established
🔐 Security ✅ Implemented
🧪 Testing ✅ Implemented
🌿 Git Development Workflow ✅ Established
⚙️ CI/CD Automation 🔵 Future
📈 Power BI Consumption 🔵 Future

✅ Implemented Platform Capabilities

The current platform includes:

  • source-controlled SQL Server Database Project;
  • relational schemas and storage;
  • staging and warehouse layers;
  • entity-level ingestion procedures;
  • pipeline procedures;
  • incremental Customer ingestion;
  • database roles and permissions;
  • row-level security;
  • security provisioning outside DACPAC deployment;
  • LocalDB development;
  • Docker SQL Server validation;
  • structured security and functional testing;
  • Git-based development and sprint history;
  • structured engineering documentation.

🔄 Development Lifecycle

The platform follows a controlled development path:

Requirement
    ↓
Source Change
    ↓
Database Project Build
    ↓
LocalDB Validation
    ↓
Docker SQL Server Validation
    ↓
Security Provisioning
    ↓
Functional / Security Tests
    ↓
Git Commit
    ↓
Release / Promotion

The database project remains the source-controlled definition of the database implementation.

Deployed databases are runtime environments, not the source of truth.


🔐 Security Model

Security is built around roles, permissions and controlled provisioning.

The platform uses database roles such as:

role_crm
role_customersuccess
role_dataquality
role_developer
role_etl
role_finance
role_reporting
role_sales

The general model is:

User
  ↓
Role
  ↓
Permission
  ↓
Database Object

Row-level security is also implemented for sales territory access.

Security provisioning is deliberately kept outside DACPAC deployment so that environment-specific principals do not become tightly coupled to the database artifact.

👉 See 14 — Security Architecture and 15 — Security Testing.


🧪 Testing

Testing is treated as part of development rather than as a final activity.

The project includes validation for:

  • 🏗 database structure;
  • 📥 ingestion;
  • 🔄 pipeline execution;
  • 👥 roles and permissions;
  • 🔑 role membership;
  • 🛡️ row-level security;
  • ⚙️ ETL access;
  • 📊 reporting access;
  • 🚀 deployment behaviour.

The principle is simple:

Build Success
     ↓
Deployment
     ↓
Functional Validation
     ↓
Security Validation
     ↓
Approved Change

👉 See 13 — Testing Workflow and 15 — Security Testing.


🚀 Deployment

The database is deployed through the Database Project and DACPAC model.

Database Project
      ↓
Build
      ↓
DACPAC
      ↓
Target Database
      ↓
Security Provisioning
      ↓
Validation

🧪 LocalDB is used for rapid development and structural validation.

🐳 Docker SQL Server provides broader integration and SQL Server behaviour validation.

🏭 Production is treated as a controlled deployment target rather than a development workspace.

👉 See 12 — Deployment Workflow.


📂 Repository Structure

The repository is organized around implementation, testing, deployment and documentation.

Enterprise-SQL-Platform-Lab/
│
├── README.md
├── .gitignore
├── LICENSE
│
├── database/
│   └── enterprise-sql-platform-lab/
│       │
│       ├── enterprise-sql-platform-lab.database/
│       │   ├── bin/
│       │   ├── Functions/
│       │   ├── Integration/
│       │   ├── obj/
│       │   ├── Post Deployment/
│       │   ├── Pre-Deployment/
│       │   ├── Scripts/
│       │   ├── Security/
│       │   ├── Stored Procedures/
│       │   ├── Tables/
│       │   └── Views/
│       │
│       │   ├── enterprise-sql-platform-lab.database.dbmdl
│       │   ├── enterprise-sql-platform-lab.database.jfm
│       │   ├── enterprise-sql-platform-lab.database.publish.xml
│       │   ├── enterprise-sql-platform-lab.database.refactorlog
│       │   ├── enterprise-sql-platform-lab.database.sqlproj
│       │   ├── enterprise-sql-platform-lab.database.sqlproj.user
│       │   └── localDB.publish.publish.xml
│       │
│       ├── 01_CRM.sql
│       ├── 02_CustomerSuccess.sql
│       ├── 03_Finance.sql
│       ├── 04_Sales.sql
│       ├── 05_Reporting.sql
│       ├── 06_DataQuality.sql
│       ├── 07_ETL.sql
│       ├── 08_Developer.sql
│       ├── 09_SecurityBaseline.sql
│       ├── ETL_RunHistory.sql
│       ├── metadata.sql
│       ├── Provision-Security.sql
│       ├── SqlQuery_1.sql
│       ├── staging.sql
│       ├── warehouse.sql
│       └── enterprise-sql-platform-lab.sln
│
├── datasets/
│   ├── calendar/
│   ├── customer/
│   ├── geography/
│   ├── product/
│   ├── sales/
│   ├── salesperson/
│   └── territory/
│
├── docker/
│   ├── .env.example
│   ├── .gitignore
│   ├── README.md
│   └── compose.yaml
│
├── docs/
│   ├── 00_Project_Vision.md
│   ├── 01_Architecture.md
│   ├── 02_Engineering_Methodology.md
│   ├── 03_Platform_Foundations.md
│   ├── 04_Platform_Operations.md
│   ├── 05_Metadata_Capability.md
│   ├── 06_Data_Ingestion_Capability.md
│   ├── 07_Data_Storage_Capability.md
│   ├── 08_Business_Consumption.md
│   ├── 09_Platform_Governance.md
│   ├── 10_Architecture_Overview.md
│   ├── 11_Database_Development_Workflow.md
│   ├── 12_Database_Deployment.md
│   ├── 13_Environment_Provisioning.md
│   ├── 14_Security_Architecture.md
│   ├── 15_Security_Testing.md
│   ├── 16_Git_Development_Workflow.md
│   ├── 17_Sprint_Plan_and_Project_History.md
│   │
│   ├── 17_sprint_plan_and_project_history_expanded.md
│   └── 17_Sprint_Plan_and_Project_History_REVISED.md
│
├── google-colab/
│   └── enterprise-data-generator.ipynb
│
└── images/

The README is the project landing page.

The docs/ directory is the detailed engineering reference.

🌿 Git history records implementation changes.

📋 Sprint history records how the platform evolved.

Important: .env is deliberately not shown because it remains a local secret and is excluded from Git. The repository contains .env.example instead.


📚 Documentation

🧭 Start Here

New to the project? Follow this sequence:

Document Purpose
📖 00_Project_Vision.md Project purpose, direction and guiding principles
🏗 01_Architecture.md Platform architecture and major boundaries
🧠 02_Engineering_Methodology.md Engineering approach and working principles
🧱 03_Platform_Foundations.md Core platform foundations
🗄️ 11_Database_Development_Workflow.md How database changes are developed
🌿 16_Git_Development_Workflow.md Git, commits and development workflow
📋 17_Sprint_Plan_and_Project_History.md Complete Sprint 1–11 project history

🧩 Capability Documentation

Document Capability
🗂 05_Metadata_Capability.md Database metadata and inspection
📥 07_Data_Ingestion_Capability.md Staging and ingestion
💾 07_Data_Storage_Capability.md Staging and warehouse storage
📊 08_Business_Consumption.md Reporting and business-facing database consumption
🛡️ 09_Platform_Governance.md Governance and change control

⚙️ Engineering and Operational Documentation

Document Purpose
🚀 12_Deployment_Workflow.md Deployment process
🧪 13_Testing_Workflow.md Testing process
🔐 14_Security_Architecture.md Security architecture
🛡️ 15_Security_Testing.md Security validation
🌿 16_Git_Development_Workflow.md Git workflow
📋 17_Sprint_Plan_and_Project_History.md Sprint history and delivery milestones

📈 Current State

The platform has progressed from foundational SQL Server development into a structured engineering solution.

Today, the repository provides a source-controlled database implementation with:

Database Project
      +
DACPAC Deployment
      +
Security Provisioning
      +
Functional Testing
      +
Security Testing
      +
Git Workflow
      +
Engineering Documentation

The platform is intentionally designed so that future capabilities can be added without changing the underlying engineering principles.


🔮 Future State

The following capabilities are intentionally identified as future evolution rather than current implementation.

⚙️ Automation

  • CI/CD pipelines;
  • automated quality gates;
  • automated deployment;
  • automated security provisioning;
  • automated drift detection.

📊 Business Consumption

  • Power BI semantic models;
  • Power BI reports;
  • Power BI dashboards;
  • APIs and data services;
  • additional analytical consumers.

🧠 Metadata and Operations

  • richer metadata management;
  • automated lineage;
  • data dictionary capabilities;
  • deployment audit reporting;
  • broader observability;
  • performance and storage monitoring.

Future capabilities should be introduced when there is a genuine engineering or business requirement.


🛠 Technology Stack

Layer Technology
💻 Operating System Windows 11
🐳 Container Platform Docker
🗄️ Database Engine SQL Server 2022 Developer Edition
🛠 Administration SQL Server Management Studio
🧩 Database Projects SQL Server Database Projects / SSDT
📦 Deployment DACPAC
🌿 Source Control Git & GitHub
📊 Analytics Power BI — Future State
📝 Documentation Markdown

⭐ Engineering Principles

  • 🏗 Infrastructure as Code
  • 🧩 Capability-driven architecture
  • 🧠 Manual understanding before automation
  • 🔐 Security by design
  • 🧪 Test behaviour, not just structure
  • 🔁 Reproducible engineering environments
  • 📚 Documentation as code
  • 🎯 Best practices over shortcuts
  • 🔎 Inspect before assuming
  • 📦 Deploy repeatably
  • 🌿 Source control as the source of truth

🗺️ Project History

The project has evolved through eleven structured sprints.

Sprints 1–8
    |
    v
Platform foundations, database development,
storage, ingestion, security and validation

Sprint 9
    |
    v
Security architecture and implementation maturity

Sprint 10
    |
    v
Security validation, deployment readiness
and platform hardening

Sprint 11
    |
    v
Documentation, governance and engineering
knowledge consolidation

For the complete reconstruction of Sprint 1 through Sprint 11, see:

👉 17 — Sprint Plan and Project History


🤝 Contributions

This repository is primarily an engineering learning and platform-development project.

The emphasis is on disciplined implementation, reproducibility, documentation and engineering practice.

Suggestions and constructive discussion are welcome.


👤 Author

Anil Jacob | Connect with me | LinkedIn | GitHub

Enterprise SQL Engineering from First Principles


Enterprise SQL Platform Lab

Designed and engineered with a focus on modern SQL Server engineering, enterprise data platform architecture, security, reproducible development and infrastructure as code.


Read the Docs Explore the Sprints Git Workflow

⭐ If you found this repository useful, consider giving it a star.

Happy Engineering! 🚀

About

Enterprise SQL data platform demonstrating metadata-driven ETL, staging, dimensional warehousing, incremental loading, auditability, and Docker/LocalDB deployment using SQL Server and SSDT.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages