A modern, interactive web-based database management system built as a final project for the Databases 1 course at Collège LaSalle Montréal. This application provides a comprehensive interface for managing SQL databases with support for creating tables, managing data, and visualizing database schemas.
- Overview
- Features
- Technologies Used
- Installation
- Usage
- Project Structure
- Database Schema
- Our Team
- Contributing
- License
LCI Database Manager is a full-stack web application that demonstrates practical implementation of database concepts including normalization (3NF), schema design, SQL operations, and modern web development practices. The project combines theoretical database knowledge with hands-on implementation through an interactive user interface.
This project was developed under the guidance of Professor Huu Con Nguyen and showcases our team's expertise in both database design and web development.
β Interactive Database Management
- Create, edit, and delete database tables with a user-friendly interface
- Add, update, and remove rows with validation
- Support for primary keys, foreign keys, unique constraints, and check constraints
- Real-time data filtering and searching
β Advanced Table Operations
- Sortable columns with visual indicators
- Pagination for large datasets
- Column type enforcement and validation
- Constraint visualization (PK, FK, UQ, CHK badges)
β SQL Command Integration
- Comprehensive SQL command reference (50+ commands)
- Support for DDL, DML, DQL operations
- Transaction management
- User and permission management
β 3NF Compliant Schema
- Properly normalized database structure
- Seven-table relational schema (Customers, Categories, Suppliers, Products, Orders, Order_Details, System_Users)
- Entity-relationship diagram visualization
β Modern UI/UX
- Responsive design for all devices
- Dark theme enforced for better visual experience
- Interactive dialogs and modals
- Toast notifications for user feedback
- Smooth animations and transitions
β Database Reporting
- Schema analysis and visualization
- SQL feature implementation showcase
- Mermaid diagram integration for ER diagrams
- Svelte 5 - Modern reactive JavaScript framework
- SvelteKit - Full-stack Svelte framework
- TypeScript - Type-safe JavaScript
- Tailwind CSS - Utility-first CSS framework
- shadcn-svelte - Reusable UI component library
- Bits UI - Headless UI components
- Node.js - JavaScript runtime
- Neon Database - Serverless PostgreSQL
- @neondatabase/serverless - PostgreSQL client for serverless environments
- Axios - HTTP client for API requests
- Vite - Fast build tool and development server
- ESLint - JavaScript linter
- Prettier - Code formatter
- TypeScript ESLint - TypeScript-specific linting rules
- Marked - Markdown parser
- Mermaid - Diagram and chart generation
- Highlight.js - Syntax highlighting
- Svelte Sonner - Toast notifications
- Lucide Icons - Beautiful icon set
- Mode Watcher - Theme management
- Node.js (v18 or higher)
- npm or pnpm or yarn
- A Neon Database account (or any PostgreSQL database)
-
Clone the repository:
git clone https://github.com/shayandelbari/lci-database-manager.git cd lci-database-manager -
Install dependencies:
npm install # or pnpm install # or yarn install
-
Set up environment variables:
Create a
.envfile in the root directory with your database connection string:DATABASE_URL=your_neon_database_connection_string
-
Run database migrations (optional):
If you have SQL scripts in the
docs/directory, you can run them against your database to set up the initial schema. -
Start the development server:
npm run dev # or start the server and open the app in a new browser tab npm run dev -- --open -
Access the application:
Navigate to
http://localhost:5173in your browser.
- Navigate to
/database-managerto access the main database management interface - Select a table from the dropdown to view and manage its data
- Use the Create Table button to add new tables with custom columns and constraints
- Add Row to insert new data into the selected table
- Edit or Delete rows using the action buttons in each row
- Apply filters to search and filter data based on column values
- Use sorting by clicking on column headers
Visit the application to view a comprehensive guide of 50+ SQL commands organized by category:
- Data Retrieval (SELECT, GROUP BY, HAVING, etc.)
- Data Manipulation (INSERT, UPDATE, DELETE)
- Data Definition (CREATE TABLE, ALTER TABLE, DROP TABLE)
- Constraints (PRIMARY KEY, FOREIGN KEY, UNIQUE, CHECK, NOT NULL)
- Transactions (COMMIT, ROLLBACK, SAVEPOINT)
- User Management (CREATE USER, GRANT, DROP USER)
- And much more!
To create a production build:
npm run buildPreview the production build:
npm run previewTo start the production server:
npm startNote: You may need to install an adapter for your target deployment environment. This project includes both
@sveltejs/adapter-nodeand@sveltejs/adapter-vercel.
lci-database-manager/
βββ docs/ # SQL scripts and documentation
β βββ 1.sql through 8.sql # Database implementation scripts
βββ src/
β βββ lib/
β β βββ components/ # Reusable Svelte components
β β β βββ db-command/ # SQL command documentation
β β β βββ filter-dialog/ # Data filtering interface
β β β βββ home/ # Home page component
β β β βββ report/ # Database analysis report
β β β βββ row-dialog/ # Row add/edit dialog
β β β βββ table-dialog/ # Table creation dialog
β β β βββ ui/ # shadcn-svelte UI components
β β βββ server/ # Server-side code
β β β βββ db/ # Database connection and queries
β β βββ stores/ # Svelte stores for state management
β β β βββ database.ts # Database state
β β β βββ databaseStore.ts # Database operations
β β β βββ tableStore.ts # Table operations and data
β β βββ types/ # TypeScript type definitions
β β βββ utils/ # Utility functions
β βββ routes/ # SvelteKit routes
β β βββ api/ # API endpoints
β β βββ database-manager/ # Database manager page
β β βββ report/ # Report page
β β βββ +layout.svelte # Root layout
β β βββ +page.svelte # Home page
β βββ app.css # Global styles
β βββ app.html # HTML template
βββ static/ # Static assets
βββ .prettierrc # Prettier configuration
βββ eslint.config.js # ESLint configuration
βββ package.json # Dependencies and scripts
βββ svelte.config.js # Svelte configuration
βββ tailwind.config.ts # Tailwind CSS configuration
βββ tsconfig.json # TypeScript configuration
βββ vite.config.ts # Vite configuration
βββ sql-command-summary.md # SQL commands reference
βββ README.md # This file
The database implements a Third Normal Form (3NF) compliant schema with the following tables:
- Customers - Customer personal information
- Categories - Product categorization
- Suppliers - Supplier information
- Products - Inventory management with relationships
- Orders - Order headers with customer references
- Order_Details - Many-to-many relationship between orders and products
- System_Users - System access and permissions
For detailed schema analysis and implementation, visit the /report page in the application.
This project was collaboratively developed by a dedicated team of students from Collège LaSalle Montréal:
- Abdulrahman Mousa β Website Frontend, database integration specialist
- Shayan Delbari β Website Backend, server-side database interactions
- Sofia Saldumbide Rissotto β Database design and implementation specialist
- Akshay Kheterpal β Database normalization and optimization specialist
Course Instructor: Professor Huu Con Nguyen
Contributions are welcome! If you'd like to contribute to this project, please follow these steps:
- Fork the repository
- Create a new branch (
git checkout -b feature-branch) - Make your changes
- Run linting and formatting:
npm run lint npm run format
- Commit your changes (
git commit -m 'Add some feature') - Push to the branch (
git push origin feature-branch) - Open a Pull Request
This project is licensed under the MIT License. See the LICENSE file for details.
Built with β€οΈ by the LCI Database Management Team