3 ms·
For context, the subject-predicate-object pattern is known as a semantic triple or Resource Description Framework (RDF) triple: https://en.wikipedia.org/wiki/S
by zackmorris 1y ago
For context, the subject-predicate-object pattern is known as a semantic triple or Resource Description Framework (RDF) triple:
https://en.wikipedia.org/wiki/Semantic_triple https://en.wikipedia.org/wiki/Semantic_triple
They're useful for storing social network graph data, for example, and can be expressed using standards like Open Graph and JSONAPI:
https://ogp.me https://ogp.me
https://jsonapi.org https://jsonapi.org
I've stored RDF triples in database tables and experimented with query concepts from neo4j:
https://neo4j.com/docs/getting-started/data-modeling/tutorial-data-modeling/ https://neo4j.com/docs/getting-started/data-modeling/tutoria...
These are straightforward to translate to SQL but the syntax can get messy due to not always having foreign keys available and hitting limitations with polymorphic relationships. Some object-relational mapping (ORM) frameworks help with this:
https://laravel.com/docs/12.x/eloquent-relationships#polymorphic-relationships https://laravel.com/docs/12.x/eloquent-relationships#polymor...
I feel that document-oriented databases like MongoDB jumped the gun a bit, and would have preferred to have had graph-oriented or key-value-oriented databases providing row/column/document oriented queries and views. Going the other way feels a bit kludgy to me:
https://www.mongodb.com/resources/basics/databases/mongodb-graph-database https://www.mongodb.com/resources/basics/databases/mongodb-g...
Basically Set Theory internally with multiple query languages externally and indexed by default.
Oh and have all writes generate an event stream like Firebase does so we can easily build reactive apps.