A production-ready SQL Server database architecture for the Prashad platform.
This repository contains a modular and enterprise-level database design built for:
- Temple marketplace systems
- Prasad ordering platforms
- Razorpay payment integration
- Shipment tracking
- Notification systems
- Admin management
- Azure SQL deployments
- Microsoft SQL Server
- Azure SQL Database
- T-SQL
- Stored Procedures
- SQL Indexing
- Transactions
- Foreign Keys
- Check Constraints
- GitHub Version Control
Prashad/
β
βββ Schema.sql
β
βββ auth/
β βββ tables/
β βββ procedures/
β βββ indexes/
β βββ constraints/
β
βββ temple/
β βββ tables/
β βββ procedures/
β βββ indexes/
β βββ constraints/
β
βββ catalog/
β βββ tables/
β βββ procedures/
β βββ indexes/
β βββ constraints/
β
βββ orders/
β βββ tables/
β βββ procedures/
β βββ indexes/
β βββ constraints/
β
βββ payment/
β βββ tables/
β βββ procedures/
β βββ indexes/
β βββ constraints/
β
βββ delivery/
β βββ tables/
β βββ procedures/
β βββ indexes/
β βββ constraints/
β
βββ notification/
β βββ tables/
β βββ procedures/
β βββ indexes/
β βββ constraints/
β
βββ admin/
β βββ tables/
β βββ procedures/
β βββ indexes/
β βββ constraints/
β
βββ seed-data/
β
βββ migrations/
β
βββ full-backup/
βββ Prashad_FullDatabase.sql
The database is divided into multiple schemas for better scalability, maintainability, and modularity.
Handles complete authentication and user management.
- Users
- UserAddresses
- UserRoles
- RefreshTokens
- User registration
- Login management
- Role management
- Refresh token handling
- OTP verification
- Address management
Handles temple-related information.
- Temples
- TempleImages
- TempleReviews
- TempleTimings
- Temple listings
- Temple reviews
- Temple timings
- Temple galleries
- Ratings & reviews
Handles prasad catalog and inventory management.
- Prasad
- PrasadCategories
- PrasadImages
- PrasadInventory
- Wishlists
- Product catalog
- Categories
- Inventory tracking
- Product reviews
- Wishlist support
Handles shopping cart and order management.
- CartSessions
- CartItems
- Orders
- OrderItems
- Coupons
- Cart management
- Order placement
- Coupon support
- Payment tracking
- Delivery type handling
Handles payment processing and refunds.
- Payments
- PaymentAttempts
- Refunds
- Razorpay integration
- Payment logging
- Retry attempts
- Refund processing
- Failure tracking
Handles shipment and delivery tracking.
- DeliveryPartners
- Shipments
- ShipmentEvents
- Shipment tracking
- Delivery status updates
- Partner integrations
- AWB management
Handles notification templates and logs.
- NotificationTemplates
- NotificationLogs
- Email notifications
- SMS notifications
- Push notification support
- Notification history
Handles admin operations and system monitoring.
- AdminUsers
- AuditLogs
- SystemConfigs
- Audit tracking
- System configuration
- Admin permissions
- Activity logging
β Multi-schema architecture β Production-ready database design β Foreign key relationships β Index optimization β Check constraints β Stored procedures β Transaction handling β TRY/CATCH error handling β Azure SQL compatible β Modular SQL organization β Enterprise naming conventions
The database follows:
- Normalized relational design
- Modular architecture
- Separation of concerns
- Reusable stored procedures
- Constraint-based validation
- Optimized indexing strategy
Implemented optimizations include:
- Non-clustered indexes
- Unique indexes
- Indexed foreign keys
- Optimized query filtering
- Minimal redundant data
- Password hash storage
- Refresh token management
- Audit logging
- Role-based access support
- Constraint-based validation
git clone "https://github.com/ThakurPradeepRawat/PSSQL"Supported tools:
- SSMS
- Azure Data Studio
- Visual Studio SQL Project
Run:
Schema.sqlThis creates:
- Database
- Schemas
Recommended execution order:
1. Tables
2. Constraints
3. Indexes
4. Procedures
5. Seed Data
Users.sql
Orders.sql
Payments.sql
Temples.sql
auth_sp_CreateUser.sql
orders_sp_CreateOrder.sql
payment_sp_CreatePayment.sql
Users_Indexes.sql
Orders_Indexes.sql
All procedures follow:
- CREATE OR ALTER
- TRY/CATCH blocks
- Transaction handling
- Proper validation
- Parameterized queries
- Enterprise naming conventions
The project is fully compatible with:
- Azure SQL Database
- Azure App Service
- Azure DevOps
- GitHub Actions CI/CD
GitHub
β
GitHub Actions
β
Azure SQL Deployment
β
Azure App Service
Planned improvements:
- Soft delete support
- RowVersion concurrency handling
- Automated migrations
- DACPAC deployment
- SQL unit testing
- Advanced analytics procedures
Feature Development
β
Create SQL Script
β
Commit to Git
β
Migration Script
β
Deployment
Backend Developer | .NET | SQL Server | Azure
This project is intended for:
- Learning
- Portfolio projects
- Production experimentation
- Database architecture practice
Feel free to fork, improve, and extend the project.
If you found this project useful:
- Star the repository
- Fork the project
- Contribute improvements
- Share feedback