Search code examples
data-modelingorientdbgraph-databases

Graph data modeling basics


I am playing around with orientdb quite some time now. In most of my projects I am dealing with GIS and ITS data from traffic networks...so I thought what would be a better datastore for a real world graph than a graph database?

So I wrote a python script to migrate a multimodal traffic network graph from a relational database to orientdb. The basic datamodel (traffic network nodes/crossings and edges/ways) is easy and I also took advantage of orientdbs spatial datatypes to store actually their real world representation. But now it gets hard for me to understand the principles of graph data modeling right.

In real world the nodes/crossings aren't very interesting...most properties are situated on the edges (type of way, lanes, width, etc...). In the graph datamodel the graph is used to associate entities, so the nodes are carrying most of the properties and edges are only to associate nodes with each other.

How would you model a real world traffic network graph in a graph data model the right way, and specifically how would you model aspects like a lane or the coating of a street to the network graphs edge .

P.S. Lanes and Properties of an edge should be their own classes, as they should only be referenced to an network graphs edge, as an edge can carry multiple types of traffic (train, street, walkways, bikeroutes, etc...)


Solution

  • Read the following articles, they deal with modeling issues (search google scholar)

    Bordoloi, S. and Kalita, B. (2013a). Designing Graph Database Models from existing relational databases. International Journal of Computer Applications, 74(1).

    Bordoloi, S. and Kalita, B. (2013b). ER Model to an Abstract Mathematical Model for Database Schema using Reference Graph. International Journal of Engineering Research And Development, e-ISSN, pages 51–60.

    De Virgilio, R., Maccioni, A., and Torlone, R. (2014). Model-driven design of graph databases. In Conceptual Modeling, pages 172–185. Springer.

    Park, Y., Shankar, M., Park, B.-H., and Ghosh, J. (2014). Graph databases for large-scale healthcare systems: A framework for efficient data management and data services. In Data Engineering Workshops (ICDEW), 2014 IEEE 30th International Conference on, pages 12–19. IEEE.