In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
Most people do not understand the knowledge points of this "what is the picture database" article, so the editor summarizes the following contents, detailed contents, clear steps, and has a certain reference value. I hope you can gain something after reading this article. Let's take a look at this "what is a map database" article.
With the rapid development of social, e-commerce, finance, retail, Internet of things and other industries, the real society has woven a huge and complex relationship network, the traditional database is very difficult to deal with relational operations.
The relationship between data that big data industry needs to deal with grows geometrically with the amount of data. There is an urgent need for a database that supports massive and complex data relational operations, and the graph database arises at the historic moment.
Many famous companies in the world are using graph databases. For example:
Social domain: Facebook, Twitter,Linkedin uses it to manage social relationships and implement friend recommendations
Retail: eBay, Wal-Mart uses it to make real-time product recommendations, giving buyers a better shopping experience
Financial sector: banks such as JPMorgan Chase, Citigroup and UBS are using chart databases for risk control
Car manufacturing: top automakers such as Volvo, Daimler and Toyota rely on map databases to drive innovative manufacturing solutions
Telecommunications: telecom companies such as Verizon, Orange and AT&T rely on graph databases to manage the network, control access and support customers
Hotel sector: top hotel companies such as Marriott and Accor use map databases to manage complex and rapidly changing inventory
Since the graph database is so widely used, more and more enterprises and developers begin to use it, so what's so special about it? let's unveil its mystery.
Why Graph DB?
Students who have taken such a course in data structure should have more or less graphic concepts in mind.
What is a picture?
The diagram consists of two elements: nodes and relationships.
Each node represents an entity (person, place, thing, category, or other data), and each relationship represents how the two nodes are associated.
This common structure can model a variety of scenarios-from road systems to equipment networks, to the medical history of the population or anything else defined by relationships.
What is a graph database?
`Graph database (Graph database) ``does not refer to the database where pictures are stored, but the data is stored and queried in the data structure of graphs.
Graphic database is an online database management system that deals with the creation, reading, updating and deletion (CRUD) of graphical data models.
Unlike other databases, relationships play a primary role in graph databases. This means that the application does not have to use foreign keys or out-of-band processing (such as MapReduce) to infer data connections.
Compared with relational database or other NoSQL database, the data model of graph database is simpler and more expressive.
The graphical database is built for use with transactional (OLTP) systems and is designed with transactional integrity and operational availability in mind.
Two important attributes
There are also some differences between map databases on the market according to different storage and processing models.
For example:
Neo4J belongs to the original graph database, and the back-end storage it uses is specially customized and optimized for the graph database such as Neo4J. Theoretically, it can be more conducive to the performance of the graph database.
JanusGraph is not an original map database, but stores the data on other systems, such as Hbase.
① diagram storage
Some graph databases use native graph storage, which is optimized and designed to store and manage diagrams.
Not all graph databases use native graph storage, and some graph databases serialize graph data and then save it to relational database or object-oriented database, or other general data storage.
② diagram processing engine
Native graph processing (also known as indexed adjacency) is the most efficient way to process graph data because connected nodes physically point to each other in the database. Non-native graph processing uses other methods to handle CRUD operations.
Comparison with NoSQL database
NoSQL databases can be roughly divided into four categories:
Key value (key/value) database
Column storage database
Document database
Graph database
Comparison with relational database
Relational databases are actually not good at dealing with relationships. In many scenarios, your business requirements go completely beyond the current database architecture.
Take Chestnut for example: suppose there are several tables of users, orders, and goods in a relational database:
When we ask: "what goods did the user buy?" Or "which customers have bought this product?" It requires developers to JOIN several tables, which is very inefficient.
And "what else did the customer who bought the product buy?" Similar queries are almost impossible to implement.
Performance comparison of relational query
In data relations centers, graphical databases are very efficient in terms of query speed, even for deep and complex queries. In the book Neo4j in Action, the author conducts experiments between relational databases and graphical databases (Neo4j).
Their experiment tried to find friends of friends with a maximum depth of 5 on a social network. Their data set includes 1 million people, each with about 50 friends.
The experimental results are as follows:
When the depth is 2 (that is, the friend of a friend), the difference in the performance of the two databases is not very obvious; when the depth is 3 (that is, the friend of a friend), it is obvious that the response time of the relational database is 30s, which has become unacceptable; when the depth is 4, the relational database needs nearly half an hour to return the results, so that it can not be applied to the online system; when the depth is 5, the relational database can no longer complete the query.
For the graph database Neo4J, the response time is less than 3 seconds when the depth is from 3 to 5.
It can be seen that for the graph database, the larger the amount of data, the more complex the associated query, which is about conducive to reflect its advantages. From the results of the query with a depth of 4Universe 5, we can see that the graph database returns more than half the number of people on the entire social network.
Neo4J and JanuasGraph
According to DB-Engines 's newly released graph database rankings, Neo4J is still significantly ahead in the first place:
Neo4J
Neo4J is an open source graph database implemented by Java. It was developed in 2003 until the first version was officially released in 2007 and hosted on GitHub.
Neo4J supports ACID, clustering, backup, and failover. Currently, the latest version of Neo4J is 3.5, which is divided into community version and enterprise version. The community version only supports stand-alone deployment with limited functionality. Enterprise Edition supports master-slave replication and read-write separation, including visual management tools.
JanusGraph
JanusGraph is an open source distributed map database under the Linux Foundation.
JanusGraph provides an Apache2.0 software license. The project is supported by IBM, Google and Hortonworks.
JanusGraph is modified from the TitanDB graph database, and TitanDB has been developed since 2012. The latest version is 0.3.1.
JanusGraph supports a variety of storage backends (including Apache Cassandra, Apache HBase, Bigtable, Berkeley DB). The scalability of JanusGraph depends on the underlying technology used with JanusGraph.
For example, by using Apache Cassandra as the storage back end, you can simply extend JanusGraph to multiple data centers.
JanusGraph supports the analysis, reporting and ETL of global graph data through integration with big data platform (Apache Spark,Apache Giraph,Apache Hadoop).
JanusGraph supports geographic, numeric range, and full-text search through external indexed storage (Elasticsearch,Solr,Lucene).
Mark attribute graph model (1) node
Nodes are the main data elements
Nodes connect to other nodes through relationships
A node can have one or more attributes (that is, attributes stored as key / value pairs)
A node has one or more tags that describe its role in the diagram
Example: personnel node and Car node
(2) relationship
A relationship connects two nodes whose relationship is directional. A node can have multiple or even recursive relationships. It can have one or more attributes (that is, attributes stored as key / value pairs).
(3) attribute
Property is a named value, where the name (or key) is a string
Properties can be indexed and constrained
You can create a composite index from multiple attributes
(4) label
Tags are used to group nodes
A node can have multiple tags
Index tags to speed up the search for nodes in the diagram
The native label index is optimized for speed
Cypher Graph query language
Cypher is the graphic query language of Neo4j, which allows users to store and retrieve data in the graphic database.
For example, we need to find Joe's second-degree friends:
The query statement is as follows:
MATCH
(person:Person)-[: KNOWS]-(friend:Person)-[: KNOWS]-
(foaf:Person)
WHERE
Person.name = "Joe"
AND NOT (person)-[: KNOWS]-(foaf)
RETURN
Foaf
Joe knows Sally,Sally and Anna. Bob was excluded from the result because in addition to becoming a second-level friend through Sally, he was also a first-class friend.
The above is the content of this article about "what is the map database". I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.