Database Compatibility: Building a database to support apps across multiple OSs - android

I know very little about developing apps/software, so please forgive my ignorance in advance.
I would like to develop a proprietary digital dictionary (using my own definitions, not taken them from other websites). To do this I will need to build a database, that will contain multiple definition for each words and many examples of their use.
Eventually, I would like to use this database to build apps for Android, iOS, and Microsoft operating systems. My question is, for example, if i use SQL Server 2012 will I be able to use this same database when I try to make an app for Android? If not are their any neutral open source database systems like XAMPP which would work across all three operating systems?
Extra Information: I would like the apps to pull definition from a database embedded inside the app, not from an internet server; this way, users will be able to use the dictionary without an internet connection.

Yes and no.
SQL Server works exceptionally well with ASP.NET, and with ASP, you can write a webservice to grab the data off the server and deliver it to ANY platform in a readable format (XML, JSON, or whatever).
Getting data from the server would then be simply a matter of consuming the webservice from whatever platform. Any of the mobile devices, any desktop implementation you decide to make, or even if you just gave your webservice a web page so the webservice could be consumed by browsing to a web address.
From there, all you need to do to make the data accessible offline is to setup the application to download the entire database the first time and store it locally (and from here, you could simply use sqlite). From then on, it could simply look for updates. Keep in mind, however, mobile devices have limited storage capacity.

If you want a common database that can be embedded locally in your app, as opposed to accessing a remote database, then SQLite is probably a good choice. It is fully supported in iOS and Android. It has a C API as well as others so it should also work with other mobile environments.

Related

serverside database for iOS and Android app

I am writing an iOS app. It will store details of something on a server somewhere.
I will write an Android app that will offer the same functionality.
I want to access the same database and retrieve the same data no matter whether it is the iOS or Android app being used.
I would appreciate some "keywords" for a technology that can abstract the back end data store so be something common for both iOS and Android.
If there is an example out there on GitHub a link would help me
Thank you
You can use any database that meets your data modeling needs and performance requirements, which one you chose should depend on the structure of your data. What you should be doing is building a shared middle tier server that persists your data and provides it to your iOS and Android clients. You probably want to pass the data between the client and the server as JSON documents using the http protocol. This is generally known as a REST api though you have to follow certain design principles to really be a REST api.
You could write your server side code in Swift, Java or Kotlin. This would allow you to reuse some code on either iOS or Android depending on which language you chose. You could instead use Xamarin/.NET Core to write the server and both clients in C# (or F#) which would maximize your code reuse.
If you don't need or want to use a relational database, you could use MongoDB or a similar JSON document store. You could pass those JSON documents directly to your clients. That would reduce the amount of server side code you need to write.
Here is a good link for using Microsoft Azure Cosmos DB. there are loads of samples and best practices. Information on how to secure the database. how to use partitioning correctly. Cosmos DB is really easy to implement as you don't need an ORM. it has everything built in. I am using Cosmos DB for Xamarin app I am building. It is working great so far. The best thing about it is you can scale up or down pretty easily from the azure portal. below is a good introduction and all the samples you need.
Introduction
Getting Started
Samples
Hope this helps.

How to integrate Android app and website?

I have no idea how does applications like Amazon, Flipkart etc work. They have both android application and website. How does data between both web and Android synchronise?
Do we write separate codes for building android app and website? If yes then in what language we build the website so that it's compatible with the android application.
And how to build the database for the same.
If answer is no to the above question, then how exactly do we proceed to build such Android and web application.
I am new to this and want to learn how to build it.
In general, web sites are built with web technologies such as JavaScript, HTML, and CSS, but there a many different frameworks and libraries in other languages (such as Angular, which is written in TypeScript) that can also handle the creation of web apps. In comparison, mobile applications for Android and iOS are written it Java/Kotlin or C#/Swift, respectively. There isn't really a clean, native way to create a single app for web and mobile platforms. But, the data that backs both of the platforms is the same.
How does this work? The data is hosted on what is called a backend, a server that has the information that you want to display to your users. Typically, the client app can get this information with an HTTP request to the backend, and the response will be the data formatted in a JSON string. Data is stored in the backend in a database. There are many databases in use today, but some more popular ones are MySQL, MongoDB, and SQLite, and each of them have their advantages and disadvantages. As you get further along in your development cycle, you will need to choose the tools that work for you.
Websites (and relative applications) like Amazon have very complicated systems behind what you see on the screen. Of course they have different code for either application and website. Usually, in small projects, you can create the mobile android app with languages like Java or Kotlin and websites with html, css and Javascript. But when it comes to get together data between an app and a website, you will need to write backend software, which is not so easy, for example in php and then create a database to store the data (with mySQL for example). Then you can access your data from either app and website and decide what to do with it. I suggest you to learn one of these technologies at a time. Trying to learn them all together will only create misunderstandings.
Hope I've been useful.

