当前位置:首页 » 编程语言 » neo4jsql
扩展阅读
webinf下怎么引入js 2023-08-31 21:54:13
堡垒机怎么打开web 2023-08-31 21:54:11

neo4jsql

发布时间: 2023-03-20 09:49:11

❶ 关于图数据库neo4j的关系建立

Neo4J的安装使用非常简单。下载一个稳定版本,解压,运行Neo4j.bat(windows版本) 即可。下载地址http://www.neo4j.org/download , 目前比较好用的稳定版本是1.9.1。
然后可以访问WEB管理界面,地址:http://localhost:7474/webadmin

Neo4J的使用方式包括:
1)可以写程序,添加,更新,用JAVA,Python,PHP, .NET等语言都可以实现。
2)可以用命令行,添加,更新,查看,Neo4J提供基于WEB的执行界面,提供类sql语言执行,这些语言包括Cypher,Gremlin等。
如下图:

3)可以基于Neo4J提供的WEB UI界面添加,更新节点和关系,如下:

4) 可以使用附加工具(ETL)导入数据。也可以从关系数据库中导入数据。

❷ 图计算引擎Neo4j和Graphscope有什么区别

Neo4j是单机系统,主要做图数据库。GraphScope是由阿里巴巴达摩院智能计算实验室研发的图计算平台,是全球首个一站式超大规模分布式图计算平台,并且还入选了中 国科学技术协会“科创中 国”平台。Graphscope的代码在github.com/alibaba/graphscope上开源。SSSP算法上,GraphScope单机模式下平均要比Neo4j快176.38倍,最快在datagen-9.2_zf数据集上快了292.2倍。

❸ 想问一下图数据库neo4j和spark下面的graphx有什么区别

Neo4j就是一个数据库(可以理解成一个类似HBASE的东西,不过Neo4j是几乎是单机数据库,于HBASE不同,HBASE的数据时存储
HDFS上,由HDFS进行维护,HDFS将数据存储在exfat等单机文件系统上。Neo4j直接将数据格式化到单机文件系统)
每一个服务器保存完整的图数据。
GraphX是一个计算引擎(类似于maprece的东西),它的数据是从SHARK中使用SQL读取数据,或者RDD运算符从文件中读取,然后直接进行计算
另外数据库和计算引擎都可以进行计算任务,不过数据库的接口比较弱,只支持简单的查询
计算引擎提供了强大的计算接口,方便了编程,可以很容易的实现pagerank等图算法
GraphX做数据挖掘应该更方便,有通用的编程几口
Neo4j就需要自己写代码了 编程比较麻烦,不过性能上或许有优势

❹ 有哪些轻型的非关系型数据库

常见的非关系型数据库有:1、mongodb;2、cassandra;3、redis;4、hbase;5、neo4j。其中mongodb是非常着名的NoSQL数据库,它是一个面向文档的开源数据库。
常见的几种非关系型数据库:
1、MongoDB
MongoDB是最着名的NoSQL数据库。它是一个面向文档的开源数据库。MongoDB是一个可伸缩和可访问的数据库。它在c++中。MongoDB同样可以用作文件系统。在MongoDB中,JavaScript可以作为查询语言使用。通过使用sharding MongoDB水平伸缩。它在流行的JavaScript框架中非常有用。
人们真的很享受分片、高级文本搜索、gridFS和map-rece功能。惊人的性能和新特性使这个NoSQL数据库在我们的列表中名列第一。
特点:提供高性能;自动分片;运行在多个服务器上;支持主从复制;数据以JSON样式文档的形式存储;索引文档中的任何字段;由于数据被放置在碎片中,所以它具有自动负载平衡配置;支持正则表达式搜索;在失败的情况下易于管理。
优点:易于安装MongoDB;MongoDB Inc.为客户提供专业支持;支持临时查询;高速数据库;无模式数据库;横向扩展数据库;性能非常高。
缺点:不支持连接;数据量大;嵌套文档是有限的;增加不必要的内存使用。
2、Cassandra
Cassandra是Facebook为收件箱搜索开发的。Cassandra是一个用于处理大量结构化数据的分布式数据存储系统。通常,这些数据分布在许多普通服务器上。您还可以添加数据存储容量,使您的服务保持在线,您可以轻松地完成这项任务。由于集群中的所有节点都是相同的,因此不需要处理复杂的配置。
Cassandra是用Java编写的。Cassandra查询语言(CQL)是查询Cassandra数据库的一种类似sql的语言。因此,Cassandra在最佳开源数据库中排名第二。Facebook、Twitter、思科(Cisco)、Rackspace、eBay、Twitter、Netflix等一些最大的公司都在使用Cassandra。
特点:线性可伸缩;;保持快速响应时间;支持原子性、一致性、隔离性和耐久性(ACID)等属性;使用Apache Hadoop支持MapRece;分配数据的最大灵活性;高度可伸缩;点对点架构。
优点:高度可伸缩;无单点故障;Multi-DC复制;与其他基于JVM的应用程序紧密集成;更适合多数据中心部署、冗余、故障转移和灾难恢复。
缺点:对聚合的有限支持;不可预知的性能;不支持特别查询。
3、Redis
Redis是一个键值存储。此外,它是最着名的键值存储。Redis支持一些c++、PHP、Ruby、Python、Perl、Scala等等。Redis是用C语言编写的。此外,它是根据BSD授权的。
特点:自动故障转移;将其数据库完全保存在内存中;事务;Lua脚本;将数据复制到任意数量的从属服务器;钥匙的寿命有限;LRU驱逐钥匙;支持发布/订阅。
优点:支持多种数据类型;很容易安装;非常快(每秒执行约11万组,每秒执行约81000次);操作都是原子的;多用途工具(在许多用例中使用)。
缺点:不支持连接;存储过程所需的Lua知识;数据集必须很好地适应内存。
4、HBase
HBase是一个分布式的、面向列的开源数据库,该技术来源于 Fay Chang 所撰写的Google论文“Bigtable:一个结构化数据的分布式存储系统”。就像Bigtable利用了Google文件系统(File System)所提供的分布式数据存储一样,HBase在Hadoop之上提供了类似于Bigtable的能力。
HBase是Apache的Hadoop项目的子项目。HBase不同于一般的关系数据库,它是一个适合于非结构化数据存储的数据库。另一个不同的是HBase基于列的而不是基于行的模式。
5、neo4j
Neo4j被称为原生图数据库,因为它有效地实现了属性图模型,一直到存储层。这意味着数据完全按照白板的方式存储,数据库使用指针导航和遍历图。Neo4j有数据库的社区版和企业版。企业版包括Community Edition必须提供的所有功能,以及额外的企业需求,如备份、集群和故障转移功能。
特点:它支持唯一的约束;Neo4j支持完整的ACID(原子性、一致性、隔离性和持久性)规则;Java API: Cypher API和本机Java API;使用Apache Lucence索引;简单查询语言Neo4j CQL;包含用于执行CQL命令的UI: Neo4j Data Browser。
优点:容易检索其相邻节点或关系细节,无需连接或索引;易于学习Neo4j CQL查询语言命令;不需要复杂的连接来检索数据;非常容易地表示半结构化数据;大型企业实时应用程序的高可用性;简化的调优。
缺点:不支持分片

