Integrating Sybase UltraLite Db to my code - objective-c

I am new to ios development. I want to create a local Sybase Ultralite db in my system and
want to perform insert , delete,update on my local Ultralite db present in my system. I went
through many samples, but I didn't get any proper information. For integrating SQLite db there
are many step by step approaches which is easy to follow but for Ultralite none. As I am a
beginner I want step by step approach to create a simple local Ultralite db in my system and
modify it through my code . I really need this very badly.I am using Ultralite db because
there are multiple users of my db, and data they are updating will reflect in the server
also. Where as in SQLite I dont think, it provides this kind of sync mechanism. As far as i
have heard it is used as just a local db Can anyone help me on this?

SQLite (or Core Data) are definitely the most common SQL interface for iOS. But you're right that it doesn't offer any built-in, integrated, sync mechanisms itself.
In terms of Ultralite on iOS, have you seen the Ultralite iOS tutorial page? It's not much, but a start.

Related

Using Realm for Xamarin Forms with a preexisting SQL database?

We have a preexisting SQL database that holds our data and will be updated from time to time. I've just stumbled across Realm and don't quite understand how it works at the moment.
From the examples I've seen it looks as if Realm creates the database locally on the mobile device (please correct me if I'm wrong). This is not what we want. We want our data to live on some server and then pull that into the application.
Can this be done purely with Realm? Or should we somehow pull from the SQL server? What's the best way to achieve this?
Thanks!

Best Approach for syncing Azure SQL Database

Right now, our application only has one Web Site instance along with SQL Database deployed at Azure US datacenter. We are looking for deploying more Web Site instance at other datacenter such as APAC and Europe. There still be a local SQL Database for each of those web site instance. We would like end user could fail over to another instance if his registered instance is not available, such as if US web site instance is down, we could fail over user to Europe instance. With this, we would need to synchronize local SQL Database at all data centers, US, Europe and APAC.
So we are looking for what's best approach to implement the database synchronization here for Azure SQL Database. Here are what we found at this point:
Azure Data Sync, it looks like that it is the perfect choice since it is available right away at Azure Management Portal and it would be up and running with some simple configuration. However there seems couple catches. The feature has been on preview about 2 years now (see this link with the following quote from comment):
SQL Data Sync has been in preview for over 2 years and the last update was December 2012. Has this been abandoned? Is this a technology we should encourage our clients to use? There absolutely needs to be an ability to synchronize data between a local SQL DB and Azure but Microsoft seems to have dropped this and I'm leery of putting a client on this only to find that the plug has been pulled. You owe it to your users to give us some information
I also saw the post Azure data sync not syncing all databases at SO, it seems that this feature is a second class feature at Azure and MS doesn't really pay sufficient attention to it. So I am worried how good it is.
Microsoft Sync Framework, it seems a more generic sync framework and more suitable for client and server sync instead of sync among server database. Plus it is not simple as above SQL Data Sync which is available just by configuration at Azure.
Any other suggestions on sql database sync at Azure? It would be really appreciated if you could share your experience here.
Thanks very much in advance for your insight.
Update:
Azure Data Sync is built upon using Microsoft Sync Framework: see link, the quote:
Microsoft SQL Data Sync is a cloud-based data synchronization service built on the Microsoft Sync Framework technologies.
Since no one is answering this question and I am going to do it myself. Based on some latest information, the Azure Data Sync is buggy and can not be used for production at this point. I guess that's the reason why it never moves out of preview even after around 2 years. There is no other good approach for handling Azure SQL Database sync at this point unless you want to build something yourself.
you can use RedGate Data Compare to sync your Azuresql DB with your Local DB

how to have database offline for iOS app

I would like to develop dictionary app for iOS application. and I am not sure which database Managment system should I use to store data. I want to my app to be offline so even user that don't have internet, they still can use my app. so my question which database should I use to store my database ? I research on google, it said sqlite. so if i store my data in sqlite so will my data in database sqllite will go with my app? thank
Yes, sqlite is your DB of choice unless you're just working with a couple of dozen records.
If you plan to use CoreData, you can also address sqlite with it.
If you don't plan to use CoreData, you can still use sqlite and work directly with the DB. There are good wrappers which help you, like FMDB: https://github.com/ccgus/fmdb

SQLite creating uploading and managing an online database

First of all let me just note that i'm a newbie in the field.
What i'm trying to do is create an online DB for my android application.
I'v been looking for the net for tutorials and could not find any.
What I want to learn is:
are there any sites that host sqlite databases
how do i create an sqlite database?
how do i upload the DB to the website
how to i communicate with the DB after it's online.
Any help would more help here guys, please.
thank.
Let me answer all your questions.
1) SQLite is not a traditional SQL Database, no server is necessary there is only a file.
2) A great tutorial by Lars Vogel explains almost all concepts of sqlite in android.
http://www.vogella.com/articles/AndroidSQLite/article.html
3) You can upload the sqlite database to a webserver as a regular file, but with only backup intents this is plausible.
4) Again there is no server; just a file on storage unit, such as harddisk or memory.
I strongly recommend to read article I linked above.

What ORMs are developers using to connect to Azure?

Im interested to find out what techniques developers are using to connect to a Windows Azure instance running in the cloud?
From what i understand it is very similar to SQL Server with two of the key differences being Multiple Active Recordsets are not supported and idle/long running connections are automatically terminated by azure. For this microsoft suggest incorporating retry logic in your application to detect a closed connection and then attempt to complete the interrupted action. Does any one have example code that they are currently using on this?
To build out the data layer i was looking at various ORMs. Since im going to be accessing azure from windows azure (ie seperate boxes) to me it would seem key that any ORM mapper would need to support asynchronous methods so as not to block any windows azure instances.
Any suggestions as to which ORM mapper to use, or comments on what you are currently using
I have successfully used NHibernate with Azure and we are in the process of building a commercial app on top of NHibernate. The only problem that I had was with the connection pools when running locally and connecting to SQL Azure in the cloud - which was fixed when turning connection pooling off.
You may find similar problems with other ORM's... SQL Azure is less patient (for obvious reasons) than most people are used to. Connections timeout quicker, recycle sooner and so on.
Test first!
Here's one specifically designed for Azure:
"Telerik recently announced the
availability of Open Access, the first
ORM that works seamlessly with SQL
Azure relational databases in the
Windows Azure cloud."
And a few commenters at the Azure User Group recommend LLBLGen and Entity Framework.
I've been using Entity Framework - runs without any problems, just a different connection string.
What you do have to think about is your connection strategy, and how efficient your queries are. I've got method that's easy to write in EF - I've got a new record that could be duplicated, so I check if it's there, and if not, add it.
EF makes it really easy to do this, as if you're just accessing a local collection. BUT ... if you're paying for your dB access because it's in Azure and not on your local network, hmm, maybe there's a better (aka cheaper) way of doing that
According to Ayende, NHibernate "just works" with SQL Azure.
We have been using NHibernate without any customization on Azure (indeed, it just works), you can check Lokad.Translate as an open source example of such use.