add edges and nodes sql queries