Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Is it a good idea to use CouchDB for a web application that is going to be platform agnostic (from tablet to PC):

  • The app is a big form which I need to be able to modify at will.
  • I also need to scan the results to retrieve the data to send some file to help the client.
  • I need to be able to upload the results to a master server.
  • I want to mainly use the app offline and online at will.

The data is questions with answers and comments linked to them. At the end a percentage is generated for the user and depending on the result, a call to another application will be made to "send" information to the user depending on its results.

The application needs to be offline because we don't know if the user is connected to the internet at the time they answer the questions. The data needs to be the same on all platforms (replication is a given).

I cannot rely on the browser even if the app is going to be built with HTML5, CSS and JavaScript. Is it possible with CouchDB and is it a too big mandate for only one person?

If there are not enough details, ask and I will explain more thoroughly.

EDIT:

After all your answers here is what i have concluded.

  • I am gonna use SQLite and sync it with our sql databases.

  • NoSQL is not made for the kind of app i am working on.

  • Using what you know is sometimes the way to go

  • If you dont know how to use the technology and intend to use it for a huge project your coding alone. dont.

share|improve this question
1  
If it's a web application, why would there be a dependency between the datasource (CouchDB) and the type of hardware the client is using (tablet vs. PC)? Unless you plan to run the server on a tablet or PC... –  FrustratedWithFormsDesigner May 23 '12 at 20:21
    
i need the data on all the platform because i dont know if the user is gonna be online or offline. –  Lunatikzx May 23 '12 at 20:30
    
Ah, so the "web" application + server will run locally on the device. –  FrustratedWithFormsDesigner May 23 '12 at 20:31

3 Answers 3

up vote 4 down vote accepted

CouchDB has been running on iOS ( iPhone and iPad ) for a while now. An app using it was even accepted to the AppStore. There is a version for Android as well. That said, your question points to a lack of fundamental comprehension of database theory, I would not start off with CouchDB if I was you.

Google "CouchDB Mobile iOS Android" and you will find what you need, but I still don't recommend it.

SQLite would be a much lower barrier to entry ( Erlang can be difficult to build and install on these devices because of all its dependencies ) and SQLite is much better documented on all devices.

share|improve this answer
    
im a a green i admit it ... what should i look toi to help... and i also think there is a slight barrier due to my frenglish –  Lunatikzx May 24 '12 at 1:23

No

The choice of database depends largely on the nature of the data and how its being used. But you leave that information completely out of your question, and for some reason include the type of hardware the web client would run on (which is largely irrelevant, as Frustrated points out). I'm interpreting that as meaning you are very new to programming, or at least any sort of database work. As such, I'd recommend against CouchDB in favor of starting off with an SQL based database such as MySQL, where there'd be many more resources for you to learn from. There's nothing wrong with CoutchDB - I just think you'd have a better time getting up to speed on databases in general by first starting with a more widely supported database.

share|improve this answer
    
Based on the OP's comment, it sounds like the web application and server will actually run locally on the device. In this case, it might be relevant, if CouchDB's requirements exceed the specs of most tablets currently on the market (I don't know if that's actually the case, but it could be). But I agree that it's not clear if CouchDB (or similar products) are actually necessary. SQLite might be a better choice for resouce-light platforms, unless the OP actually needs the features of CouchDB. –  FrustratedWithFormsDesigner May 23 '12 at 20:40
    
i added details to the question . and it needs to be mobile and pc ... –  Lunatikzx May 23 '12 at 20:41
    
i tought about sqlite but is it easily installed on a client computer?(i cant rely on browser could be anything from ie7 to chrome 13) –  Lunatikzx May 23 '12 at 20:45
2  
SQLite is a good embedded database, but you're not going to be able to access it via a web page. You probably want to be looking at one of the various HTML5 storage solutions, and NOT a database server that you install on every device. On the server, my above answer stands - stick to something better supported. –  GrandmasterB May 23 '12 at 20:51

Why not to have the necessary data for the questions and answers stored on the device with sqlite and sync with a main web server with something you can handle?

It could be CouchDB, MongoDB, SQL Server, MySQL Server or any other solution. It doesn't really matter what would be the server technology, as far as the client can sync its data and the data persists on the device.

A "One stone two birds" solution doesn't mean the better one at all times and can kill your development time and requirements easy.

share|improve this answer
    
isnt the sql replication hard? are there sql solution easy to install on a user computer? –  Lunatikzx May 24 '12 at 1:16
    
Why would you have to replicate data? Why not to just build a sync module that fetches and sync data? –  rcdmk May 24 '12 at 15:31
    
the problem i have with sqlite is the size the data can take over time ... i need to keep the answers already given by the user and reuse it ... and i need to look ( i dunno if this is the way to say it ) 3 years in the past to get some reference from the client –  Lunatikzx May 24 '12 at 17:06
    
cant i use a sqlite with phonegap built app? –  Lunatikzx May 24 '12 at 18:35
1  
Yes, its perfectly possible. You can find a dosen of tuts on this subject, like this one: luthfihariz.wordpress.com/2011/10/23/… –  rcdmk May 24 '12 at 22:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.