Have you heard about Graph Databases? They are a new way of storing data that helps to show relationships between things or people instead of the traditional style. of a relational database. These relationships are given a level of importance and can be used to determine other relationships that your items might have. This introduction should give you an overview of what they are about, things to look out for and since there are several ways that you can use graph databases in your application or site development, a jumping-off point to begin learning more about how they can make your design better.
What is a Graph Database?
Graph databases are unlike traditional relational databases since the data is not stored in rows or columns. There are no key-value pairs or normalization to have to worry about. Data is stored in an object-oriented format and called a “node”. Each node can be defined as a person, thing, object, etc… and relationships between nodes are defined as an “edge”. Nodes can contain as much information as we would like to store, so a person node could have a name, age, address, etc…Unlike traditional database models, each relationship between nodes can be given an identifying label as well as an importance. This way you can see relationships such as “Who works at X and likes Y and has also been to location Z” without having to struggle through multiple join statements.
What is a Graph Database?
Graph databases are unlike traditional relational databases since the data is not stored in rows or columns. There are no key-value pairs or normalization to have to worry about. Data is stored in an object-oriented format and called a “node”. Each node can be defined as a person, thing, object, etc… and relationships between nodes are defined as an “edge”. Nodes can contain as much information as we would like to store, so a person node could have a name, age, address, etc…Unlike traditional database models, each relationship between nodes can be given an identifying label as well as an importance. This way you can see relationships such as “Who works at X and likes Y and has also been to location Z” without having to struggle through multiple join statements.
![092443z8u65a44ulxfl18k.jpg](http://itpubpic.img168.net/forum/201209/04/092443z8u65a44ulxfl18k.jpg)
All nodes can be interconnected so there is a defined and clear relationship to follow throughout the entire data structure. The relationship between the nodes can also have properties so not only can we see that X knows Y, but we can define that X has known Y for a number of years. Traversals can be done throughout the graph database in order to find all of a certain relationship type between nodes or to find nodes that all like the same thing.
There are many advantages to using a graph database:
1. Disk-based – No more complex software and server architecture required to maintain a complex or enterprise database system. Most graph storage engines are Solid-State Disk Ready and run in a binary-on-disk format to allow for faster speed.
2. Transactional – A lot of the transaction features we are used to having in relational databases has been built-in to graph databases so you get recovery, deadlock detection, etc…
3. Scalable – Several billions of nodes, relationships, properties and everything you need can run on a single machine.
4. Robust – Many companies that switched to graph databases early in the game have been running them 24/7 in production for almost 10 years.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/301743/viewspace-742610/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/301743/viewspace-742610/