The first stable release of the relational graph DBMS EdgeDB

The first stable release of the EdgeDB DBMS is available, which is an add-on for PostgreSQL with the implementation of a relational graph data model and the EdgeQL query language, optimized for working with complex hierarchical data. The code is written in Python and Rust and distributed under the Apache 2.0 license. Client libraries are prepared for Python, Go, Rust and TypeScript/Javascript languages. A command line toolkit is provided for DBMS management and interactive query execution (REPL).

Instead of a table-based data model, EdgeDB uses a declarative system based on object types. Instead of foreign keys (foreign key) to determine the relationship between types, linking is used (one object can be used as a property of another object). type Person { required property name -> str; } type Movie { required property title -> str; multi link actors -> Person; }

Indexes can be used to speed up query processing. Features such as strong property typing, property value constraints, computed properties, and stored procedures are also supported. Of the features of the EdgeDB object storage scheme, which is somewhat reminiscent of ORM, the ability to mix schemes, bind properties from different objects, and integrated JSON support is noted.

Built-in tools are provided for migrating the storage schema - after changing the schema specified in a separate esdl file, it is enough to execute the β€œedgedb migration create” command and the DBMS will analyze the differences in the schema and interactively generate a script to migrate to the new schema. Schema modification history is automatically tracked.

For querying, both the GraphQL query language and EdgeDB's own language, which is an adaptation of SQL for hierarchical data, is supported. Instead of lists, query results are formatted in a structured way, and instead of subqueries and JOIN operations, it is possible to specify one EdgeQL query as an expression within another query. Transactions and cycles are supported. select Movie { title, actors: { name } } filter .title = "The Matrix" insert Movie { title := "The Matrix Resurrections", actors := ( select Person filter .name in { 'Keanu Reeves', 'Carrie- Anne Moss', 'Laurence Fishburne' } ) } for number in {0, 1, 2, 3} union ( select { number, number + 0.5 } );

Source: opennet.ru

Add a comment