4 ms·
This might be my limited knowledge but I've always thought of relational systems as a kind of graph. The foreign keys denote edges connecting the table/nodes. A
by account-5 5y ago
This might be my limited knowledge but I've always thought of relational systems as a kind of graph. The foreign keys denote edges connecting the table/nodes. At least that's how I think of them, this might be complete non-sense though.
- salawat 5y agoA relation can be a graph, but a graph need not be relational from my understanding. It has something to do with the higher mathematical what'sit's I haven't quite read up enough on but it's on my to-do list.
- letmeinhere 5y ago[not a theorist] I think the relational _schema_ is a graph, but not the incremental data stored within. The nodes are entity types, not instances, and thus recursion is irrelevant. So, kinda? But a lot of categorical differences.
- contravariant 5y agoIt would be slightly more straightforward to interpret a relational system as a hypergraph as a relation can typically be between more than 2 things. It does seem like you can more or less interpret most of these as a directed graph, though compound keys might make things somewhat tricky.
- pezo1919 5y agoI have not the exact but a similar sense especially when we go higher normal forms. I’d happy if someone could elaborate more one that, but to me it seems like if we do the higher normal form things eventually we get to a place very similar to tables being graph node/edge types and the table rows being the insances of nodes/edges. Even the join table in lower normal forms is clearly like an edge type, but ofc with tables I think it sucks more, because when you join tables it costs a lot, but in case of graphs the information is local to the graph node (table row) and there is no complexity boom issue. Also, if we’d take it really far we could say every SQL Table shall only have 1 row meaning one node/object. I don’t think it’s partical, just a though lt experiment, wondering about its meaning.