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...)
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.
I've created a program runnning on the web (html) about booking tickets on a cinema theater.
I now want to create its ER Model.
As far as I know, the logical sequence of actions is:
Create the ER Model
Generate the Physical Model
Create your Database
So now, when I try to create the ER model, the relation between my entities doesn't seem right. On the other hand, if I add more entities like customer or admin, then that means that I have created more tables for my database that I don't need.
Anyone can help me in this one?
I am not that much good at database diagraming. Whenever I am asked to create an ERR Diagram, I use MySQL WorkBench software.
However today I ended up in a conclusion when I see different types of ER Diagrams. My diagrams (designed via MySQL WorkBench) are like below.
And I saw other types of ER Diagrams like below.
Can someone please confirm which ER Diagram model should I use?
An Entity Relationship Diagram is an example of a presentation of a Conceptual Model. A Conceptual Model is used to help people understand the subject area(s) the model represents. Therefore, the correct presentation of a Conceptual Model - which may be or include an Entity Relationship Diagram - is one that all interested parties are satisfied adequately explains these subject areas.
These interested parties should include potential users of a system that incorporates the subject areas, managers of these areas and IT professionals who will be designing and building a system covering these areas.
The agreed Conceptual Model is then taken by the IT professionals and formalized into a Logical Model, which may be presented as a Relational Data Model.
Actually both of them are ER diagrams. However, the second one is its scientific representation. MySQL use a representation which is more understandable way of it.
I'm drawing an ERD for a database and want to know if you need to include the supertypes and sub-types in the ERD. If yes, how to represent it. Thanks.
google for "ER Specialization". This is the term used in ER literature for subtyping. You should get some ways to diagram it, using the "Is-a" triangle connector. Some tutorials place it in "Extended ER features".
Would like to find low-cost relational modeling tools that will allow me to map a logical model in third normal form to a physical model based on EAV. Got any pointers?
EAV fails to conform to rules of relational normalization, therefore there can be no relational modeling tools that support it.
If your model is in 3NF, then there's no reason to model it in EAV. Keep it in 3NF.