Could the same database be used for running a website and mobile app?

You can definitely use the same database to run a mobile application and a website. The current state of the art, is creating a set of web services (REST API) to hide the implementation (provide Abstraction) of the database from both the Website and the Mobile Apps.

After you define and build your API you can test it and see that it works. You can then make your website and mobile apps connect to the API to get and save data.

There are a few services that make this a little bit easier if you don’t want to do it all yourself. Take a look at Parse Server (open source) and Firebase (Not open source

You can definitely use the same database to run a mobile application and a website. The current state of the art, is creating a set of web services (REST API) to hide the implementation (provide Abstraction) of the database from both the Website and the Mobile Apps.

After you define and build your API you can test it and see that it works. You can then make your website and mobile apps connect to the API to get and save data.

There are a few services that make this a little bit easier if you don’t want to do it all yourself. Take a look at Parse Server (open source) and Firebase (Not open source but run by Google).

Best of luck!

If the mobile app connects to the site to run, that’s easy. Just create a database for the website, and a database for the mobile app. The website is written to use its database, the server side of the mobile app is written to use its database. (I have WordPress and a little battery database accessed by a mobile app running in the same MariaDB [what used to be MySQL] setup in a server.)

You need a Service Oriented Architecture. Because you are sharing data across all those platforms, Web Services..

Basically rather that calling a "function" you make an HTTP request to a URL, parameters are passed in via the query string or Http header. XML or JSON is returned. Read up on it.

Thing is, your app need to be online at all times...

Haven't tried it yet but Couchbase (www.couchbase.com) claims it can run both on a server and a mobile and even synchronize automatically.

Mobile OS is big and large and has recently surpassed Windows OS like the world's fastest operating system in the Android mobile OS. As with any mobile computing tool, the mobile OS is growing larger and hardware, and data counting from mobile is increasing too.

Database is the most common way to store and maintain data. For a while now, databases are operated on server side or cloud, and mobile devices can only communicate via network. However, the use of offline usage or low dependence on the network has become popular, relying on applications to be more responsive and network connectivity. N

Mobile OS is big and large and has recently surpassed Windows OS like the world's fastest operating system in the Android mobile OS. As with any mobile computing tool, the mobile OS is growing larger and hardware, and data counting from mobile is increasing too.

Database is the most common way to store and maintain data. For a while now, databases are operated on server side or cloud, and mobile devices can only communicate via network. However, the use of offline usage or low dependence on the network has become popular, relying on applications to be more responsive and network connectivity. Nowadays, apps can locally place DB locally or make a local copy of DB's copy in the cloud and synchronize every day or network connectivity. It helps in faster and responsive applications that are functional even when there is no limited Internet limit.

Databases for mobile should be:

  • Storage on mobile devices is low.
  • No server required.
  • When required or in the form of a library that does not have very limited dependency (embedded)
  • Fast and safe.
  • Easy to manage by code, and the option to make it private or share it with other apps.
  • Low memory and power consumption.

There are many mobile databases coming to market but they do not meet all the requirements listed in this. Let's discuss some of the most popular databases for mobile applications and try to highlight their features, benefits and losses.

SQLite

  • SQLite Affiliate DB is a lightweight version of SQL designed for mobile. It is an in-process library that implements a self-controlled, serverless, zero-configuration, transaction SQL database engine. Unlike any other SQL database, it is an embedded SQL database engine with no server process.
  • SQLite supports all relational database features and the open source compact library is supported by two major mobile OS, Android and iOS, and BlackBerry and Windows Phone.
  • The SQLite disk is stored in memory as well as memory, and each database file can use a single disk file and cross platform. It is very fast and requires very little memory to operate.

Realm DB

  • The kingdom is like traditional databases, querying and filtering, connecting and continuing, but also includes live and fully reactive objects.
  • Realm has developed Realm DB and is specially designed to run on mobile devices. Like SQLite, Real is also serverless and cross-platform. It will be stored in Drive as well as in memory.
  • The dominant local SQLite above has the following advantages:
  • Objects that are in the realm are local goods, you can copy objects, edit them, and save them in the database-you are always working with "live," real object.
  • Objects are always synced.
  • The kingdom is faster than SQLite. The kingdom can query up to 57 records / second, but can only do SQLite 20 records / sec.
  • Data can be secured with transparent encryption and encryption.
  • Reyal has reactive architecture, which is directly connected to the UI, when the data is changed it will automatically refresh and appear on the screen.
  • It automatically syncs to the Realm object server when there is network connectivity.
  • An application may have multiple realms both local and remote
  • Different users can set different permissions.
  • Android, iOS, Javascript etc. are available

ORMLite

  • ORMLite is a lightweight version of Object Relational Mapping. It provides some simple functionality for SQL databases to maintain Java objects. It is ORM Wrapper over any mobile SQL related DB.
  • ORMLite is used to simplify complex SQL operations by providing a simple query builder. It also provides powerful abstract database access object (DAO) classes.
  • ORMLite can be used in large quantities with critical questions, because "compiled" SQL statements for recursive query functions. It supports configuring tables and fields without annotations, and supports local calls for Android SQLite Database APIs.
  • But it does not meet all requirements of ORMLite faster than SQLite and other ORMs in the market, rather than SQLite and Real Estate, compared to SQLite or Real Estate.
  • All ORMLite is a good SQLite replacement if the application is large and complex in case of DB usage.

Berkeley DB

  • Berkeley DB is an open source high-performance DB that allows us to maintain data in different ways. It was developed by SleepyCat Software, but was acquired in 2006 by Oracle. It provides API for many languages ​​including Android and iOS.

Berkeley DB can handle data in many ways. It is in relational mode such as SQLite (by replacing SQLite with its own library), or it is similar to key / value pair data bybite arrays and supports multiple data elements for a key. This is also supported as java objects data

Couchbase Lite

  • Couchbase Light is powerful NoSQL embedded JSON database. This is the most robust DB with business-level security.
  • The data in the Couchbase Light is stored as JSON documents. Each document contains one or more attachments that are stored separately and loaded from the documents.
  • Couchbase is a solution provided by Couchbase Light for mobile mobile applications.
  • It has three different components: Couchbase Lite, an embedded NoSQL database, Sync Gateway. Couchbase is synchronized with offline first DB and cloud, or when the network is available.
  • The Couchbase runs locally on the Lite device and keeps the data in JSON and binary format. All CRUD operations are conducted in local DB. Synchronization code (if needed) is not required by the developer to synchronize with the local DBN cloud, which is managed by the Sync Gateway.
  • The Couchbase Lite comes with the controversial resolution mechanism, which is very similar to what Jitt used.
  • Another advantage of Couchbase Light is that it provided local APIs for Android and iOS and plugins for Xamarin and PhoneGap.
  • So if any NoSQL DB in Mobile OS is needed, the Couchbase Lite is the fastest, most reliable and quantitative size of the bet.

Eventually it depends on application requirements and feasibility to choose which fully fit in DB. But not every mobile DB is to fill most of the above mentioned requirements.For more info visit FuGenX technologies mobile app development

Wordpress uses a mysql database. So you can do it in several different ways. I recommend you to write a bridge in php that gets the data from the database and sends it to your app JSON encoded.

For example, your php file could look something like this for retrieving data:

  1. <?php mysql_connect("localhost","db_user","db_password"); mysql_select_db("database_name"); if(isset($_REQUEST['getrecords'])) getRecords($_REQUEST['id']); function getRecords($id){ $q=mysql_query("select * from test_ranking where id=$id"); while($e=mysql_fetch_assoc($q)) $output[]=$e; print(json_encode($output)); mysql_close()

Wordpress uses a mysql database. So you can do it in several different ways. I recommend you to write a bridge in php that gets the data from the database and sends it to your app JSON encoded.

For example, your php file could look something like this for retrieving data:

  1. <?php mysql_connect("localhost","db_user","db_password"); mysql_select_db("database_name"); if(isset($_REQUEST['getrecords'])) getRecords($_REQUEST['id']); function getRecords($id){ $q=mysql_query("select * from test_ranking where id=$id"); while($e=mysql_fetch_assoc($q)) $output[]=$e; print(json_encode($output)); mysql_close(); } ?>

Of course this is very insecure and you should write some extra code to make this script fit your needs. After doing this, you can simply make a httprequest from your android app and get the json data.

There is also Wordpress plug-in called JSON-API it gives you ability to access every object of Wordpress( post ,page ,category.. etc ) in the form of JSON. you can use any rest client like volley from google, retrofit from Square or build your won to access wordpress data.

install Wordpress plug-in http://wordpress.org/plugins/json-api/

Hope it helps!

I’m not sure if this is what you mean or not… I have one site that is specifically for gathering data for the sake of the mobile app that goes along with it. That is to say, they read from the same data source.

The Quote of the Day app. That link there points to the web app version. The database is the same for all. Whether it is the web app or the mobile app that calls the server, it uses the same method - it calls the API (web service) that I wrote to go grab the current quote and return it in JSON format.

click here for that result.

Both the mobile app and the web app have the ability to write

I’m not sure if this is what you mean or not… I have one site that is specifically for gathering data for the sake of the mobile app that goes along with it. That is to say, they read from the same data source.

The Quote of the Day app. That link there points to the web app version. The database is the same for all. Whether it is the web app or the mobile app that calls the server, it uses the same method - it calls the API (web service) that I wrote to go grab the current quote and return it in JSON format.

click here for that result.

Both the mobile app and the web app have the ability to write new records to the database using a different script.

The bottom line here is that there isn’t anything really special about how the database is set up. It is a MySQL database like any other. I wrote the PHP for the web service so that any device could grab information from it.

So when the mobile app launches it calls that PHP script and gets the JSON, parses it and displays it to the user. It works the same way on Android, iPhone, JavaScript or a web page…

You’ll need to write an API which both the web app and mobile app talk to. Depending on how your backend is already set up, if you’re using a language like PHP or Ruby on Rails, there are a lot of gems and tools you can use to get your API set up.

One thing I recommend: when building an API, you’ll want to make sure you provide a way to authenticate against it (which will protect your user’s data as well as fight againt spam). This is commonly done by setting up some kind of token-based auth system whereby you send a token up with every request and verify that the token is valid.

I guess the “fast and easy” answer is: Whichever one you’re most comfortable with and adept at using is a good choice. It is difficult to recommend one database over another without knowing more about the requirements, etc.

Off the cuff, I’d say MySQL is a good choice if you want to host the database externally. MySQL is perhaps the most “universal” contender. It works well, is easy to use and popular enough to make finding help with problems pretty easy.

On the other hand, if you’re looking to embed the database on a phone or something, you might want to look at SQLite for many of the same reas

I guess the “fast and easy” answer is: Whichever one you’re most comfortable with and adept at using is a good choice. It is difficult to recommend one database over another without knowing more about the requirements, etc.

Off the cuff, I’d say MySQL is a good choice if you want to host the database externally. MySQL is perhaps the most “universal” contender. It works well, is easy to use and popular enough to make finding help with problems pretty easy.

On the other hand, if you’re looking to embed the database on a phone or something, you might want to look at SQLite for many of the same reasons.

We generally develop an API. An API is a backend part that is usually developed in server side language say NodeJS. The API connects with the database and send response as JSON object. The client can now make http request to an API from any mobile device as they all support to make http requests. The API processes the request and returns the response to the client in JSON format. Client interprets the JSON and render the information to client. Web APIs are generally the RESTful APIs and they do not require the backend and front end to be written in same language. So API written in java could b

We generally develop an API. An API is a backend part that is usually developed in server side language say NodeJS. The API connects with the database and send response as JSON object. The client can now make http request to an API from any mobile device as they all support to make http requests. The API processes the request and returns the response to the client in JSON format. Client interprets the JSON and render the information to client. Web APIs are generally the RESTful APIs and they do not require the backend and front end to be written in same language. So API written in java could be accessible to a app written in swift or objective c or android

A really easy way to do it is to use a BaaS platform such as Parse or App42. With these services you don't even need to create and host your own databases, all you have to do is use their APIs to send an receive data from their platform. It'll save you time of you're building a quick app or an MVP, or even if you want to scale to millions of requests a day.

Can you be more specific about your requirement?

Do you want a link between your App and the website? or else the site itself should turn into a an app?

If it is the first case,

You need a link (URL redirection) to open the site inside the app. Nothing but it is your custom browser. Chrome provides the API for that.

In other case,

You have to turn your existing website to a Progressive Web App . That needs another complete development.