Hazaar DBI Overview
Hazaar DBI Overview
Hazaar DBI is a comprehensive, object-oriented database abstraction and management library for PHP. It is built on top of PDO and provides a unified interface for interacting with relational databases, advanced schema management, data synchronisation, virtual filesystem storage, SQL parsing, and transparent encryption.
Hazaar DBI is designed to make database operations safer, more maintainable, and more portable across environments. It is suitable for both simple applications and complex, enterprise-grade systems.
Key Features
- Unified Database Access: Consistent API for all supported relational databases via PDO.
- Schema Management: Version, migrate, and automate your database schema with powerful migration and snapshot tools.
- Data Synchronisation: Define and manage static or reference data using JSON-based sync files.
- Virtual Filesystem Backend: Store and manage files and directories inside your database with de-duplication and transparent access.
- SQL Parser: Parse, inspect, and manipulate SQL queries programmatically for advanced use cases.
- Transparent Encryption: Secure sensitive data at rest and in transit with table/column-level encryption.
Documentation Sections
Configuring Hazaar DBI
Learn how to set up your database connections using PHP, JSON, or INI configuration files. This section covers all supported configuration options, including advanced features like encryption and schema manager settings.
Schema Management
Discover how to version-control your database schema, automate migrations, create and manage migration files, and use the dbitool CLI for all schema operations. Includes details on snapshotting, checkpointing, and programmatic schema management.
Data Synchronisation
Understand how to define, manage, and synchronise static or reference data using JSON-based data sync files. This section explains the sync file format, supported features, and how to automate data population and updates.
Filesystem Backend
Explore how to use your database as a virtual filesystem, storing files and directories with content-addressable storage and de-duplication. Includes configuration and usage examples for seamless file operations.
SQL Parser
Learn how to use the experimental SQL Parser to programmatically parse, inspect, and rewrite SQL queries. This is useful for query analysis, security enforcement, and dynamic query manipulation.
Encryption
See how to enable and configure transparent encryption for tables and columns, protecting sensitive data without changing your application code. Includes key management and configuration examples.
Hazaar DBI is designed to be modular and extensible. Each feature can be used independently or together, depending on your application's needs. For detailed usage, see the linked documentation sections above.