Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x

NoSQL Databases

124

Solutions

242

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

hi how do i add column in mongo db where do i run this
db.your_collection.update({},{$set : {"new_field":1}},false,true)
0
I've read about caching the asp.net viewstate using "NCache".  Can this also be done with a Redis cache such as from Azure?

0
hi i have gui which get value from mongo db how can i populate value this is my gui
Capturetab12.PNGsomething like this
hi how can I search value from database using combobox for example I enter username and return the detail of that username something like this
import javax.swing.*;
import org.jdesktop.swingx.autocomplete.AutoCompleteDecorator;//where do I get this am getting error is not recognise
import java.awt.*;

public class Demo {

    JFrame frame = new JFrame("");
    AutoCompleteDecorator decorator;
    JComboBox combobox;

    public Demo() {
        combobox = new JComboBox(new Object[]{"","Ester", "Jordi",
            "Jordina", "Jorge", "Sergi"});//I what to searc from database
        AutoCompleteDecorator.decorate(combobox);
        frame.setSize(400,400);
        frame.setLocationRelativeTo(null);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setLayout(new FlowLayout());

        frame.add(combobox);
        frame.setVisible(true);
    }

    public static void main(String[] args) {
        Demo d = new Demo();
    }
}

Open in new window

0
hi how can I search value from database using combobox for example I enter username and return the detail of that username

this is my code
      
