nosql

数据库

回眸只為那壹抹淺笑 提交于 2019-12-08 17:00:48
1.1 数据库介绍 什么是数据库 简单的说,数据库就是一个存放计算机数据的仓库,这个仓库是按照一定的数据结构(数据结构是指数据的组织形式或数据之间的联系)来对数据进行组织和存储的,我们可以通过数据库提供的多种方法来管理其中的数据。 1.2 数据库的种类 按照早期的数据库理论,比较流行的数据库模型有三种,分别为层次式数据库、网状数据库和关系型数据库。而在当今的互联网企业中,最常用的数据库模式主要有两种,即关系型数据库和非关系型数据库。 1.2.1 关系型数据库介绍 (1)关系型数据库由来 虽然网状数据库和层次数据库已经很好地解决了数据的集中和共享问题,但是在数据独立和抽象级别上仍有很大欠缺。用户在对这两种数据库进行存取时,仍然需要明确数据的存储结构,指出存取路径。而关系数据库就可以比较好地解决这些问题。 (2)关系型数据库介绍 关系型数据库模型是把复杂的数据结构归结为简单的二元关系(即二维表格形式)。在关系型数据库中,对数据的操作几乎全部建立在一个或多个关系表格上,通过这些关联的表格分类、合并、连接或选取等运算来实现数据的管理。 关系型数据库诞生距今已有40多年了,从理论产生到发展到实现产品,例如:常见的MySQL和Oracle数据库,oracle在数据库领域里上升到了霸主地位,形成每年高达数百亿美元的庞大产业市场,而MySQL也是不容忽视的数据库,以至于被Oracle重金收购了。

When to use NoSql, and which one? [closed]

一世执手 提交于 2019-12-08 16:54:08
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 8 years ago . I've been programming with php and mySql for a while now and recently decided that I wanted to give nosql a try. I would really

mongodb sharding replica sets with authentication via keyfile

↘锁芯ラ 提交于 2019-12-08 10:00:37
问题 We are having two replica sets and one artiber node. In the replica set one is designated as primary and other as secondary. When one of them is shut down, automatically the other one takes over as primary. But under unforseen situations, when both the primary and secondary are down (also the arbiter) and when we restart them, the rs.status shows both as SECONDARY. None of them gets elected as primary. rs.status displays an error as below (NOTE: We tried changing the priority of pri/secondary

Filtering records in MongoDB using a date value

蹲街弑〆低调 提交于 2019-12-08 09:27:26
问题 In a MongoDB collection i have a record as follows : { "_id" : ObjectId("4d0d3945e69a56cf504375b7"), "action" : "Click", "dt" : "Sun Dec 19 2010 03:44:21 GMT+0000 (UTC)","url":"http://www.google.com"} If i search using db.mycollection.find({url:'http://www.google.com'}) ,the record shows up , but if i search by the date parameter using db.mycollection.find({dt:'Sun Dec 19 2010 03:44:21 GMT+0000 (UTC)'}) the record does not show up . What is wrong about command db.mycollection.find({dt:'Sun

Issues while setting up ArangoDB Cluster

荒凉一梦 提交于 2019-12-08 09:23:13
问题 Recently I was trying to setup a development cluster on my local machine in ArangoDB. I tried to create a cluster through the web interface, I got this error stating: " Error while starting the cluster: Unauthorized ". The first time I tried doing it, it doesn't show any error, but kept asking for username and password again and again, and shows: Coordinator User invalid . My ArangoDB version is 2.6.8 Where have I gone wrong? 回答1: The ArangoDB Cluster abilities are migrated to Apache Mesos

In Elasticsearch, can multiple top-level documents share a single nested document?

自古美人都是妖i 提交于 2019-12-08 08:43:49
问题 Elasticsearch has nested documents (great). I'd like to use this to store Messages (top-level document) and their Authors (nested document). Since one author can have many many messages -- can one version of the Author be referenced as the child of multiple Messages? That way, if you update the Author data in one place, it would update everywhere they're referenced. NB: This is related to: How to do a join in Elasticsearch -- or at the Lucene level -- an answer here might solve that too. 回答1:

How to handle message that failed to response success, but success commit to database

荒凉一梦 提交于 2019-12-08 08:41:17
问题 I have some question about handling message that failed to response success, but success commit to database. The design that I think is for guarantee processing message once. Following sequences are step for handling. Question is included on statements with ★ 1) Fetch message from Message Queue -> When failed after this, MQ will timeout & retry 2) Cache.SetIfNotExist(MessageId, MyId, Timeout) ProcessingTime < Cache.Timeout < MQ.Timeout * This make ownership for message -> When failed after

PHP-Driver DataStax Cassandra DB - How to use?

╄→гoц情女王★ 提交于 2019-12-08 08:14:50
问题 I've done the installation process as following: System PHP 7.0.5-1~dotdeb+8.1 (cli) ( NTS ) Debian 8 Nginx 1.8.1 Laravel 5.2 Java Installation mkdir -p /usr/lib/jvm wget URL to Oraclesite mv mv jdk-8u77-linux-x64.tar.gz\?... jdk-8u77-linux-x64.tar.gz tar xzf jdk-8u77-linux-x64.tar.gz rm jdk-8u77-linux-x64.tar.gz update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.8.0_version/bin/java" 1 update-alternatives --set java /usr/lib/jvm/jdk1.8.0_version/bin/java Install needed

Neo4j…how to get a visual representation of my data?

可紊 提交于 2019-12-08 07:59:41
问题 I have loaded an embedded instance of Neo4j with some data, and would like to know how I can now view this graph. I saw an intro video here: http://video.neo4j.org/m9FD/how-to-get-started-with-neo4j-119/. Here the guy opened an instance in his web browser via Heroku and was able not only see the data in the graph, but also enter new data and search for both nodes and relationships . How do I see the data I have entered into the graph-database? graphDb = new GraphDatabaseFactory()

What is considered as a document in mongoDB?

筅森魡賤 提交于 2019-12-08 07:39:29
问题 I have been learning mongoDb for past two days,I've been confusing with documents and their limits,and how to overcome the limits.What is a differnce between documents and collection. 回答1: To roughly compare it with a traditional RDBMS: RDBMS | MongoDB _________________________________________ Database | Database Table | Collection Tuple/Row | Document column | Field Primary Key | Primary Key (Default key _id provided by mongodb itself) Processes: Database Server(Daemon process) and Client