University of Kenya
Campus Management System - CockroachDB NewSQL Implementation
Academic Project Disclaimer
This is a fictional scenario created for academic purposes. This documentation represents a theoretical campus management system prototype developed as part of coursework for Advanced Database Systems at Meru University. All user stories, statistics, testimonials, and implementation claims are simulated for educational demonstration purposes only. This is not a production system and does not represent any real university's actual infrastructure.
Project Overview
A comprehensive web-based campus management system designed to digitize university operations using CockroachDB NewSQL technology. This project demonstrates the implementation of a distributed, scalable database solution for enterprise-level applications.
Student Services
Centralized portal for academic information, course enrollment, library services, and application tracking.
Staff Services
Course management, student oversight, administrative tools, and content management capabilities.
Public Services
Academic calendar, program information, e-learning platform, and campus information access.
Live System Interface
University of Kenya Campus Management System
CockroachDB v25.4
Database Technology Implementation
Course Project: Database Technology Implementation
Project Details
Course: Advanced Database Systems
Institution: Meru University of Science & Technology
Program: Bachelor of Science in Computer Technology (BCT)
Group: Group A
Database: CockroachDB v25.4
Implementation Scope
• Single-node CockroachDB deployment
• Local development environment
• Campus management system prototype
• Full-stack web application
• Sample data for demonstration
Our Implementation Approach
Local Development Setup
Startup Command
--insecure
--listen-addr=localhost:26257
--http-addr=localhost:8080
--store=cockroach-data
This command initializes a local CockroachDB instance suitable for development and coursework demonstration.
Database Concepts Applied
NewSQL Characteristics
Implementation Milestones
Our Implementation Details
Local Development Environment
Setup: Single-node CockroachDB instance
Data Persistence: cockroach-data folder in project directory
Version Control: Data folder committed to GitHub repository
Access: Web UI available at localhost:8080
Key Features Utilized
Project Outcomes & Learning
The Magic of Distribution
Think of CockroachDB like a team of librarians working together. Instead of having one librarian handling all the books (which would be slow and risky), you have multiple librarians, each responsible for different sections, but they all communicate and help each other out.
ACID Compliance: The Foundation of Trust
ACID isn't just a chemistry term – it's what makes our database trustworthy. Every transaction in our campus system follows these principles:
Atomicity
When a student enrolls in a course, either everything happens (enrollment recorded, payment processed, seat reserved) or nothing happens. No half-completed transactions.
Consistency
The database always follows our rules. If a course has 50 seats, the 51st student can't enroll, even if thousands are trying simultaneously.
Isolation
Multiple students can use the system at once without interfering with each other. Your grade update doesn't affect someone else's enrollment.
Durability
Once we confirm your transaction, it's permanent. Even if the power goes out immediately after, your data is safe.
What This Means for Our Campus System
Always Available
Students can access their portals during exam periods when traffic spikes. The system automatically handles the load without slowing down.
Grows With Us
As the university expands to new campuses, we can add database servers in those locations. Students get faster access, and data stays synchronized.
Bulletproof Security
Student data is encrypted and replicated across multiple secure locations. Even if disaster strikes one server, everything continues working.
Under the Hood: Technical Excellence
Consensus Algorithm: The Brain of the Operation
CockroachDB uses the Raft consensus algorithm – think of it as a democratic voting system for computers. When data needs to be written, multiple servers vote on it. Only when a majority agrees does the change become permanent. This ensures consistency even when servers are in different countries.
In Our Campus System:
When a student submits their final exam, the grade isn't just saved on one server. Multiple servers confirm the transaction before the student sees "Grade Submitted Successfully." This prevents any possibility of lost grades or corrupted data.
Multi-Version Concurrency Control (MVCC)
This is like having a time machine for your data. CockroachDB keeps multiple versions of each piece of information, so readers never block writers, and writers never block readers. Everyone can work simultaneously without stepping on each other's toes.
Real Campus Example:
While a professor is updating grades for 200 students, other students can still view their current grades, enroll in new courses, and access library resources. Nobody has to wait, and nobody sees incomplete or inconsistent data.
Automatic Rebalancing: Self-Healing Infrastructure
CockroachDB is like having a system administrator that never sleeps. It constantly monitors the health of all servers, automatically moving data away from overloaded or failing servers to healthy ones. It even predicts problems before they happen.
Campus Resilience:
During registration periods when thousands of students are enrolling simultaneously, the database automatically shifts resources to handle the load. When the rush is over, it rebalances everything for optimal performance.
Performance That Scales With Success
Linear Scalability
Most databases hit a wall as they grow. CockroachDB breaks through that wall. Need to handle twice the load? Add another server, and you get roughly twice the performance. It's that simple.
Geographic Distribution
Our university has students accessing the system from across Kenya and beyond. CockroachDB can place data closer to users automatically, reducing latency and improving the user experience.
Why Developers Love CockroachDB
Familiar Yet Powerful
As computer science students, we didn't want to learn a completely new query language. CockroachDB speaks PostgreSQL, which means all our SQL knowledge transferred directly. We could focus on building features instead of fighting the database.
Built-in Observability
CockroachDB comes with an amazing web interface that shows us exactly what's happening in real-time. We can see which queries are slow, how data is distributed, and even get suggestions for optimization.
Technical Achievements
Learning Outcomes
Project Summary
We successfully implemented CockroachDB v25.4 as the database foundation for our Campus Management System as part of our Advanced Database Systems coursework at Meru University of Science & Technology. This Group A project demonstrates our understanding of NewSQL database technologies and their practical application in real-world scenarios. The single-node setup provided an excellent learning environment while showcasing the capabilities of modern distributed database systems.
System Architecture & Implementation
We implemented a 3-tier architecture pattern for our campus management system prototype, demonstrating proper separation of concerns and modern software engineering principles learned in our Advanced Database Systems course.
High-Level Architecture Overview
Client Layer (Frontend)
React App
Modern UI Library
Tailwind CSS
Utility-First Styling
Font Awesome
Icon Library
HTTP Requests / JSON Responses
Application Layer (Backend)
Express.js Server
Web Framework
REST API
API Endpoints
JWT Auth
Security Middleware
SQL Queries / Database Results
Data Layer (Database)
CockroachDB
NewSQL Database
Admin UI
Port 8080
How Everything Works Together
The Journey of a Student Request
Let's follow what happens when a student checks their grades. This simple action triggers a carefully orchestrated dance between multiple systems, each playing their part to deliver a seamless experience.
Real-Time Example: Course Enrollment
Error Handling in Action
Performance Optimization in Practice
We learned early that a beautiful interface means nothing if it's slow. Here's how we optimized the most common user journey – the student dashboard loading process:
Frontend Optimization
- • Lazy loading of course materials
- • Cached user preferences
- • Optimistic UI updates
- • Component memoization
Backend Optimization
- • Connection pooling
- • Query result caching
- • Batch API requests
- • Compression middleware
Database Optimization
- • Strategic indexing
- • Query optimization
- • Read replicas
- • Automatic rebalancing
Database Schema & Relationships
STUDENTS
id, student_id, name, email, program_id, year, gpa
UNITS
id, code, name, credits, school, program_id
PROGRAMS
id, name, code, degree_type, department
STAFF
id, staff_id, name, email, department
Implementation Achievements
Academic Project Context
As Group A students in the Advanced Database Systems course at Meru University of Science & Technology, we undertook this campus management system project to demonstrate our understanding of NewSQL database technologies, specifically CockroachDB v25.4.
This coursework project showcases our ability to implement modern database concepts learned in class, including distributed systems principles, ACID transactions, and full-stack integration with contemporary web technologies.
Course Learning Objectives Achieved
NewSQL Database Implementation
Successfully implemented CockroachDB v25.4 in a single-node configuration to demonstrate understanding of NewSQL database concepts as required by our Advanced Database Systems curriculum.
Course Concepts Demonstrated:
- • ACID transaction properties in distributed systems
- • SQL compatibility with modern scalability features
- • Database administration using web-based tools
- • Integration with application development frameworks
Full-Stack Database Integration
Developed a complete web application demonstrating proper database integration patterns, from frontend data presentation to backend API design and database schema implementation.
The Challenge We Overcame:
Limited documentation, fewer Stack Overflow answers, and the need to understand distributed systems concepts that weren't covered in our database course.
The Reward:
We now understand concepts like consensus algorithms, distributed transactions, and horizontal scaling that most of our peers won't encounter until they're working at major tech companies.
Enterprise Architecture Thinking
Our first attempt was a mess – everything in one file, no separation of concerns, and code that only the person who wrote it could understand. We learned the hard way why architecture matters.
Before (The Mess):
- • Database queries in React components
- • Business logic scattered everywhere
- • No consistent error handling
- • Impossible to test or maintain
After (Clean Architecture):
- • Clear separation of presentation, business, and data layers
- • Reusable components and services
- • Consistent patterns across the codebase
- • Easy to test, debug, and extend
Mobile-First Responsive Design
In Kenya, many students access the internet primarily through their phones. We couldn't build a system that only worked well on laptops. This constraint forced us to think mobile-first from day one.
Real Usage Statistics:
Our mobile-first approach wasn't just good design – it was essential for our users.
Prototype Features Implemented
Academic Project Scope
Our campus management system prototype demonstrates key database concepts and full-stack development skills as required for our Advanced Database Systems coursework at Meru University.
Implemented Features for Demonstration
✅ Student Portal Module
Core functionality designed for student academic management and information access within the campus management system prototype.
Technical Features Implemented:
- • Real-time grade calculation with GPA tracking algorithms
- • Course enrollment system with prerequisite validation logic
- • Academic calendar integration with deadline management
- • Transcript generation using PDF libraries
- • Fee management with payment tracking capabilities
✅ Library Management System
Digital library system prototype designed for resource management and tracking operations with automated notification capabilities.
System Capabilities:
- • Book inventory management with search functionality
- • Reservation system with queue management
- • Automated notification system for due dates
- • Fine calculation algorithms
- • Book recommendation engine using collaborative filtering
✅ Staff Management Dashboard
Administrative interface prototype for faculty and staff operations management with integrated communication and reporting capabilities.
Administrative Functions:
- • Grade management with batch upload capabilities
- • Attendance tracking with statistical analysis
- • Report generation with data visualization
- • Communication system with notification routing
- • Performance analytics dashboard
✅ Security Implementation
Enterprise-level security measures implemented for data protection and system integrity in the campus management system prototype.
Security Architecture:
- • JWT token-based authentication with expiration handling
- • Role-based access control (RBAC) implementation
- • Input validation and SQL injection prevention mechanisms
- • HTTPS encryption for data transmission
- • Comprehensive audit logging system
The Numbers Don't Lie: Impact Measurement
Learning Outcomes & Skills Demonstrated
Database Design
Designed normalized database schema with proper relationships, constraints, and indexes for optimal performance.
Modern Development
Utilized modern JavaScript frameworks, build tools, and development practices including ES6+, React Hooks, and REST APIs.
Scalable Solutions
Implemented horizontally scalable database solution capable of handling enterprise-level data and user loads.
User Experience
Created intuitive user interfaces with proper UX principles, accessibility considerations, and responsive design.
System Features & Functionality
Comprehensive functionality covering all aspects of university operations with real-world application:
Student Services
Student Portal
Centralized dashboard for academic information and services
Unit Catalog
Course browsing and enrollment management
Library Portal
Book search, borrowing, and renewal system
Application System
Program application and status tracking
Staff Services
Staff Portal
Course management and student enrollment oversight
Administrative Tools
Application processing, library management, and system administration
Content Management
News, announcements, and system content updates
Public Services
Academic Calendar
University-wide event and deadline management
Program Information
Comprehensive academic program details
E-Learning Platform
Online learning resources and tools
Campus Information
University services and campus life details
Technology Stack
Modern, scalable technologies powering the campus management system:
Frontend
- React 18
- Tailwind CSS
- Vite
- Font Awesome
Backend
- Node.js
- Express.js
- JWT Authentication
- CORS
Database
- CockroachDB
- PostgreSQL Compatible
- Horizontally Scalable
- ACID Transactions
Development
- ESLint
- Git
- npm
- VS Code
Installation & Setup
Prerequisites
Node.js
Version 18 or higher required
CockroachDB
Latest stable version
Git
Version control system
Installation Steps
System Startup
1. Start CockroachDB
2. Start Backend Server
npm start
3. Start Frontend Application
Service Ports
Frontend
5174
React Application UI
Backend API
3001
REST API Endpoints
Database
26257
CockroachDB Server
Admin UI
8080
Database Admin Panel
Development Team
Course Information
Institution: Meru University of Science & Technology
Course: Advanced Database Systems
Program: Bachelor of Science in Computer Technology (BCT)
Group: Group A
Project Overview
This campus management system was developed as our Advanced Database Systems coursework, demonstrating practical implementation of NewSQL database technology using CockroachDB.
MACLAN OMONDI MACLAYNE
BCT Student
Team Member
ORDIT KAGWIRA
BCT Student
Team Member
ELIJAH OWINO
BCT Student
Team Member
BEAUTTAH KIPRUTO
BCT Student
Team Member
FAITH ANJIKO
BCT Student
Team Member
DANCUN CHEGE
BCT Student
Team Member
Advanced Database Systems Project
NewSQL Implementation
Practical implementation of CockroachDB v25.4 for campus management system
Group Collaboration
Group A collaborative development using modern software engineering practices
BCT Program
Bachelor of Science in Computer Technology coursework at Meru University