❺ 如何在java程序中引入neo4j数据库

neo4j采纳java语言开发,如果我们要在java程序中以内嵌方式应用neo4j,只需导入neo4j的对应包即可。
首先,我们来创建一个maven项目并改动pom.xml添加对neo4j的依附。
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 "> <modelVersion>4.0.0</modelVersion> <groupId>neo4j-learn</groupId> <artifactId>neo4j-learn</artifactId> <version>1.0-SNAPSHOT</version> <dependencies> <dependency> <groupId>org.neo4j</groupId> <artifactId>neo4j</artifactId> <version>1.9.4</version> </dependency> </dependencies> </project>
然后,我们在项目中创建一个neo4j.properties(数据库的配置文件)文件和一个java类(调用数据库)。
neo4j.properties
# Default values for the low-level graph engine #neostore.nodestore.db.mapped_memory=25M #neostore.relationshipstore.db.mapped_memory=50M #neostore.propertystore.db.mapped_memory=90M #neostore.propertystore.db.strings.mapped_memory=130M #neostore.propertystore.db.arrays.mapped_memory=130M # Autoindexing # Enable auto-indexing for nodes, default is false #node_auto_indexing=true # The node property keys to be auto-indexed, if enabled #node_keys_indexable=name,age # Enable auto-indexing for relationships, default is false #relationship_auto_indexing=true # The relationship property keys to be auto-indexed, if enabled #relationship_keys_indexable=name,age # Keep logical logs, needed for online backups to work keep_logical_logs=true # Enable online backups to be taken from this database. online_backup_enabled=true # Uncomment and specify these lines for running Neo4j in High Availability mode. # ha.server_id is a unique integer for each instance of the Neo4j database in the cluster. # (as opposed to the coordinator instance IDs) # example: ha.server_id=1 #ha.server_id= # ha.coordinators is a comma-separated list (without spaces) of the host:port of where to # find one or more of the Neo4j coordinator servers. # Avoid localhost e to IP resolution issues on some systems. # example: ha.coordinators=localhost:2181,1.2.3.4:4321 #ha.coordinators=localhost:2181 # You can also, optionally, configure the ha.cluster_name. This is the name of the cluster this # instance is supposed to join. Accepted characters are alphabetical, numerical, dot and dash. # This configuration is useful if you have multiple Neo4j HA clusters managed by the same # Coordinator cluster. # Example: ha.cluster_name = my.neo4j.ha.cluster #ha.cluster_name = # IP and port for this instance to bind to to communicate data with the # other neo4j instances in the cluster. This is broadcasted to the other # cluster members, so different members can have different communication ports. # Optional if the members are on different machines so the IP is different for every member. #ha.server = localhost:6001 # The interval at which slaves will pull updates from the master. Comment out # the option to disable periodic pulling of updates. Unit is seconds. ha.pull_interval = 10 # The session timeout for the zookeeper client. Lower values make new master # election happen closer to the master loosing connection but also more sensitive # to zookeeper quorum hiccups. If experiencing master switches without reason # consider increasing this value. Unit is seconds #ha.zk_session_timeout = 5 # Amount of slaves the master will try to push a transaction to upon commit (default is 1). # The master will optimistically continue and not fail the transaction even if it fails to # reach the push factor. Setting this to 0 will increase write performance when writing # through master but could potentially lead to branched data (or loss of transaction) # if the master goes down. #ha.tx_push_factor=1 # Strategy the master will use when pushing data to slaves (if the push factor is greater than 0). # There are two options available "fixed" (default) or "round_robin". Fixed will start by # pushing to slaves ordered by server id (highest first) improving performance since the # slaves only have to cache up one transaction at a time. #ha.tx_push_strategy=fixed # Enable this to be able to upgrade a store from 1.4 -> 1.5 or 1.4 -> 1.6 #allow_store_upgrade=true # Enable this to specify a parser other than the default one. 1.5, 1.6, 1.7 are available #cypher_parser_version=1.6
java文件(neo4j示例文件改动而来)