5 ms·
Google Badwolf: Temporal graph store abstraction layer
- devit 11y agoWhy is this better than just using any SQL database? Also, considering that only in-memory storage is shipped here, is this an internal Google project that was only partially released? Or a work in progress?
- dragonwriter 11y ago> Why is this better than just using any SQL database? Lots of SQL databases don't have good constructs for dealing with ranges, which make lots of operations you'd want to do with temporal data awkward (PostgreSQL since 9.2 has range types, and lots of useful features attached to them, that address this.) Beyond that, pretty much all the normal SQL vs. NoSQL considerations would seem to apply without much change when you address temporal data, so the usual mix of ACID vs. scalability, schema enforcement vs. schemaless flexibility, etc., considerations apply.
- JPKab 11y agoIt's a triple store that doesn't suck. If you want to know the advantages of triple stores, there's a lot out there. One key strength is that triple stores have a "schema as data" approach, meaning that schemas can be made to follow rules on the fly based on the data contained within them. Nothing that application code can't do, of course, but the entire purpose of these kinds of databases is to find a way to have data be as self-descriptive as possible.
- dragonwriter 11y ago> One key strength is that triple stores have a "schema as data" approach Schema as data is historically a fairly important element of the relational model.
- BinaryIdiot 11y ago> Schema as data is historically a fairly important element of the relational model. Not really. You derive a schema from data already stored in a relational database by looking at multiple, non-data places. I'm not sure I would necessarily consider that "schema as data" especially since many of the things you would need to automatically derive a schema may not be present in an optimally performing RDMS. For instance you need foreign keys to understand relationships but I've seen many times where performance is improved through handling foreign key integrity through the application versus at the database level.
- maaku 11y agoMany (most? all?) traditional relational database management systems have table schemas specified as "control tables" within the database itself. I think this is what the parent was referring to.
- dragonwriter 11y ago> You derive a schema from data already stored in a relational database by looking at multiple, non-data places. No, the schema is itself stored in tables; conceptually, while the structure of those control tables needs to be immutable (that is, the data in the control tables that also relates to the control tables needs to be protected against modification), in an ideal DB following the model, schema changes that can be done through DDL are logically equivalent to executing DML against the control tables and can be done that way, as well; in practice, several RDBMS's do allow this, though typically they only allow superusers to use DML against system tables, even though normal users may have permission to make equivalent changes through DDL.
- BinaryIdiot 11y agoFair enough but when you consider internal structures as "data" I think the phrases loses some of its power; you could effectively make this argument about any type of meta data system at that point.
- gtrubetskoy 11y agoTriplestores are good for storing and processing graphs, which don't fit the relational database model very well. There is a variant of SQL called SPARQL intended specifically for querying triplestores: https://en.wikipedia.org/wiki/SPARQL https://en.wikipedia.org/wiki/SPARQL
- xllora 11y agoBW author here. Work in progress.
- thwd 11y agoIf the author is reading: > Covariant: Given two types A and B, A covariant B if B is a A. In other word, A covariant B if B is a prefix of A. Taken from here: https://github.com/google/badwolf/blob/master/docs/temporal_graph_modeling.md https://github.com/google/badwolf/blob/master/docs/temporal_... Co(ntra)variance only makes sense if you define a subtype relation first. And I think that's what you wanted to define here. After skimming through the docs I think what you want is: A is a subtype of B if B's path is a prefix of A's.
- andylei 11y agowhats a "temporal" graph store?
- cowardlydragon 11y agoIt appears to be triples qualified with timestamps, possibly to expire them. ... I only looked at the github for 20 seconds
- andylei 11y ago> ... I only looked at the github for 20 seconds your explanation wasn't good...
- packetslave 11y agoI think you meant "thank you for trying to explain, since I was too lazy to Google it for myself"
- andylei 11y agono, i didn't. i got as much as that explanation from reading the github. i just didn't understand what a temporal graph store is used for. thanks for offering a productive contribution to the discussion!
- deleted 11y ago[deleted]
- amirouche 11y agoBadwolf is a immutable triple store with temporal predicates. edit: maybe a better description: is "relational" database with support for time attributes and time queries.
- zellyn 11y agoAnyone know how this compares with Cayley? https://github.com/google/cayley/ https://github.com/google/cayley/
- barakm 11y agoCayley author here. Reached out here: https://github.com/google/badwolf/issues/4 https://github.com/google/badwolf/issues/4 I've been doing graphs for a long time, and I'm not quite sure I get what a 'temporal triple' is exactly (or what its use case is) from the docs. But I'm willing to learn!
- xllora 11y agoBW author here. Ack. Will get back to you on the GH issue asap.
- trishume 11y agoThis sounds like it might be similar to an open source http://www.datomic.com/ http://www.datomic.com/, which also stores temporal quads. I'd have to read more to know how they really compare.
- wslh 11y agoI think using the term open source alone can be a little bit misleading: https://my.datomic.com/downloads/free https://my.datomic.com/downloads/free
- lsb 11y ago"similar to an open-source [version of] datomic, which also stores quads"
- davidjhamp 11y agoThe storage abstraction layer is also a shared concept, even down to providing only a free RAM implementation.
- dasmoth 11y agoMy first thought too. But looks like this may be somewhat more oriented towards including temporal information in queries, which implies a slightly different indexing model to Datomic (where time is the last component of all the indexes the Datalog query system accesses).
- baq 11y agofor everyone who doesn't understand the 'temporal' part - it's something you want in a lot of places but haven't done it because it's fiendishly tricky to get right. read https://en.wikipedia.org/wiki/Temporal_database https://en.wikipedia.org/wiki/Temporal_database for a good intro.