I found a few articles online providing examples of how to model graphs of various kinds (DAGs, in particular) in SQL, but they all seemed enormously complex, given the relative simplicity of what they're modeling.
Is there a best / standard way of doing this? My current thinking is something like this:
create table node (
id int not null auto_increment,
name TEXT
)
create table edge (
from_node int not null,
to_node int not null,
weight float
)
Is there anything wrong with that? Anyone know of a better (more robust, perhaps) way?