5 个仓库
Tools and patterns for associating a single entity with multiple different types of tables using type identifiers.
Distinguishing note: Focuses on flexible, multi-table entity associations rather than standard one-to-one or one-to-many relationships.
Explore 5 awesome GitHub repositories matching data & databases · Polymorphic Data Modeling. Refine with filters or upvote what's useful.
Drizzle ORM is a TypeScript-native database toolkit providing type-safe SQL query building, schema management, and automated migrations across PostgreSQL, MySQL, SQLite, and SingleStore.
Drizzle associates a single entity with multiple different types of tables by using a type identifier and a foreign key to maintain flexible data connections.
Instructor is a framework designed for structured data extraction, validation, and language model integration. It functions as a library that transforms unstructured text into validated, type-safe objects by leveraging schema definitions and model-specific tool-calling capabilities. By acting as a validation middleware, the project ensures that language model outputs strictly conform to defined data structures. The library distinguishes itself through a robust validation-based retry loop that automatically re-submits failed responses with error feedback to iteratively correct schema complianc
Allows the model to return one of several different data structures or a list of mixed types to support flexible, multi-intent interactions.
This project is a framework for the efficient serialization and deserialization of data structures. It provides a unified, macro-based interface that automates the conversion of complex internal objects into standardized formats and reconstructs them from raw input streams or buffers. By leveraging compile-time code generation, the library minimizes manual implementation overhead while ensuring consistent logic across diverse data types. The framework distinguishes itself through a format-agnostic data model and a visitor-based parsing architecture that decouples data structures from specific
Parses input that may arrive as either a simple string or a complex object into a single unified data structure.
Mikro-ORM is a TypeScript-based object-relational mapping system that provides a unified persistence layer for Node.js applications. It translates TypeScript entities into relational or document-based database schemas, supporting a variety of engines including PostgreSQL, MySQL, MariaDB, MS SQL Server, SQLite, and MongoDB. The project implements the data mapper pattern to decouple in-memory domain models from the database persistence layer. It utilizes a unit of work pattern to track entity changes in memory and commit them in a single coordinated database transaction. The library covers com
Supports advanced data modeling including entity inheritance and polymorphic relations.
TypeDB 是一款强类型图数据库和知识图谱管理系统。它作为多模型数据存储,将关系、文档和图结构统一到一个环境中,既充当 ACID 兼容数据库,又充当声明式查询引擎。 该系统通过使用 n 元超图建模和多态类型层级脱颖而出。它采用强类型模式来强制执行结构规则并验证数据完整性,允许在查询执行期间自动解析复杂关系的基于类型的多态推理和基于角色的接口多态性。 该平台涵盖了广泛的功能,包括通过制表(tabling)计算递归关系、快照隔离事务和声明式数据检索。它还通过基于共识的集群复制、基于角色的访问控制以及与 AI 代理的集成以进行结构化数据检索,支持高可用性。 管理通过命令行界面支持,系统提供用于可视化图模式和审计管理活动的工具。
Supports inserting, updating, and deleting data across multiple types and hierarchies using unified operations.