NoSQL Databases

122

Solutions

239

Contributors

A NoSQL database provides a mechanism for storage and retrieval of data which is modeled in means other than the tabular relations used in relational databases. Motivations for this approach include: simplicity of design, simpler "horizontal" scaling to clusters of machines and finer control over availability. The data structures used by NoSQL databases (e.g. key-value, wide column, graph, or document) are specified from those used by default in relational databases, making some operations faster in NoSQL. Sometimes the data structures used by NoSQL databases are also viewed as "more flexible" than relational database tables.

Share tech news, updates, or what's on your mind.

Sign up to Post

I just installed ElasticSearch, MongoDB, GrayLog2 but getting an error and unable to access the web interface. Please, suggest any solution r

/etc/elasticsearch
# ls -lrtha
drwxr-x---.  2 root elasticsearch    6 Apr 24 16:29 scripts
-rwxr-x---.  1 root elasticsearch 2.6K Apr 24 16:04 logging.yml
-rwxr-x---.  1 root elasticsearch 3.2K Jul 20 05:05 elasticsearch.yml


/var/log/graylog-server/server.log

2017-07-20T07:50:36.694Z INFO  [CmdLineTool] Loaded plugin: Elastic Beats Input 2.2.3 [org.graylog.plugins.beats.BeatsInputPlugin]
2017-07-20T07:50:36.696Z INFO  [CmdLineTool] Loaded plugin: Collector 2.2.3 [org.graylog.plugins.collector.CollectorPlugin]
2017-07-20T07:50:36.699Z INFO  [CmdLineTool] Loaded plugin: Enterprise Integration Plugin 2.2.3 [org.graylog.plugins.enterprise_integration.EnterpriseIntegrationPlugin]
2017-07-20T07:50:36.700Z INFO  [CmdLineTool] Loaded plugin: MapWidgetPlugin 2.2.3 [org.graylog.plugins.map.MapWidgetPlugin]
2017-07-20T07:50:36.708Z INFO  [CmdLineTool] Loaded plugin: Pipeline Processor Plugin 2.2.3 [org.graylog.plugins.pipelineprocessor.ProcessorPlugin]
2017-07-20T07:50:36.709Z INFO  [CmdLineTool] Loaded plugin: Anonymous Usage Statistics 2.2.3 [org.graylog.plugins.usagestatistics.UsageStatsPlugin]
2017-07-20T07:50:36.813Z ERROR [CmdLineTool] Invalid configuration
com.github.joschi.jadconfig.ValidationException: Cannot read file elasticsearch_config_file at path /etc/elasticsearch/elasticsearch.yml. Please specify the correct …
0
Percona Monitoring and Management and Grafana
LVL 2
Percona Monitoring and Management and Grafana

Proactive monitoring is vital to a highly-available environment. We have a quick start guide on Experts Exchange for Grafana users.

I am building a registration form in node.js using mongoDB.  When I submit my form, it shows blank.  Any ideas?

Here's my code.

vendor.js in my models forlder
//Create model for vendor
const mongoose = require('mongoose');
const Schema = mongoose.Schema;

//Schema for vendor
const vendorSchema = new Schema({
  firstName: String,
  lastName: String,
  phoneNumber: String,
  email: String,
  description: String,
  businessName: String
})

const Vendor = mongoose.model( 'Vendor', vendorSchema );

module.exports = Vendor

Open in new window


vendor.js in my routes folder
const express = require('express')

const Vendor = require('../models/vendor.js')

const vendorRouter = express.Router()

//define Routers
//url: Localhost:3000/vender/registration
console.log("Vendor Router")

vendorRouter.get('/', (req,res) =>{
  res.render('registration')
})
vendorRouter.post('/thanks', (req, res) => {
  console.log(req.body.firstName);
  let newVendor = new Vendor({
    firstName: req.body.firstName,
    lastName: req.body.lastName,
    phoneNumber: req.body.phoneNumber,
    email: req.body.email,
    description: req.body.description,
    businessName: req.body.businessName
  })
	newVendor.save()
	res.redirect('thanks')
})

