@@ -144,127 +144,68 @@ db.ExecuteSQL("INSERT INTO files VALUES (1, @data)");
144144
145145## 🧭 RDBMS Feature Status
146146
147- | Feature | Status | Notes |
148- | ---------| --------| -------|
149- | Stored Procedures | ✅ Complete | CREATE/DROP PROCEDURE, EXEC with parameter binding |
150- | Views | ✅ Complete | CREATE VIEW, CREATE MATERIALIZED VIEW, DROP VIEW |
151- | Triggers | ✅ Complete | BEFORE/AFTER INSERT/UPDATE/DELETE, NEW/OLD binding |
152- | Time-Series | ✅ Complete | Gorilla/Delta-of-Delta/XOR codecs, buckets, downsampling |
147+ | Feature | Status | Details |
148+ | ---------| --------| ---------|
149+ | Stored Procedures | ✅ Complete | CREATE/DROP PROCEDURE, EXEC with IN/OUT/INOUT parameters, Phase 1.3 |
150+ | Views | ✅ Complete | CREATE VIEW, CREATE MATERIALIZED VIEW, DROP VIEW, Phase 1.3 |
151+ | Triggers | ✅ Complete | BEFORE/AFTER INSERT/UPDATE/DELETE, NEW/OLD binding, Phase 1.4 |
152+ | Time-Series (Phase 8) | ✅ Complete | ** Gorilla, Delta-of-Delta, XOR codecs** • ** Buckets & Downsampling** • ** Retention policies** • ** Time-range indexes** |
153+ | B-tree Indexes | ✅ Complete | Range queries, ORDER BY, BETWEEN, composite indexes |
154+ | JOINs | ✅ Complete | INNER, LEFT, RIGHT, FULL OUTER, CROSS joins |
155+ | Subqueries | ✅ Complete | Correlated, IN, EXISTS, scalar subqueries |
156+ | Aggregates | ✅ Complete | COUNT, SUM, AVG, MIN, MAX, GROUP BY, HAVING |
153157
154158---
155159
156- ## 📚 Documentation
160+ ## ⏱️ ** Time-Series (Phase 8) Features **
157161
158- ### Project Status
159- - 📖 [ Project Status] ( docs/PROJECT_STATUS.md )
160- - 📖 [ Changelog] ( docs/CHANGELOG.md )
161- - 📖 [ Benchmark Results] ( docs/BENCHMARK_RESULTS.md )
162+ SharpCoreDB includes ** production-grade time-series support** with industry-standard compression:
162163
163- ### SCDB Reference
164- - 📖 [ SCDB Implementation Status ] ( docs/scdb/IMPLEMENTATION_STATUS.md )
165- - 📖 [ SCDB Phase 1–6 Complete ] ( docs/scdb/ )
166- - 📖 [ Serialization & Storage Guide ] ( docs/serialization/SERIALIZATION_AND_STORAGE_GUIDE.md )
164+ ### Compression Codecs
165+ - ** Gorilla Codec ** : XOR-based floating-point compression ( ~ 80% space savings )
166+ - ** Delta-of-Delta Codec ** : Integer timestamp compression with second-order deltas
167+ - ** XOR Float Codec ** : Specialized IEEE 754 compression for measurements
167168
168- ### Guides
169- - 📖 [ Contributing ] ( docs/CONTRIBUTING.md )
170- - 📖 [ Use Cases ] ( docs/UseCases.md )
171- - 📖 [ Embedded & Distributed Guide ] ( docs/SHARPCOREDB_EMBEDDED_DISTRIBUTED_GUIDE.md )
172- - 📖 [ Migration Guide ] ( docs/migration/MIGRATION_GUIDE.md )
173- - 📖 [ Query Plan Cache ] ( docs/QUERY_PLAN_CACHE.md )
169+ ### Capabilities
170+ - ** Automatic Bucketing ** : Time-range partitioning for fast queries
171+ - ** Downsampling ** : Aggregate high-frequency data into lower-resolution series
172+ - ** Retention Policies ** : Automatic archival and cleanup of old data
173+ - ** Time-Range Indexes ** : BRIN-style indexes for fast temporal lookups
174+ - ** Bloom Filters ** : Efficient time-range filtering
174175
175- ---
176-
177- ## 🎯 Getting Started
178-
179- ### Installation
180- ``` bash
181- dotnet add package SharpCoreDB
182- ```
183-
184- ### Basic Usage
176+ ### Example Usage
185177``` csharp
186- // Initialize with DI
187- var services = new ServiceCollection ();
188- services .AddSharpCoreDB ();
189- var factory = services .BuildServiceProvider ()
190- .GetRequiredService <DatabaseFactory >();
191-
192- // Create or open database
193- using var db = factory .Create (" ./mydb" , " password" );
194-
195- // Create schema
196- db .ExecuteSQL (" CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT)" );
197-
198- // Insert data
199- db .ExecuteSQL (" INSERT INTO users VALUES (1, 'Alice')" );
200-
201- // Query data
202- var rows = db .ExecuteQuery (" SELECT * FROM users" );
203-
204- // Planned: FILESTREAM storage for large payloads (SCDB Phase 6)
205- var largeData = new byte [50_ 000_ 000 ]; // 50MB
206- db .ExecuteSQL (" INSERT INTO data VALUES (@blob)" );
178+ // Create time-series table
179+ db .ExecuteSQL (@"
180+ CREATE TABLE metrics (
181+ timestamp BIGINT,
182+ value REAL,
183+ tag TEXT,
184+ PRIMARY KEY (timestamp, tag)
185+ ) WITH TIMESERIES
186+ " );
187+
188+ // Insert compressed time-series data
189+ db .ExecuteSQL (" INSERT INTO metrics VALUES (@ts, @val, @tag)" );
190+
191+ // Query with time-range filtering (automatic codec decompression)
192+ var rows = db .ExecuteQuery (" SELECT * FROM metrics WHERE timestamp BETWEEN @start AND @end" );
193+
194+ // Downsample to 1-minute buckets
195+ var downsampled = db .ExecuteQuery (@"
196+ SELECT
197+ bucket_timestamp(timestamp, 60000) as bucket,
198+ AVG(value) as avg_value,
199+ MAX(value) as max_value
200+ FROM metrics
201+ GROUP BY bucket
202+ " );
207203```
208204
209205---
210206
211- ## 🔄 SCDB Architecture Overview
212-
213- ```
214- ┌─────────────────────────────────────────────────────┐
215- │ SharpCoreDB Application Layer │
216- ├─────────────────────────────────────────────────────┤
217- │ Database.Core + Query Executor + Index Manager │
218- ├─────────────────────────────────────────────────────┤
219- │ DDL Extensions: Procedures | Views | Triggers │
220- ├─────────────────────────────────────────────────────┤
221- │ SCDB Storage Engine (8 Phases - Complete) │
222- ├────────┬────────┬────────┬────────┬────────┬────────┤
223- │ Ph.1-3 │ Ph.4 │ Ph.5 │ Ph.6 │ Ph.7 │ Ph.8 │
224- │Block │Migrate │Harden │Row │Query │Time │
225- │Reg/WAL │ation │ing │Overflow│Optimize│Series │
226- ├────────┴────────┴────────┴────────┴────────┴────────┤
227- │ IStorage: File persistence with encryption │
228- ├─────────────────────────────────────────────────────┤
229- │ Disk: Database file + WAL + Overflow + Blobs │
230- └─────────────────────────────────────────────────────┘
231- ```
232-
233- ## ✅ Project Snapshot
234-
235- | Metric | Value | Status |
236- | --------| -------| --------|
237- | ** SCDB Phases Complete** | Phases 1-8 + DDL Extensions | ✅ 100% |
238- | ** Phase 8 (Time-Series)** | Codecs, Buckets, Downsampling | ✅ Complete |
239- | ** Stored Procedures / Views / Triggers** | Phase 1.3-1.4 | ✅ Complete |
240- | ** Performance Optimization** | 7,765x faster | ✅ Complete |
241- | ** Advanced SQL** | JOINs + Subqueries + Aggregates | ✅ Complete |
242- | ** Build Status** | 0 errors, 0 warnings | ✅ Success |
243- | ** Tests** | 772 passing, 0 failures | ✅ All Passing |
244- | ** Production LOC** | ~ 77,700 | ✅ |
245-
246- ---
247-
248- ## 🏆 Highlights
249-
250- - ** INSERT Performance** : 43% faster than SQLite, 44% faster than LiteDB ✅
251- - ** Analytics Speed** : 682x faster than SQLite, 28,660x faster than LiteDB ✅
252- - ** UPDATE Optimization** : 5.4x faster Single-File mode, 280x less memory ✅
253- - ** Encryption** : AES-256-GCM with 0% overhead ✅
254-
255- ---
256-
257- ## 📜 License
258-
259- MIT License - see LICENSE file for details
260-
261- ---
262-
263- ** Ready to use?** Download from [ NuGet] ( https://www.nuget.org/packages/SharpCoreDB ) or clone from [ GitHub] ( https://github.com/MPCoreDeveloper/SharpCoreDB )
264-
265- ** Questions?** See the [ docs] ( docs/ ) folder or create an [ issue] ( https://github.com/MPCoreDeveloper/SharpCoreDB/issues )
266-
267- ---
207+ ## 📖 ** Complete User Manual**
268208
269- ** SharpCoreDB** - High-Performance .NET Database for the Modern Era 🚀
209+ For comprehensive documentation on using SharpCoreDB in your projects, see:
210+ 📘 ** [ SharpCoreDB User Manual] ( docs/USER_MANUAL.md ) ** — Complete guide for developers
270211
0 commit comments