CouchDB vs MongoDB for PWA [closed] - nosql

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I am starting my first PWA (in Ionic angular). Since I come from an Asp.Net MVC background, where SQL Database is used mainly, I find it hard to decide what is best for me to go with.
There are all these things to be considered with PWA, especially storing data in the device and then syncing with a db and so on. It seems that SQL databases will not do the work for PWA (or are not preferred to).
Everything is pointing towards noSql databases. Therefore I need some tips and personal opinions from experience about CouchDB vs MongoDB (since these are the two I see mostly being suggested and praised).
The focus should be on offline/online storing and syncing between them.
I don't know if I am using the right descriptions and terms but I hope someone will enlighten me and make it clearer what to choose. Other DB alternatives are welcome.
The app will be like a social app for outdoor activities. Users and authentication will be part of it.

As Flimzy points out, this is not the right place for opinions. To address part of your question, Both MongoDb and CouchDb are database servers which would not provide local storage (ie on device) for a PWA. There is a database for this called IndexedDb and this is widely supported by browsers including Chrome, Firefox and Safari.
IndexedDb does not provide a way (that I am aware) to sync with a database on the internet. However you can use PouchDb which is an interface to IndexedDb. PouchDb provides a facility to store information on the device in IndexedDb when there is no network connection and then sync with CouchDb when there is a connection.

Related

what is the best security postgres DB connecting unity? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
what is the best postgres DB connect unity?
Unity is known to be very vulnerable to security, so connecting a db directly with Unity was considered very unsafe, so unity -> php -> db
I am trying to make it like this. However, I found a problem with this method.
is that php security is as weak as Unity.
Do you know which method is the best way to connect postgresql to unity?
i know this question is subjective but
I don't know where to ask these things
Or can you teach me where to ask these questions?
Good security is not only a question of choosing certain software, it is mostly a question of design and architecture.
Make sure you are not vulnerable to SQL injection.
The king's way is to use prepared statements wherever possible. Also, never construct queries using string concatenation from user input.
Make sure that the database user does not have more permissions than required. In particular, never use a superuser.
If you are worried about eavesdroppers between the application and the database, use SSL encryption.
But security requires a holistic approach: you have to make sure that the operating system and the database are well protected and that your application is well written.

What database to choose from? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
Realm Database or MySQL or MongoDB or the standard Firebase.
I am curious why would anyone choose one over another. I am in a group project and one of the members in the group suggested that we should use Realm Database over Firebase. He tried to explain to me the reason but I was not able to comprehend.
What has your experience been like? Is one database more user-friendly over another?
Firebase seems to have very nice documentation.
Which one would you guys suggest?
Those are three different things.
Realm is a database for storing content locally on a device.
MySQL is usually used together with a web server. If you have a server and need to store data, you can use MySQL.
Firebase is Google's alternative for building your own server. It gives you tools that allow you to avoid having to build your own web server, such as Firestore, which lets you do CRUD operations directly from devices without needing to send that information through a server first.
If you works on small project you must going with MYSQL database. Its very simple and easy to understand. But if your project are big like that organisation type projects I recommend you to going with MongoDB.

Is combining MongoDB with Neo4J a good practice? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I already have a .Net Web project running on MongoDB where I store some news/feed data.
After a while I needed a faster way to track "who shared what" and "how to find relationships depending on these information".
Then I came up with an idea to use graphDB to track related feeds and users.
Since the system is already running on MongoDB, I am thinking of leaving the data in Mongo and creating the graph representation in Neo4J for applying a graph search.
I do not want to migrate all my data to Neo4J because many people telling me MongoDB's I/O performance is way better than Neo4J and they also pointed out Sharding feature.
What would you suggest in this situation?
And If I follow my idea, will it be a good practice?
Personnally I think there are no unique answer and best practices. It is common usage to use polyglot persistence systems.
Now everything is based on your context and there are points we can't just reply for you :
How much time do you have (learning a new technology is not a matter of days until you can use it in production and sleep good )
How much money you can invest in the project , sharding is, AFAIK, a neo4j enterprise feature and licenses have a cost if you're not opensource or commercial company. Also hosting costs for Neo4j in cluster mode.
How much data ? As long as your graph can fit in memory, you'll not run I/O issues.
Now, away from these points, yes you can in a first instance trying to map neo4j on top of mongoDB.
Maybe try to do incremental migrations, and at then end of the process, maybe ask you the following questions, WHY do you need MongoDB to handle graph structures ?

Architecture for iphone app with facebook connect [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I'm working on an iphone app and i would like to seek advices on what's the best architecture for it.
Basically, the app implements facebook connect for users to login. Users will be able to select their friends whom they can message/send photos to (think of whatsapp). I will have a server which i intend to use to store their sent messages and photos. Whats's the best way to separate the components? And also, should the logic that deals with sending data to my server and reading from it know anything about the facebook connect componenet?
Does anyone has any ideas on whats the best architecture for such an app?
Compartmentalizing data access is a widely accepted practice and in your case, data access is:
Connecting to FB
Connecting to your database server
Ideally your domain logic shouldn't know where it is getting data from (web service, database, FB, G+, etc). All it should know is that it is getting data, and what it should do with that data.
Some common patterns that address abstracting your data access layer from your domain layer are:
Repository
DataMapper
The above links are to Martin Fowler's blog, but some searching around google or stackoverflow should yield additional clarity:
Data Access Layer Design Patters
Microsoft Article, but relevant to any modern OOP language (even mentions ruby).

Are there any good tutorials on linking an iPhone app to a database? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I have built an iPhone app that needs to pull data from a server. First I need to figure out what kind of server I will need. I'm a bit familiar with MySQL but was wondering if anyone had better suggestions on a backend. My app will have two tables that need to be populated by data residing on a server. Also, a user can submit data to this database which in turns populates the previously mentioned tables.
If you have any tips or tutorials, code snippets, etc. it would be really appreciated!
*Edit: I should mention this IS a remote database
Well if it's a remote server your thinking about then you should be looking into implementing some kind of service architecture like Web Services over SOAP or REST.
If the data stays on the iPhone than by all means use SQLite as it's fast and lightweight.
I would recommend starting with SQLite and local data first. Then when you have your main program logic, flow and UI complete, replacing the SQLite with Web Service calls.
Your database sounds really simple with just two tables. Perhaps you don't even need a SQL database. Perhaps a Berkeley DB would be sufficient. It has atomic commit, transactions, rollback etc. However you store data as key-value pairs.
However I am not sure if you can use it as a server. You could consider accessing the data through something like remote objects. This is done very easily in Cocoa. You could build a Berkeley DB on your sever that hosts the data as distributed objects that your iPhone app connects to.