public CreateUserGUI()
	{
		
	//	backPanel = new JPanel(new GridBagLayout());
	//	topPanel = new JPanel(new GridBagLayout());
		JTabbedPane jtp = new JTabbedPane();
		 getContentPane().add(jtp);
		
		
		
    	JPanel jp1 = new JPanel();
        JPanel jp2 = new JPanel();
        JPanel jp3 = new JPanel();
        JPanel jp4 = new JPanel();
		
		nameLabel = new JLabel("Name : ");
	    txtName = new JTextField(15);
		txtName.setMinimumSize(txtName.getPreferredSize());
		
		
		 JLabel label1 = new JLabel();
        label1.setText("You are in area of creating new User");
        JLabel label2 = new JLabel();
        label2.setText("You are in area of Updating user Information");
        JLabel label3 = new JLabel();
        label3.setText("You are in area of seting  user Inactive");
        JLabel label4 = new JLabel();
        label4.setText("You are in area to Search user Information");
        
        
        
         
			
	    	surnameLabel = new JLabel("Surname : ");
	    	txtSurname = new JTextField(15);
	    	txtSurname.setMinimumSize(	txtSurname.getPreferredSize());
	    	
	    	
	    	usernameLabel = new JLabel("Username : ");
	    	txtUsername = new JTextField(15);
	    	txtUsername.setMinimumSize(	txtUsername.getPreferredSize());
	    	
	    	passwordLabel = new JLabel("Password : ");
	    	passwordField = new  

Open in new window

0
I have a JDBC ResultSet that has data in a row fashion, e.g. name | value, I want to transpose that data into columns and put it into a csv file.  Can someone help me with the algorithm?  Thanks.
0
I have a production mongo 2.6 DB running across 9 Linux instances in AWS. It is replicated and sharded across 2 regions, and all disks are in RAID10. I'm working to restore the prod DB into a staging environment that has replication turned on but sharding not configured yet. The dump is 103GB. 91GB of which resides in a single collection.

Attempting to restore the entire DB in stage fails reliably when the restore reaches the creation of indexes on the large collection. The error is not very informative, and unfortunately this is all I get even with log verbosity turned up:

Socket recv() conn closed? 10.0.0.1:27017 
SocketException: remote: 10.0.0.1:27017 error: 9001 socket exception [CLOSED] server [10.0.0.1:27017] 
DBClientCursor::init call() failed 
User Assertion: 10276:DBClientBase::findN: transport error: 10.0.0.1:27017 ns: c_knowledgebase.$cmd query: { getlasterror: 1 } assertion: 10276 DBClientBase::findN: transport error: 10.0.0.1:27017 ns: c_knowledgebase.$cmd query: { getlasterror: 1 }

Open in new window


The nature of the error made me suspect the restore exhausted a resource. Therefore in order to work around the issue I tried various permutations of the following:


1. using beefy EC2 instances on SSDs
2. review common mongo Linux tuning suggestions (overcommit, and ulimit settings)
3. restoring the DB in a phased approach (restoring the large collection as a separate step and making the indexes manually one at a time)

If I do #1 and #2 together I'm able to get the entire DB to restore. This doesn't solve my problem, however, as I need to understand what the root problem is, and more importantly I need to have a consistent DB restore procedure that is running on 1:1 hardware that prod is on. I'm hoping someone can offer some insight into why a restore fails under these conditions.
0
Hi,
I'm new to mongodb. How would I fix a typo in an object? I tried this query but it resulted in an error of "Unexpected token ILLEGAL"

db.mer22.update({_id:12345},{$set{"yDescription":"Candy"}})

Open in new window

1
Hi,

I want to learn about the Mongo DB and Im looking for good book as a start point.

Any suggestion on books or texts for beginners that has exp. with Oracle already (not sure if its relevant).

Tks,
Joao
0
Currently I am looking how the backup/restore be done in Cassandra. We've setup a three node cluster in AWS. I understand that using nodetool snapshot tool we can take a snapshot but it's bit cumbersome process.

My idea is : Make use of EBS snapshot because they're more durable and easy to setup but one problem which I see with EBS is inconsistency backup. Hence, my plan is run a script prior to taking EBS snapshot which would just run flush command to flush out all the memtable data and copies it on to the disk(SSTable) and then prepares the hard link with flushed SSTable. Once that's done, initiate the EBS snapshot, this was we can address the inconsistency issue which we might face if we only use EBS snapshost.

Please let me know if you see any issue with this approach or share your suggestions.
0
In this code fragment:, when I invoke the Python interpreter, I get the following error:

M:\MongoDB University\Lecture 1\bottle_framework_url_hand
  File "hello_world.py", line 15
    elif (restaurant == "abcde"):
       ^
SyntaxError: invalid syntax


   
if (restaurant == None or restaurant == ""):
        restaurant="***No restaurant selected***"
    elif (restaurant not in myrestaurants): # trying something extra...
	restaurant = "**Invalid restaurant selected**"

Open in new window


As far as I can tell, my syntax is OK. (e.g. a colon after the elif line and proper indentation. What am I missing?
Thanks,
Steve
0
Hi,

I am taking a course through MongoDB University --- online. They provided me with same sample Python (.PY) files. I tried viewing one in NOTEPAD, but the line breaks are missing, so everything is run together. I know the breaks are there, b/c when I display the file via the TYPE command, it shows properly.

How do I work around this issue? Is there a Python editor on my system?

Thanks,
Steve
0
I am new to the Node.js,MongoDB and Angular JS framework.. Where can I find some good material to do a quick start?

I also would like to know the advantages of the above technologies.
0
Dear
        our system use activemq + redis + mysql, now i would like to setup activemq cluster, how many server i needed at least ? is there any user guide for build up activemq cluster?
0
Dear
        I use redis for mysql DB cache, how can i setup Redis cluster? how many server i needed at least ? is there any user guide for build up Redis cluster
0
I can find the movie in the mongodb database, but not when I search for it from nodejs. See the code below. This only happens with this movie title, none else.

This is what I get in my mongoDB database:
db.movies.findOne({"Title": "Bridge to Terabithia"})
{
	"_id" : ObjectId("555f21f07eae877eeceb52c9"),
	"Title" : "Bridge to Terabithia",
	"Year" : "2007",
	"Rated" : "PG",
	"Released" : "16 Feb 2007",
	"Runtime" : "96 min",
	"Genre" : "Adventure, Drama, Family",
	"Director" : "Gabor Csupo",
	"Writer" : "Jeff Stockwell (screenplay), David Paterson (screenplay), Katherine Paterson (book)",
	"Actors" : "Josh Hutcherson, AnnaSophia Robb, Zooey Deschanel, Robert Patrick",
	"Plot" : "A preteen's life turns upside down when he befriends the new girl in school and they imagine a whole new fantasy world to escape reality.",
	"Language" : "English",
	"Country" : "USA, New Zealand",
	"Awards" : "6 wins & 5 nominations.",
	"Poster" : "http://ia.media-imdb.com/images/M/MV5BMTMzOTk1MzIyN15BMl5BanBnXkFtZTcwNTM3MjczMQ@@._V1_SX300.jpg",
	"Metascore" : "74",
	"imdbRating" : "7.2",
	"imdbVotes" : "97618",
	"imdbID" : "tt0398808",
	"Type" : "movie",
	"Response" : "True",
	"thumbsUp" : 0,
	"thumbsDown" : 0
}

Open in new window

When I run the following code from nodejs, I can fetch all movies by the title they have, except the movie named Bridge to Terabithia.

/**
 * getMovie function.
 * @param String title The title of the movie you are searching for
 * @param {Function} responseHandler 

Open in new window

0
Hello everybody ;

I'm on linux Redhat 6 , i've installed before Redis version 2.8 who had the problem that refuse all connection to my redis server ( but redis-server is running )

so i've deleted this version & installed a new one Redis 2.4 .

i have 2 probleme : in redis log i found this : Server started , can't handle RDB format version 6 ; Fatal error loading the DB Existing .

the second probleme it's when i ping the redis server : it's respond : Could not connect to Redis at 127.0.0.1:6379 : Connection Refused .


Redis is installed in my localhost & server is running .

Thank you
0
How to use group by date and time in mongodb?

the below work good.
rs0:PRIMARY> db.Recording.aggregate([{$group:{"_id": "$status", Count:{$sum:1}}}, {$sort:{Count:-1, _id:1}}])
{ "_id" : "Success", "Count" : 48255 }
{ "_id" : "Failed", "Count" : 153 }
{ "_id" : "Pending", "Count" : 66 }
{ "_id" : "New", "Count" : 6 }


Would like to do the above group with date and or time.
rs0:PRIMARY> db.Recording.aggregate([{$group:{ createDate: { $gt: new Date('05/14/2015')} }: "$status", Count:{$sum:1}}}, {$sort:{Count:-1}}])
2015-05-19T18:33:46.943+0000 SyntaxError: Unexpected token :
0
I just want see if my connection is open to my Mongo db

I'm lost.  This is what I have:
try
        {
             MongoServer.Create(ConfigurationManager.AppSettings["connectionstring"]);

            {

                server.Connect();
                return true;
                lbR.Text = "Open";
            }
        }
        catch
        {
            return false;
            lbR.Text = "Not Open";
        }

Open in new window

0
Hello All,

I have data sitting in HDFS in the form of Hive tables and I need to load that on a daily basis (delta load) to MongoDB.

What languages/setup/jobs/techniques I can use to achieve this reliably? Any help is highly appreciated.

Thanks,
Ravi
0
dear all,

I am reading this:

http://azure.microsoft.com/blog/2015/04/08/nosql-database-service-azure-documentdb-now-generally-available/

What is DocumentDB for ? only as a purpose on allowing applications to query and process JSON data at scale ? and it is delivered as a fully managed database-as-a-service (DBaaS) with built in high availability, SQL query over indexed JSON and multi-document
transaction processing.
?

what good is noSQL when compare with tranditional SQL ?

did DocumentDB compliance with ACID and SQL compliance ? it should not be as it is not tranditional SQL, like MS SQL, Oralce and DB2 ?
0
For some business web application in the future I would like to use this constellation :
- web site designed in in html/css/javascript/JQuery (Single Page)
- using https
- using stateless authentication
- get content/data (maybe sensitive) from web services (HttpSelfHostServer with Prepared SQL Statements) returning JSON to the Javascript site

I read much about web site security and I'm worried about the fact, if this is a secure combination.

Can you help me to get a recommendation ?
Is there a kind of trap I will fall into ?

Thanks for your evaluation (and the appropriate arguments).

Gerhard
0
How to convert 250 tables data with 90 GB of database data to mongodb. please let me know the approach

Thanks
0
If I wanted a PaaS with the following options:

> Good Market share so it will be around ain a coupl eyears

> Mongo DB

> AMQP 1.0 Provider

>  and of course an Apache

Which PaaS would I choose
0
I have a mongodb document that is autogenerated that uses dashes in field names.  How do I construct a query or assignment that uses them ?   It doesn't like embedded dashes and I can't figure out how to escape the field names so I can use them as variables in expressions.

 
"Doc" : [
  {
    "field-1" : "alpha",
    "stuff": {
       "more-stuff" :  1,
       "even-more-stuff" : 2,
       "embedded-array" : [ 
          {
            "e-1": 100, 
           "e-2":101
          }
       ]
      } 
  },
  {
     "field-1" : "beta",
     "stuff": {
       "more-stuff" :  3,
       "even-more-stuff" : 4,
       "the-cookie":55
        } 
  }
]

Open in new window


How would I assign x to the field name associated with "The cookie" and then, so It is a better learning experience, create a cursor on "embedded-array" so a jsonprint(EmbeddedArray")  reports the e-1 and e-2 fields and values?
0
I have a Node project which uses Express and MySQL, but I need an ORM. I have heard good things about Waterline.

What can you tell me about which ORM to use? Do I need Sales.JS if I want Waterline?

I have a new project so it's the best time for new frameworks, and would consider Sales.JS is there was real benefit. But I do consider the current framework to be MVC, which I suspect comes from Express: Models, Views and Routes.

I like Waterline since I may need MongoDb at some point, but expect to use MySQL exclusively, for a long while.

Thanks!
0

NoSQL Databases

124

Solutions

242

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
>