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 9 years ago.
Improve this question
Since CoreData has become available for the iPhone in OS 3.0, is it meant to be the answer to data persistence and replace all need for direct SQLite?
What reasons exist to still use SQLite? What are advantages/disadvantages of SQLite vs. CoreData?
This is a common question here:
"Core Data vs. SQLite for SQL experienced developers"
"Core Data vs Sqlite and performance…"
"Core Data vs sqlite3"
"is it worth using core data for a simple sqlite app on the iphone with one table and no relationships or complicated subtable/views?"
In summary, Core Data can greatly simplify your code, particularly for complex object models. You get undo / redo support almost for free with it. It also provides some very significant performance benefits, particularly on the iPhone. Even though it seems counterintuitive, given how much overhead you'd think the framework has, in most cases you can beat the performance of hand-tuned SQLite using Core Data. On the iPhone, it does a great job of batching fetches to minimize memory usage.
The one downside, as pointed out, is that this limits you by requiring iPhone OS 3.0 for your end users. However, this has not been a problem at all for my users, and will only become less of one going forward.
This might be a lesser benefit, but SQLite is a lot more portable between platforms, since Core Data is part of Cocoa, and SQLite is pure C. This means that if you wanted to port your application to PC, for instance, you would have less code to rewrite in the event that you use pure SQLite.
Then if you wanted to develop anything else cross-platform using a local DB (not necessarily related to any iPhone apps), you would have already have some experience with SQLite.
If you want your application to run on iPhones not running OS 3.0, you will have to use SQLite.
However, using CoreData (which uses SQLite as a backend, I believe) means you don't have to write your own database-interaction code which is quite a hassle to do, especially when you are doing relations etc.
I use CoreData myself...
Related
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.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
I want to use a localhost database in SQL for my IOS's app, how can I use .POST in a specific table ?
PD: I use Alamofire in Swift.
Alamofire is a networking library and not related to the persistence layer.
iOS has the Core Data framework for database access, it can use an SQLite DB, XML, binary or in-memory persistent stores. You do not run SQL queries directly, you use predicates. I would suggest reading up on what options are available to you before you start.
Realm is a good library to use, from their website:
Realm is a replacement for SQLite & Core Data
Apple Core Data Programming Guide
Realm Website
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 am going to start learning NOSQL databases (in practices, already done my researches and understood the concepts and modeling approaches).
I am working with time series data and both cassandra and mongodb are recommended for this use case.
I would like to know which one takes less time to learn? (Unfortunately, I don't have much time to spend on learning)
PS: I noticed that there are more tutorials and documentations with mongoDB (am I correct?)
Thank you!
Having used them both extensively, I can say that the learning curve isn't as bad as you might think. But as different people learn and absorb information at different rates, it is difficult to say which you will find easier or how quickly you will pick them up. I will mention that MongoDB has a reputation of being very developer-friendly, due to the fact that you can write code and store data without having to define a schema.
Cassandra has a little steeper learning curve (IMO). However that has been lessened due to the CQL table-based column families in recent versions, which help to bridge the understanding gap between Cassandra and a relational database. Since tutorials for MongoDB have been mentioned, I will post a link to DataStax's Academy, which offers a free online course you can take to introduce yourself to Cassandra. Specifically, the course DS220 deals with modeling your data.
With both, a key concept to understand is that you must break yourself of the relational database idea where you want to build your tables/collections to store your data most-efficiently. In non-relational data modeling you will want to model your tables/collections to reflect how you want to query your data, and this might mean using redundant data in some places.
qMongoFront is a qt based mongodb gui application under linux. It's free and opensouce. If you want to learn mongodb, qMongoFront is a good choice.
http://sourceforge.net/projects/qmongofront/
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
We are considering MVC 4 for a significantly sized application.
Our DBA is nervous about "losing control" over the database, and doesn't like the idea of application code defining/changing the database structure. Which I can understand. He thinks it's great for a one man team or small shop, but doesn't see how it fits into an enterprise solution with a DBA on staff. Where would he fit in on the process?
I imagine EF is widely used in enterprise environments, are there any good articles to better inform us on how EF is utilized in contrast to a traditional environment where coders code and DB guys manage the tables?
You appear to have a misunderstanding of what Entity Framework is, and how it is and can be used.
Entity Framework is known as an ORM or Object Relational Mapper. There is nothing inherent to ORM's that takes any control away from a DBA.
It's true that EF can generate tables, data models, sql, etc.. but it doesn't HAVE to. Nor do other ORM's. At it's heart, an ORM simply takes a result set, and maps it to a collection of objects. This can be accomplished with Stored Procedures just as well.
Most people like to do ad-hoc queries, and EF is great for that, but if your DBA requires that all queries be written by him (or approved by him, and used a sprocs) then it can certainly be used that way.
The current version of Entity Framework really only supports queries mapping, but EF 6, due to be released by the end of the year will add support for Insets, Update and Deletes as well. You can do those today as queries, but they don't map to objects.
But in all honesty, your DBA should really face facts that DBA's are becoming increasingly less necessary. They will always have a place, but they really need to accept that they can't have the iron fist control over query execution that they once had. Users (and thus developers) are demanding more dynamic queries, and that means executing generated sql.
Well, the question is a bit general, but if I remember correctly Microsoft® .NET: Architecting Applications for the Enterprise book has a very detailed chapter/setion on Data Access Layer and ORMs in general.
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.