What is the proper structure for accessing a database on mobile apps?

I'm a complete beginner with mobile development. A friend of mine approached me with a project idea, asking me if it was possible to do it. The way I see it, it is a mobile app that needs to read and write data on a database in order to write inspection reports on the job of various staff members.
I told that friend that I would check how mobile development works first and would try to create a prototype to present. I've asked and Android is the main platform that is desired, so I've tried working with Android Studio and it is pretty straight forward up to now.
So, now I'm wondering what is the proper way to sync mobile apps with the database. Last time I worked with a database in a project we had multiple clients connecting to a server to play some small game together and the server would access the database and send the data back to the client through the network connection. So, I was wondering if a mobile app was supposed to use this communication structure or would simply talk directly to the database instead of a server.
The structure I have in mind:
Is this an acceptable structure? Or am I thinking of this the wrong way?

Android - Connect to MSSQL online database

I'm new to Android programming. I have a website with sql 2008 db, and now i would like to give the users the ability to use their smart phones to enter data to this db.
I was wondering what is the best way to establish it. Since I'm new to it I don't want to build something that's not so professional.
Thanks for your help.
If I were you I would consider two following options:
Have a web application optimised for mobile use;
Pros:
Updates are delivered immediately, as there's no client application, everything is done on the server;
Web application can be used on many devices with a browser and not just Android: iPhone, Blackberry, PC, Mac, etc.;
Cons:
Users need to be online to work with the application;
You can not leverage from the native UI components available to native device applications;
Write Android application that will work with the database via a number of REST endpoints exposed through a web application (again);
The pros and cons are a full reverse of what you had in the first option.
The right answer for me was to use KSoap library. I'ts very easy and works very well.
Here is a tutorial that will show you how to do it step by step.
http://java.dzone.com/articles/invoke-webservices-android

Use Microsoft Access files in Android application

Is there any way to use a Microsoft Access files in an Android application?
I do not believe there is any way to use a MS Access database with an Android application. Instead, you should probably consider using another database such as SQLite.
You could migrate your Access database to SQLite:
Export your Access database into text files, semicolon or comma delimited.
Open the SQLite database browser and chose File -> Import -> Table from csv file.
Browse for your text file and choose the appropriate delimiter. Click create.
If import isn't an option you can make a (PHP) webservice that queries the database. Then call upon that webservice in your android application.
This week i'll be starting a tutorial serie on http://p-xr.com that will explain just that.
You can use jackcess, is pretty easy to use, but you can't execute queries.
http://jackcess.sourceforge.net/faq.html
Well, if you are using Access 2010, then you can build web sites, and the results are massively scalable to the web in terms of simultaneous users. The so called Access web services are also coming to office 365. So with office 365 (still in testing) or with SharePoint 2010 you can thus publish Access forms to the web. Here is a video of mine, and note how the same Access application at the half way point is run in an standard browser.
http://www.youtube.com/watch?v=AU4mH0jPntI
Note that no ActiveX or Silverlight is required (so it standard web compliant). I have tested the Access applications running on my windows 7 phone and the Access web application also runs well on my iPad (safari browser).
So, I do not see why the Access application would not work and run fine on an android phone. Note that when you publish the Access forms they are turned into xaml (.net zammel forms), and code you write in the Access form is converted into JavaScript. Reports are converted into sql server reporting services.
Use a windows machine and access access over a remote control tool.
For a bigger scenario, you can use Windows Terminal Services.

Categories

Resources