Search Results

Search found 243 results on 10 pages for 'couchdb'.

Page 3/10 | < Previous Page | 1 2 3 4 5 6 7 8 9 10  | Next Page >

  • Select users in couchdb

    - by 2x2p1p
    Hi guys I have an HTML form for authentication of users, with SQL language is easier to extract data select name, password from users where name='nameField' and password='passwordField' In couchdb I cant use local views just temp views: curl -X POST -H 'Content-Type: application/json' -d '{"map": "function (doc) {if (doc.name === "nameField" && doc.password === "passwordField") {emit (doc.name, doc.passWord)}}"}' http://localhost:5984/somedb/_temp_view But it isnt recommended (Click here), what should I do ? :( Thanks

    Read the article

  • SQL (MySQL) vs NoSQL (CouchDB)

    - by christopher-mccann
    I am in the middle of designing a highly-scalable application which must store a lot of data. Just for example it will store lots about users and then things like a lot of their messages, comments etc. I have always used MySQL before but now I am minded to try something new like couchdb or similar which is not SQL. Does anyone have any thoughts or guidance on this?

    Read the article

  • Best document format for addressbook in CouchDB

    - by 2x2p1p
    Hi guys. I really tried, tried so hard but i cant understand couchdb :( I must record the contact of several people, should i put every contact in a single document ? codeviewer.org/view/code:df8 Or in different documents ? codeviewer.org/view/code:df9 I confused, can somebody help me ? Thanks.

    Read the article

  • How to connect Nitrogen with Couchdb using Ecouch

    - by maryjanne
    I don't understand how to make a connection with nitrogen and couchdb using ecouch, because I have a error on this connection CAUGHT ERROR: error-undef [{ecouch,db_info,["test_suite_db"]} I put ecouch in my erlang library path and I create a symlink to support/include.mk (even I don't know if it has necessary). Or if anyone know a database how can connect with nitrogen and who to make this connection.

    Read the article

  • CouchDB: accessing nested structutes in map function

    - by Vegar
    I have a document based on a xml structure that I have stored in a CouchDB database. Some of the keys contains namespaces and are on the form "namespace:key": {"mykey":{nested:key":"nested value"}} In the map function, I want to emit the nested value as a key, but the colon inside the name makes it hard... emit(doc.mykey.nested:key, doc) <-- will not work. Does anyone know how this can be solved?

    Read the article

  • Language/Framework support for Interacting With CouchDB

    - by Gordon
    I am interested in knowing if there are any server-side web application frameworks which integrate nicely with CouchDB? Does anyone have any experience in doing this? It seems like a dynamic language would be well-suited for playing with the JSON, but I am more interested in hearing about how it would fit in with the framework and the application's design.

    Read the article

  • Select top/latest 10 in couchdb?

    - by drozzy
    How would I execute a query equivalent to "select top 10" in couch db? For example I have a "schema" like so: title body modified and I want to select the last 10 modified documents. As an added bonus if anyone can come up with a way to do the same only per category. So for: title category body modified return a list of latest 10 documents in each category. I am just wandering if such a query is possible in couchdb.

    Read the article

  • CouchDB in Production

    - by NoelAdy
    I have been using CouchDB on some prototype applications and it has been brilliant, very easy to use and extremely quick. I was wondering if anyone has been using it in production and have any views on it's reliability, performance suitability for operational management etc ?? I am considering using it to support a service layer and would make use of its replication functionality. Any comments/experiences would be most welcome.

    Read the article

  • Where to find Python CouchDB tutorials?

    - by Cap
    I've been hunting around for a Python CouchDB tutorial and haven't been able to find anything very thorough. The only thing I've really found is this site, which I haven't gotten to work because I keep getting a 'connection refused' error when I try to create a database. Does anyone know where I would look for a tutorial to help me with this?

    Read the article

  • How does CouchDB handle UTF-8?

    - by borghe
    I'm quite puzzled by CouchDB: if I send a PUT request with some JSON string fields encoded as UTF-8, the non 7 bit ASCII characters get converted to the "\uXXXX" escape sequence. Is there any way to tell it not to escape UNICODE?

    Read the article

  • Could CouchDB benefit significantly from the use of BERT instead of JSON?

    - by Victor Rodrigues
    I appreciate a lot CouchDB attempt to use universal web formats in everything it does: RESTFUL HTTP methods in every interaction, JSON objects, javascript code to customize database and documents. CouchDB seems to scale pretty well, but the individual cost to make a request usually makes 'relational' people afraid of. Many small business applications should deal with only one machine and that's all. In this case the scalability talk doesn't say too much, we need more performance per request, or people will not use it. BERT (Binary ERlang Term http://bert-rpc.org/ ) has proven to be a faster and lighter format than JSON and it is native for Erlang, the language in which CouchDB is written. Could we benefit from that, using BERT documents instead of JSON ones? I'm not saying just for retrieving in views, but for everything CouchDB does, including syncing. And, as a consequence of it, use Erlang functions instead of javascript ones. This would modify some original CouchDB principles, because today it is very web oriented. Considering I imagine few people would make their database API public and usually its data is accessed by the users through an application, it would be a good deal to have the ability to configure CouchDB for working faster. HTTP+JSON calls could still be handled by CouchDB, considering an extra cost in these cases because of parsing.

    Read the article

  • Middleware for MongoDB or CouchDB with jQuery Ajax/JSON frontend

    - by Tauren
    I've been using the following web development stack for a few years: java/spring/hibernate/mysql/jetty/wicket/jquery For certain requirements, I'm considering switching to a NoSQL datastore with an AJAX frontend. I would probably build the frontend with jQuery and communicate with the web application middleware using JSON. I'm leaning toward MongoDB because of more dynamic query capabilities, but am still considering CouchDB. I'm not sure what to use in the middle. Probably something RESTful? My preference is to stick with Java (or maybe Scala or Groovy) since I'm using tools like Drools for rules and Shiro for security. But then again, I want to pick something that is quick an easy to work with, so I'm open to other solutions. If you are building ajax/json/nosql solutions, I'd like to hear details about what tools you are using and any pros/cons you've found to using them. Thanks!

    Read the article

  • How to move an element in a sorted list and keep the CouchDb write "atomic"

    - by karlthorwald
    I have elements of a list in couchdb documents. Let's say these are 3 elements in 3 documents: { "id" : "783587346", "type" : "aList", "content" : "joey", "sort" : 100.0 } { "id" : "358734ff6", "type" : "aList", "content" : "jill", "sort" : 110.0 } { "id" : "abf587346", "type" : "aList", "content" : "jack", "sort" : 120.0 } A view retrieves all "aList" documents and displays them sorted by "sort". Now I want to move the elements, when I want to move "jack" to the middle, I could do this atomic in one write and change it's sort key to 105.0. The view now returns the documents in the new sort order. After a lot of sorting I could end up with sort keys like 50.99999 and 50.99998 after some years and in extreme situations run out of digits? What can you recommend, is there a better way to do this? I'd rather keep the elements in seperate documents. Different users might edit different elements in parallel (which also can get tricky). Maybe there is a much better way?

    Read the article

  • Can I do transactions and locks in CouchDB?

    - by damian
    I need to do transactions (begin, commit or rollback), locks (select for update). How can I do it in a document model db? Edit: The case is this: I want to run an auctions site. And I think how to direct purchase as well. In a direct purchase I have to decrement the quantity field in the item record, but only if the quantity is greater than zero. That is why I need locks and transactions. I don't know how to address that without locks and/or transactions. Can I solve this with CouchDB?

    Read the article

  • Using couchdb authentication by xmpp users

    - by flossy
    Hi, I'd like use couchdb for a web application with external user authentication by a XMPP-Server (Openfire). How can I achieve that? Let's say we have thre users: [email protected] [email protected] [email protected] Now [email protected] should be able to read all documents that are suited for basic users. [email protected] should be able to read AND write all documents that are suited for basic users. [email protected] should be able to read all documents that are suited for basic and advanced users. Is that possible?

    Read the article

  • Best Practice for CouchDB Document Versioning

    - by Groundwater
    Following my question here I am exmploring ideas for a generic approach to document versioning in CouchDB. While I imagine there may be no canonical approach, I had the following idea and am looking for feedback. I would like to maintain readable document ids as much as possible, so a document existing at /document1 would contain a pointer document to all existing versions on the system. The actual revision documents would be at something like /document1/308ef032a3801a where 308ef032a3801a is some random number or hash. Example The pointer document { "_id" : "document1", "versions" : [ "document1/308ef032a3801a" ] } The version document { "_id" : "document1/308ef032a3801a", ... actual content }

    Read the article

  • Are MongoDB and CouchDB perfect substitutes?

    - by raoulsson
    I haven't got my hands dirty yet with neither CouchDB nor MongoDB but I would like to do so soon... I also have read a bit about both systems and it looks to me like they cover the same cases... Or am I missing a key distinguishing feature? I would like to use a document based storage instead of a traditional RDBMS in my next project. I also need the datastore to handle large binary objects (images and videos) automatically replicate itself to physically separate nodes rendering the need of an additional RDBMS superfluous Are both equally well suited for these requirements? Thanks!

    Read the article

  • Change notification in CouchDB when a field is set

    - by PartlyCloudy
    Hi, I'm trying to get notifications in a CouchDB change poll as soon as pre-defined field is set or changed. I've already had a look at filters that can be used for filtering change events(db/_changes?filter=myfilter). However, I've not yet found a way to include this temporal information, because you can only get the current version of the document in this filter functions. Is there any possibility to create such a filter? If it does not work, I could export my field to a separate database and the only poll for changes in that db, but I'd prefer to keep together my data for obvious reasons. Thanks in advance!

    Read the article

  • How do I DRY up my CouchDB views?

    - by James A. Rosen
    What can I do to share code among views in CouchDB? Example 1 -- utility methods Jesse Hallett has some good utility methods, including function dot(attr) { return function(obj) { return obj[attr]; } } Array.prototype.map = function(func) { var i, r = [], for (i = 0; i < this.length; i += 1) { r[i] = func(this[i]); } return r; }; ... Where can I put this code so every view can access it? Example 2 -- constants Similarly for constants I use in my application. Where do I put MyApp = { A_CONSTANT = "..."; ANOTHER_CONSTANT = "..."; }; Example 3 -- filter of a filter: What if I want a one view that filters by "is this a rich person?": function(doc) { if (doc.type == 'person' && doc.net_worth > 1000000) { emit(doc.id, doc); } } and another that indexes by last name: function(doc) { if (doc.last_name) { emit(doc.last_name, doc); } } How can I combine them into a "rich people by last name" view? I sort of want the equivalent of the Ruby my_array.select { |x| x.person? }.select { |x| x.net_worth > 1,000,000 }.map { |x| [x.last_name, x] } How can I be DRYer?

    Read the article

  • Help me build a CouchDB mapreduce

    - by mit
    There are CouchDB documents that are list elements: { "type" : "el", "id" : "1", "content" : "first" } { "type" : "el", "id" : "2", "content" : "second" } { "type" : "el", "id" : "3", "content" : "third" } There is one document that defines the list: { "type" : "list", "elements" : ["2","1"] , "id" : "abc123" } As you can see the third element was deleted, it is no longer part of the list. So it must not be part of the result. Now I want a view that returns the content elements including the right order. The result could be: { "content" : ["second", "first"] } In this case the order of the elements is already as it should be. Another possible result: { "content" : [{"content" : "first", "order" : 2},{"content" : "second", "order" : 1}] } I started writing the map function: map = function (doc) { if (doc.type === 'el') { emit(doc.id, {"content" : doc.content}); //emit the id and the content exit; } if (doc.type === 'list') { for ( var i=0, l=doc.elements.length; i<l; ++i ){ emit(doc.elements[i], { "order" : i }); //emit the id and the order } } } This is as far as I can get. Can you correct my mistakes and write a reduce function? Remember that the third document must not be part of the result.

    Read the article

  • Best way to do one-to-many "JOIN" in CouchDB

    - by mit
    There are CouchDB documents that are list elements: { "type" : "el", "id" : "1", "content" : "first" } { "type" : "el", "id" : "2", "content" : "second" } { "type" : "el", "id" : "3", "content" : "third" } There is one document that defines the list: { "type" : "list", "elements" : ["2","1"] , "id" : "abc123" } As you can see the third element was deleted, it is no longer part of the list. So it must not be part of the result. Now I want a view that returns the content elements including the right order. The result could be: { "content" : ["second", "first"] } In this case the order of the elements is already as it should be. Another possible result: { "content" : [{"content" : "first", "order" : 2},{"content" : "second", "order" : 1}] } I started writing the map function: map = function (doc) { if (doc.type === 'el') { emit(doc.id, {"content" : doc.content}); //emit the id and the content exit; } if (doc.type === 'list') { for ( var i=0, l=doc.elements.length; i<l; ++i ){ emit(doc.elements[i], { "order" : i }); //emit the id and the order } } } This is as far as I can get. Can you correct my mistakes and write a reduce function? Remember that the third document must not be part of the result. Of course you can write a different map function also. But the structure of the documents (one definig element document and an entry document for each entry) cannot be changed.

    Read the article

  • CouchDB- basic grouping question

    - by dnolen
    I have a user document which has a group field. This field is an array of group ids. I would like to write a view that returns (groupid as key) - (array of user docs as val). This mapping operation seems like a good beginning. function(doc) { var type = doc.type; var groups = doc.groups; if(type == "user" && groups.length > 0) { for(var i = 0; i < groups.length; i++) { emit(groups[i], doc); } } } But there's obviously something very wrong with my attempt at a reduce: function(key, values, rereduce) { var set = []; var seen = []; for(var i = 0; i < values.length; i++) { var _id = values[i]._id; if(seen.indexOf(_id) == -1) { seen.push(_id); set.push(values[i]); } } return set; } I'm running CouchDB 0.10dev. Any help appreciated.

    Read the article

  • CouchDB, HDFS, HBase or which is right for my situation?

    - by Lucas
    Hello all, This question is regarding data storage systems such as CouchDB, HDFS and HBase, specifically, which is right. I am looking at making a simple and customized Document Management System for my organization. Basically, we need the ability to store some Word Documents, PDFs and other similar files. I also want to store metadata about these files (e.g., Author, Dates, etc). Usage permissions would also be handy, but that can probably be built using meta-data. I would also need the ability to full-text index. The ability to version, while not required would be extremely useful. I would like the ability to simply add hardware to expand the resources of the system and the system must support Network Attached Storage over the CIFS or NFS protocol(s). I have read about CouchDB, HDFS and HBase. My preferred programming language is C# as all of my end-users will be running Windows machines and I will want to make both web and winforms client implementations. My question is which solution best fits my needs? Based on my research it appears that CouchDB (utilizing the CouchDB-Lounge and CouchDB-Lucene) perfectly fits my needs. However, I am worried that since I have worked with CouchDB that I might be overlooking something useful for my needs in HDFS or HBase or something similar due to a bias. Any and all opinions are welcome as I am looking for the community input as I really do not want to make the wrong choice at the start of my project. Please ask if you need more information. I thank you all for your time, input and assistance.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10  | Next Page >