MySQL Forums
Forum List  »  Newbie

How to store complex graph paths in mysql?
Posted by: Ivan Evstegneev
Date: June 23, 2015 01:24PM

Hello,

New to MySQL so don't know how to handle this issue (checked google prior posting here ^_^ ).

So in short, I work on project which deals mainly with optical networks. These network resources are abstracted, and represented by nodes and edges.

Furthermore the nodes includes things like port_id/fiber_id/tx_id/rx_id and so on.

In the similar manner I handle the edges too (span_id/amplifier_id and others)

For example if I want to describe a single path between two adjacent nodes, in my case it will look like this:

100 17 20145 3012 215 2148 13 101

where each number has its logical designation, like: port_id, wavelength_id, span_id etc.

It's not a simple graph when you can just write three columns:

id node_1 node_1
1 A B
2 B C


So my little/big question is how should I store such stuff in MySQL?
Or even that way: Should I use MySQL for such things or may it would be preferable just to gather data from sql and them organize with Python dictionaries/lists or whatever it needs to.


Hope my question is clear. ))

Thanks a lot for your help/advices.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.