DATABASE MAINTENANCE
?? Table of Contents
- Introduction
- Database Maintenance – Overview
- Listing
- Database Dashboard
- Columns List – Dynamic
- Columns List – Master
- Columns List – Import
- Stored Procedures List
- Views List
- Tables List
- Primary Keys List
- Tables Without Primary Key
- Indexes List
- Missing Objects – Overview
- Missing Tables
- Missing Views
- Missing Procedures
- Missing Columns
- Add Objects – Overview
- Add Table
- Add View
- Add Procedure
- Add Column
- Run Query – Overview
- Select Query
- Update Query
- Create Table
- SQL Reports
- SQL Report
- Business Benefits
- Best Practices & Security Notes
1?? Introduction
The Database Maintenance module in EasyLib is a powerful administrative and technical tool designed to ensure the stability, integrity, performance, and long-term reliability of the EasyLib application database.
As EasyLib manages critical institutional data—including library records, academic information, transactions, user activity, and system configurations—maintaining a healthy and consistent database structure is essential. The Database Maintenance module provides administrators with controlled visibility and management capabilities over the underlying database of objects that support these operations.
This module enables system administrators, database administrators, and authorized technical users to:
- Monitor the overall database structure and health
- Validate the presence of required database objects after installations, upgrades, or migrations
- Identify missing, inconsistent, or improperly configured database components
- Maintain data integrity and referential consistency
- Improve system performance and query efficiency
- Reduce dependency on direct database access by providing a safe, application-level interface
The Database Maintenance module is organized into logical functional areas, each serving a specific purpose:
- Listing and Dashboard screens provide a consolidated view of database metadata and health indicators
- Schema inspection screens display detailed information about tables, columns, keys, indexes, views, and procedures
- Missing object screens help identify gaps between the expected and actual database structure
- Add and Run Query screens allow controlled creation and maintenance of database objects
- SQL Reports enable advanced reporting directly from database queries
By centralizing these capabilities within EasyLib, the Database Maintenance module helps institutions:
- Minimize system downtime
- Prevent data corruption and duplication
- Ensure smooth upgrades and feature rollouts
- Support audits, compliance, and accreditation requirements
Overall, the Database Maintenance module acts as a foundation layer for system governance, providing the technical backbone required for EasyLib to function reliably and efficiently across departments and campuses.
The Database Dashboard provides a high-level summary of the EasyLib database structure.
It gives administrators an instant snapshot of key database objects and their total counts, helping them quickly understand the size, complexity, and health of the system database.
This screen acts as the entry point for database maintenance and monitoring activities.
Navigation Path
Database Maintenance ? Listing ? Database Dashboard
Screen Overview
The dashboard displays database schema components in a tabular summary format with two main columns:
| Column | Description |
| Schema Type | Type of database object |
| Counts | Total number of objects available in the database |
Schema Types Explained
Tables
- Represents the total number of database tables in EasyLib.
- Tables store core data such as:
- Student records
- Book and circulation data
- Academic configurations
- Transactions and logs
?? A large table count indicates a feature-rich and modular system.
Columns
- Shows the total number of columns across all tables.
- Columns define individual data fields such as:
- IDs
- Names
- Dates
- Status flags
?? Helps administrators assess schema depth and data granularity.
Views
- Displays the number of database views.
- Views are pre-defined queries used to:
- Simplify complex data retrieval
- Improve reporting performance
- Enforce data abstraction and security
?? High view usage indicates optimized reporting and data access.
Stored Procedures
- Indicates the total number of stored procedures.
- Stored procedures handle:
- Business logic
- Validation rules
- Batch processing
- Performance-critical operations
?? Stored procedures reduce application load and improve execution speed.
How This Dashboard Is Used
Administrators use the Database Dashboard to:
- Verify database completeness after:
- Fresh installation
- Version upgrades
- Data migration
- Detect unexpected changes in database size
- Cross-check missing objects using:
- Missing Tables
- Missing Views
- Missing Procedures
- Missing Columns
- Plan maintenance and optimization activities
Columns List – Dynamic
The Columns List – Dynamic screen provides a live, real-time view of all database columns present in the EasyLib database.
This screen dynamically reads column metadata directly from the database schema, ensuring that the information displayed is always up to date with the actual database structure.
It is primarily used by system administrators and database administrators to inspect, verify, and analyze table columns across the entire EasyLib system.
Navigation Path
Database Maintenance ? Listing ? Columns List Dynamic
Screen Overview
The screen displays a tabular list of database columns, with built-in search, pagination, export, and insert options.
Column Descriptions
| Field Name | Description |
| Column Name | Name of the database column |
| Table Name | Name of the table where the column exists |
| Data Type | SQL data type of the column (e.g., varchar, datetime, smallint) |
| Maximum Length | Maximum allowed size for the column (if applicable) |
?? Columns with null length indicate data types where length is not applicable.
Functional Controls
Search
- Allows quick filtering by:
- Column name
- Table name
- Data type
- Useful for locating specific fields instantly.
Pagination
- Displays records in pages (e.g., 10 per page).
- Helps manage very large schemas efficiently (10,000+ columns).
Export
- Exports the full column list to Excel or CSV format.
- Useful for:
- Audits
- Documentation
- Impact analysis before upgrades
Insert
- Allows administrators to add a new column entry.
- Typically used in controlled schema updates.
- ? Should only be used by authorized technical users.
How This Screen Is Used
Administrators commonly use this screen to:
- Verify column existence after:
- Feature deployment
- Database migration
- Patch installation
- Cross-check with:
- Columns List Master
- Missing Columns
- Analyze column data types for performance tuning
- Support troubleshooting and development activities
Dynamic vs Master Columns List
| Feature | Dynamic | Master |
| Data Source | Live database | Reference schema |
| Updates Automatically | Yes | No |
| Used for validation | Yes | Yes |
| Used for deployment checks | Yes | Primary |
Columns List – Master
The Columns List – Master screen represents the reference (master) definition of all database columns that are expected to exist in the EasyLib system.
Unlike the Dynamic Columns List, which reads live data from the database, the Master Columns List acts as a baseline schema repository. It defines how the database should look according to EasyLib’s design and version standards.
This screen is essential for:
- Schema validation
- Upgrade and patch verification
- Identifying missing or inconsistent columns
Navigation Path
Database Maintenance ? Listing ? Columns List Master
Screen Overview
The screen displays a structured list of expected database columns, maintained centrally as a master reference.
It includes search, pagination, export, and insert functions for efficient management.
Column Descriptions
| Field Name | Description |
| Column Name | Standard name of the column as defined by EasyLib |
| Table Name | Table to which the column belongs |
| Data Type | Expected SQL data type |
| Maximum Length | Defined maximum length for the column |
?? null in Maximum Length indicates data types where size is not applicable.
Functional Controls
Search
- Quickly locate columns by name, table, or data type.
- Useful when validating specific features or modules.
Pagination
- Displays large master datasets in manageable pages.
- Helps navigate tens of thousands of column definitions efficiently.
Export
- Exports the master column list for:
- Documentation
- Version comparison
- Audit and compliance review
Insert
- Allows adding a new master column definition.
- Typically used during:
- New module implementation
- Product enhancement releases
- ? Changes here should align with official EasyLib schema updates.
How This Screen Is Used
Administrators and technical teams use this screen to:
- Compare against Columns List – Dynamic
- Identify discrepancies using Missing Columns
- Prepare databases before:
- Production rollout
- Version upgrade
- Maintain a consistent database structure across campuses
Master vs Dynamic Columns List
| Aspect | Master | Dynamic |
| Purpose | Reference schema | Actual database schema |
| Data Source | Predefined definitions | Live database |
| Used for validation | Primary | Secondary |
| Used in Missing Columns | Yes | Yes |
Columns List Import
The Columns List Import screen is used to bulk upload column definitions into the EasyLib master schema repository using an import file (typically Excel or CSV).
This screen helps administrators quickly populate or update the Columns List – Master without manually inserting each column, especially during:
- New database setup
- Version upgrades
- Large schema changes
- Multi-campus standardization
Navigation Path
Database Maintenance ? Listing ? Columns List Import
Why This Screen Is Important
Managing thousands of database columns manually is time-consuming and error-prone.
The Columns List Import feature ensures:
- Faster schema onboarding
- Consistent column definitions across environments
- Reduced manual errors
- Smooth validation with Dynamic Columns and Missing Columns
What Gets Imported
Each imported record usually contains:
| Field | Description |
| Column Name | Standard EasyLib column name |
| Table Name | Table to which the column belongs |
| Data Type | SQL data type (varchar, int, datetime, etc.) |
| Maximum Length | Column size, if applicable |
These records populate the Columns List – Master.
Typical Workflow
Prepare Import File
- Download or prepare the template in Excel/CSV format
- Ensure:
- Column names match EasyLib standards
- Table names are correct
- Data types are valid SQL types
Upload File
- Select the prepared file using the import option
- System reads all column definitions from the file
Validation
During import, the system validates:
- Duplicate column definitions
- Invalid data types
- Missing mandatory fields
- Structural mismatches
Any errors are highlighted before final submission.
Import Execution
- Valid records are added to Columns List – Master
- Existing records may be:
- Skipped
- Updated
- (depending on system rules and configuration)
Post-Import Usage
After successful import, the data is used by:
- Columns List – Master
- Missing Columns
- Schema comparison tools
- Upgrade readiness checks
Views List
What is a View?
A database view is a virtual table created from a stored SQL query. It does not store data physically; instead, it presents data dynamically from one or more tables.
In EasyLib, views are heavily used for:
- Reports (attendance, exams, fees, LMS, library)
- Dashboards
- Role-based data access
- Simplifying complex joins across modules
What the Views List Screen Does
The Views List screen provides a complete inventory of all views available in the database.
It helps administrators:
- Confirm that required views exist
- Detect missing or broken views after upgrades
- Validate reporting dependencies
Why This Screen is Critical
If a view is missing or invalid:
- Reports may fail
- Dashboards may show blank data
- Performance may degrade if fallback queries run
Typical Use Cases
- Post-upgrade verification
- Troubleshooting report issues
- Audit of reporting layer
- Database health checks
Tables List
What is a Table?
A table is the core physical structure where EasyLib stores data such as:
- Students
- Staff
- Exams
- Fees
- Library transactions
Purpose of Tables List
The Tables List screen provides a live snapshot of all physical tables in the database.
What This Screen Helps With
- Verifying that all required module tables exist
- Confirming table creation after installation
- Monitoring schema size and growth
- Supporting migrations and backups
Why It Matters
Missing or corrupted tables can:
- Break entire modules
- Cause data loss
- Prevent system startup
This screen acts as the first checkpoint for database completeness.
Admin Insight
Large row counts may indicate:
- High transaction volume
- Missing archiving strategy
- Performance tuning requirements
Primary Keys List
What is a Primary Key?
A primary key (PK) uniquely identifies each record in a table.
Without a primary key:
- Duplicate records can exist
- Relationships fail
- Indexing becomes inefficient
Role of Primary Keys in EasyLib
EasyLib relies on primary keys for:
- Student and staff identity
- Exam result mapping
- Fee transactions
- Library circulation tracking
What the Primary Keys List Screen Shows
This screen lists:
- Tables that have PKs
- Columns used as PKs
- Constraint definitions
Why This Screen is Important
It ensures:
- Referential integrity
- Reliable joins between tables
- Consistent reporting results
- Faster query execution
DBA Perspective
Tables without PKs are high-risk objects and should be reviewed immediately.
Tables Without Primary Key – Deep Explanation
What This Screen Identifies
This screen highlights tables that:
- Exist physically
- BUT do not have any primary key defined
Why Tables Without PKs Are Dangerous
Such tables can cause:
- Duplicate data
- Inconsistent updates
- Failed foreign key relationships
- Poor query performance
Why EasyLib Tracks This
EasyLib enforces best-practice database design, and this screen acts as:
- A schema quality checker
- A risk detection tool
When This Screen Is Used
- After schema import
- After manual database changes
- During performance troubleshooting
- Before audits or upgrades
Corrective Action
Admins usually:
- Review table purpose
- Add appropriate primary key
- Align with EasyLib master schema
Indexes List
What is an Index?
An index improves database performance by allowing faster data retrieval, similar to an index in a book.
Why Indexes Matter in EasyLib
EasyLib databases handle:
- Thousands of students
- Large exam records
- Daily attendance and fee transactions
Indexes ensure:
- Faster reports
- Smooth dashboards
- Responsive UI
What the Indexes List Screen Shows
- Index names
- Associated tables
- Indexed columns
- Index types (unique, clustered, non-clustered)
Performance Impact
Missing or incorrect indexes can lead to:
- Slow searches
- Timeout errors
- Heavy database load
Excessive indexes can:
- Slow down inserts/updates
- Increase storage usage
How Admins Use This Screen
- Identify missing performance indexes
- Detect duplicate or unused indexes
- Optimize slow-running queries
1. Missing – Overview
What Does “Missing” Mean in EasyLib?
The Missing section identifies gaps between the expected EasyLib master schema and the actual database schema.
EasyLib maintains a reference definition of required:
- Tables
- Views
- Stored Procedures
- Columns
If any of these objects are not found in the live database, they appear under Missing.
Why the Missing Section Is Critical
Missing database objects can:
- Break modules
- Cause runtime errors
- Prevent reports from loading
- Block upgrades and patches
This section acts as a schema validation and compliance checker.
2. Missing Tables – Deep Explanation
What Are Missing Tables?
Tables that:
- Are defined in the EasyLib master schema
- But do NOT exist in the current database
Common Causes
- Incomplete installation
- Failed upgrade scripts
- Manual deletion
- Partial database restore
- Environment mismatch (Prod vs Test)
Impact on EasyLib
If a required table is missing:
- Module features stop working
- Data cannot be stored
- System may throw fatal errors
Example:
- Missing StudentAttendance table ? attendance cannot be saved
How Admins Use This Screen
- Validate schema after installation
- Verify post-upgrade completeness
- Prepare database before go-live
Recommended Action
- Recreate table using Add Table
- Restore from backup
- Run official EasyLib schema scripts
3. Missing Views – Deep Explanation
What Are Missing Views?
Views that:
- Are expected by EasyLib reports or dashboards
- But are not present in the database
Why Views Go Missing
- Upgrade scripts not executed
- Manual DB cleanup
- View creation failure due to dependency errors
Impact
- Reports return empty results
- Dashboards fail to load
- Performance issues due to fallback queries
Admin Best Practice
Always validate Missing Views before:
- Enabling reporting modules
- Sharing analytics with management
4. Missing Procedures – Deep Explanation
What Are Missing Procedures?
Stored procedures that:
- Perform business logic
- Handle bulk processing
- Support data validation
Why Stored Procedures Matter in EasyLib
EasyLib uses stored procedures for:
- Exam result calculations
- Fee posting
- Attendance processing
- Bulk imports
Impact of Missing Procedures
- Actions fail silently or throw errors
- Imports do not complete
- Transactions remain incomplete
Resolution
- Re-add procedure using Add Procedure
- Re-run upgrade scripts
- Validate procedure permissions
5. Missing Columns – Deep Explanation
What Are Missing Columns?
Columns that:
- Are expected inside existing tables
- But do not exist in the live schema
Common Scenarios
- Partial upgrade
- Manual schema alteration
- Version mismatch
Impact
- Data not saved correctly
- Application errors
- Inconsistent reports
Example:
- Missing IsActive column ? filtering logic fails
Admin Action
- Add column using Add Column
- Verify datatype and default values
- Reindex table if needed
ADD Section – Controlled Schema Creation
6. Add – Overview
The Add section allows controlled creation of missing database objects without direct SQL access.
This ensures:
- Standardization
- Reduced risk
- Audit-friendly changes
Add Table
Creates a new table aligned with EasyLib schema standards.
What Happens Internally
- Table is created with defined columns
- Primary key constraints applied
- Default indexes added
- Audit fields included (CreatedDate, CreatedBy)
When to Use
- Missing table identified
- New module deployment
- Schema recovery
Add View
Creates or recreates a database view using standard SQL definitions.
Usage Scenario
- View missing after upgrade
- Reporting layer not working
Add Procedure
Creates stored procedures required for EasyLib business logic.
Add Column
Purpose
Add missing columns to existing tables.
Important Considerations
- Data type accuracy
- Default values
- Nullability
- Impact on existing data
Admin Tip
After adding a column:
- Update related views
- Rebuild indexes if needed
11. Run Query
Allows administrators to execute SQL commands inside EasyLib UI with controlled access.
Select Query
Runs read-only queries.
Typical Use Cases
- Data verification
- Debugging
- Report validation
Safety
- No data modification allowed
- Ideal for audits
Update Query
Executes data modification queries.
Usage Scenarios
- Data correction
- Status updates
- Cleanup operations
Admin Warning ??
- Always test with Select first
- Backup before execution
- Track changes carefully
Create Table
Allows creation of new tables via SQL.
When to Use
- Custom extensions
- Temporary tables
- Special integrations
SQL REPORTS
SQL Reports – Overview
Enables creation of custom reports using SQL queries.
Why SQL Reports Are Powerful
- No code changes
- Real-time data
- Flexible filtering
SQL Report – Deep Explanation
What an SQL Report Contains
- SQL query
- Parameters
- Output columns
- Sorting and filtering rules
Use Cases
- Management reports
- Audit reports
- Custom analytics