vendorRouter.get('/thanks', (req,res) =>{
  res.render('thanks')
})

vendorRouter.get('/forgotpassword', (req, res) => {
  res.render('forgotpassword')
})

module.exports = vendorRouter

Open in new window


img dir
Here's how I know blanks are coming in.  Table is populated but noting is showing
img
Here's the page using handlebars
<table id="tblArtist" class="display" cellspacing="0" width="100%" border="1">
<thead>
	<tr>
    <th>First Name</th>
    <th>Last Name</th>
		<th>Phone Number</th>
		<th>Email</th>
	</tr>
</thead>	
<tbody>
{{#each vendors }}
  <tr>
    <td>{{ firstName }}</td>
    <td>{{ lastName }}</td>
    <td>{{ phoneNumber }}    </th>
    <td>{{ email }} </td>
  </tr>
{{/each}}
</tbody>
</table>

Open in new window

0
Hi,

Please bear with me, my Mongo knowledge is minimal and my google foo has failed me after an hour or two.

I have data in Mongo that looks as follows:

{
    "_id" : ObjectId("xxxx"),
    "applicationData" : {
        "groups" : [
            "group1",
                  "group2",
        ],
        "status" : "ok"
    },
    "appid" : "UID0001",
}

{
    "_id" : ObjectId("yyyy"),
    "applicationData" : {
        "groups" : [
                  "group2"
        ],
        "status" : "ok"
    },
    "appid" : "UID0001",
}

From this I'm wanting to group by the content of "groups" and the appid an get a count - the result would be as follows:

group1  UID0001 1
group2  UID0001 2

One step further would be that I'd only like it to report where the "count" is greater than 1

How can I achieve this?

I guess, in SQL, it would be:

select groups, appid, count(*) from db having count(*) > 1

I'm not having much (any) success, further complicated with one of the values I'm wanting to group by is in an Array.

Thanks in advance
0
I am using php and mongoDb. I am new to mongoDb, but fine with php.  In my mongoDb database I have a  collection called 'users' with a number of fields such as firstname, lastname etc. There are a number of users.


I also have a field/collection in some users called web_links which contains an array.
ie: within my users document:
{
    "_id" : ObjectId("587af11ec09cf31a1955ed92"),
    "username" : "mike",
    "firstname" : "Mike",
    "lastname" : "Tester",
    "email" : "mike@test.com",
    "web_links" : [
        {
            "name" : "google",
            "link" : "https://google.com",
            "status" : "1",
            "added" : ISODate("1970-01-18T08:00:57.600Z")
        },
        {
            "name" : "yahoo",
            "link" : "https://yahoo.com",
            "status" : "1",
            "added" : ISODate("1970-01-18T08:00:57.600Z")
        }
    ]
}

I am trying to firstly update the status of an array item.
I have got as far as this ->

$name = 'google';
$newstatus = '0';

$this->database->users->updateOne(['_id'=>new MongoDB\BSON\ObjectId($userid)],['web_links.name'=>$name],['$set'=>['web_links.$.status'=>$newstatus]]);

This is returning the following error via firebug:
Uncaught exception 'MongoDB\Exception\InvalidArgumentException' with message 'First
 key in $update argument is not an update operator'.

I have tried to change $set to $push, but that is not the answer.

I would be very grateful for assistance …
0
I am learning Angular, Node, npm, deployd, mongodb, etc.  I am making my way through a book titled "Pro AngularJS" by Adam Freeman.

on page 120 I am attempting to prepare the data for a "real world" application called "sportsstore".

I was instructed to install a module called "deployd" which apparently is used for modelling  API's for web applications.

I did that and when I try to start start the "deployd" service I get an error:

C:\PROGRA~2\deployd>dpd -p 5500 sportsstore\app.dpd --mongod
starting deployd v0.8.9...
internal/child_process.js:289
  var err = this._handle.spawn(options);
                         ^

TypeError: Bad argument
    at TypeError (native)
    at ChildProcess.spawn (internal/child_process.js:289:26)
    at exports.spawn (child_process.js:380:9)
    at Object.exports.restart (C:\Users\knowlton\AppData\Roaming\npm\node_modules\deployd\lib\util\mongod.js:38:14)
    at Command.start (C:\Users\knowlton\AppData\Roaming\npm\node_modules\deployd\bin\dpd:149:16)
    at Command.listener (C:\Users\knowlton\AppData\Roaming\npm\node_modules\deployd\node_modules\commander\index.js:301:8)
    at emitOne (events.js:96:13)
    at Command.emit (events.js:188:7)
    at Command.parseArgs (C:\Users\knowlton\AppData\Roaming\npm\node_modules\deployd\node_modules\commander\index.js:617:12)
    at Command.parse (C:\Users\knowlton\AppData\Roaming\npm\node_modules\deployd\node_modules\commander\index.js:458:21)
    at Object.<anonymous> 

Open in new window

0
I’m looking for a good architecture to be able to efficiently query data currently stored in NoSQL dbs (specifically DocumentDB).

We have a number of microservices that manage various entities (say client, product etc). Each store their data locally (in DocumentDB). We want to create another microservice that provides the ability for real time (latency on the order of seconds) ad-hoc queries over this data.

One option is to replicate all this data and store it in an SQL db, and build the query service on top of it. I expect this would make the queries quite fast, especially if we index all columns. (Of course, since this data keeps changing, we’d listen to a message queue for db updates.)

Is this the best way? How do companies go about building ad-hoc query functionality of NoSQL data? This seems like a problem that many large companies would have to solve. (I am new to NoSQL and microservice architecture, so I might be missing something basic.) Any suggestion/alternatives are appreciated.
0
Hello Experts,

Any advice on how to export data from Apache Cassandra using local windows machine?

Please assist
thank you
0
Hi,

I would like to know how to ensure primary key in the dynamo db. is there is any way to do that,,, Any example which can
help us.

roy..
0
I have a mongodb cluster running fine. It forces SSL by policy. DB serves content to frontend/web fine. I can connect to it via mongo shell and mongos fine.

I also have sensu up and running with no issues on any plugins accept the mongo plug in. Here is the mongo plugin I'm using
https://github.com/sensu-plugins/sensu-plugins-mongodb

It's called mongodb.py and here is an example of how sensu runs the script
./check-mongodb.py --ssl --host 10.0.0.1 --port 12345 --user=USER --pass=123456789 --action=connections

Which gives this error:
CRITICAL - General MongoDB Error: `ssl_cert_reqs` is not ssl.CERT_NONE and no system CA certificates could be loaded. `ssl_ca_certs` is required.

I'm not a python or SSL expert. And I'm a mongodb novice. If I had to guess this has something to do with python not finding or not liking a CA cert. The certs are all self signed internal only.  Maybe it's because it's self signed? It's really bizarre because again, everything else mongo and SSL related works fine. It's only something about this particular script that's failing.

Any help is appreciated.
0
Hello  ,

i'm new member here , so i say hi to everybody , i'm working on integration project of supervision ( monitoring ) . the Server is RHEL 6 & Redis server installed is 2.8 , redis server is running , but when i try to start my sensu server it generate a problem . "  unable to connect to redis server " in sensu-server log
0

NoSQL Databases

122

Solutions

239

Contributors

A NoSQL database provides a mechanism for storage and retrieval of data which is modeled in means other than the tabular relations used in relational databases. Motivations for this approach include: simplicity of design, simpler "horizontal" scaling to clusters of machines and finer control over availability. The data structures used by NoSQL databases (e.g. key-value, wide column, graph, or document) are specified from those used by default in relational databases, making some operations faster in NoSQL. Sometimes the data structures used by NoSQL databases are also viewed as "more flexible" than relational database tables.

Top Experts In
NoSQL Databases
<
Monthly
>