Jump to content
omnibill

FMX mobile database

Recommended Posts

I am using CBuilder 11.3 Professional.

Is there any way I can make a mobile phone program to allow multiple phones to read a table on a server database.

Is the only way to do this is to upgrade to Enterprise version.

I have a VCL windows program that I have uploaded data to a MySQL database but I could use some other type of database.

 

Bill 

Share this post


Link to post
  1. yes, you need use some type of strategy like:
    1. 3 layers (read about this)
      1. 1 server database (for example, Interbase, Firebird, MSSql, Oracle, etc.. any one other, in any PC (Windows/Linux/macOS) using TCPIP communication
      2. 1 app in Delphi or not  (App2 VCL or FMX since that it stay on PC for example, +TCPIP communication),  (in the middle of the way) app between server and app client, to access your database server
      3. 1 app client delphi (FMX to mobiles, using TCP/IP) or not to access, to access App2
      4. so, all request will be done that way: App client -> App2 -> Server DB
    2. or using DataSnap, RAD Server, Mormot, Horse, or any other framework to JSON requests
      1. DataSnap and RAD Server cames with Delphi, DataSnap is free, RAD Server needs license and Interbase license!
  2. I think that no, needs contact Embarcadero and buy a new subscript to CBuilder Enterprise or RAD Studio Enterprise (+6000$)
  3. you target Database can be any one, since you can export old database to new database and fix your VCL app to use it!

at general, changes to another system, it's complex and need many works, but it's possible for sure!

Edited by programmerdelphi2k

Share this post


Link to post
51 minutes ago, omnibill said:

I am using CBuilder 11.3 Professional.

Is there any way I can make a mobile phone program to allow multiple phones to read a table on a server database.

Is the only way to do this is to upgrade to Enterprise version.

I have a VCL windows program that I have uploaded data to a MySQL database but I could use some other type of database.

 

Bill 

Bill,

RAD Studio 11.3 comes with excellent connectivity for database applications using InterBase. IBLite (an embedded database, freely deployable) license is included in "Professional" edition as well. 

If you have a licensed InterBase Server Edition running on a remote server, you can build Mobile database applications to run on iOS and Android, and also other desktop applications running on Windows, macOS and Linux with either FireDAC or IBX to work with InterBase. Simply include the IBLite license and (Embedded ToGo library) to build your application. This library comes with a "client" portion that is capable of connecting to remote InterBase servers running on the network using the regular TCP/IP based database URL, <remote_hostname/IP>:<database_filepath>

 

This will allow your need to have multiple phones read a table on a server database just fine. No intermediate layer of software required. The InterBase client API is the same for Server and ToGo Editions, and is thus compatible for your purpose as well. 

Share this post


Link to post

I wouldn't open up a database to the entire internet

Share this post


Link to post
4 minutes ago, tgbs said:

I wouldn't open up a database to the entire internet

That's a fair assessment. You'll need to take any and all precautions before making opening your database for global access.

 

In the original question from Bill, I did not see "public" internet apps usage mentioned. There are also many use cases for Enterprise or within the firewall (VPN) use of mobile applications (running on phone/tablets etc.) accessing an internal server database. 

 

In addition to the aforementioned RAD Server and other technologies for the middle-tier, which InterBase nicely fits in the backend as well, here is another InterBase specific solution. Use IBToGo (Embedded) library, same as IBLite but with license requirement for deployment for RAD Studio Professional customers. https://www.embarcadero.com/products/rad-studio/product-editions 

 

With IBToGo, you get a few additional features and other limitations from IBLite removed. One such feature is encrypted C/S communication via SSL. So, you can also use a SSL based connection from your IBToGo application running on the Mobile devices, connecting to a secure port on your database server on a remote machine with InterBase.

Share this post


Link to post
16 hours ago, omnibill said:

Is the only way to do this is to upgrade to Enterprise version.

What is the concrete limitation of the version?

+1 against direct DB access, DB servers are not intended to be publicly open. There's plenty of ways to shut them down even with anonymous access.

Moreover, mobile => unreliable data channel => you'll get enough pain of lost connections with data access components.

Edited by Fr0sT.Brutal
  • Like 1

Share this post


Link to post
On 4/20/2023 at 5:43 PM, omnibill said:

Is there any way I can make a mobile phone program to allow multiple phones to read a table on a server database.

Is the only way to do this is to upgrade to Enterprise version.

Additionally to attaching Firebird to the internet you could try the Zeos Webservice based Proxy driver included in Zeos 8.0:

 

https://sourceforge.net/p/zeoslib/wiki/WebServiceProxyDriver/

 

It allows you to access any Zeos supported database from mobile devices. To increase security it allows adding 2FA to your regular database logins. Also it uses http and session ids so sessions can survive intermittent connection losses. It doesn't support SSL directly (yet), so for exposing it on the internet you would have to use Apache or some other server as a proxy.

Edited by marsupilami79
Testing to make an URL work...

Share this post


Link to post

You cannot do much with the Professional version of the software.

I think Interbase too much for my application. I am looking into using TCP server and client to connect to a program that connects to the database.

People will need to be in the same building as the database to use it.

The information in the database is not very important. It only contains date and time data and some room numbers of a building.

 

Share this post


Link to post

Firebird is "almost" than Interbase

  • Firebird came from Interbase 6 when open-sourced
  • Firebird is reliable, and multi-user server (there is limit on database, basically your system)
  • Firebird is supported in many platforms and languages:
    • http://firebirdsql.org/en/features/
    • https://firebirdsql.org/en/sql-conformance/
    • Firebird supports a number of hardware and software platforms: Windows, Linux, MacOS, HP-UX, AIX, Solaris and more. (now in Android embedded it's possible too)
      • It runs on at x386, x64 and PowerPC, Sparc and other hardware platforms, and supports an easy migration mechanism between these platforms.
      • Firebird is included into the following Linux repositories: Fedora, OpenSuse, CentOS, Mandriva, Ubuntu.
  • Firebird is supported by numerous database connectivity options:
    • Firebird.NET
    • JayBird (Java)
    • Delphi/C++ Builder drivers (Embarcadero Delphi/C++ Builder IDEs include dbExpress drivers to work with Firebird.) // FireDAC FB and ODBC !
    • FreePascal & Lazarus
    • PHP for Firebird
    • FireRuby
    • and more! 
  • Firebird is really free for usage (commercial or not)
  • Firebird is powerfull and open-source: for more details http://firebirdsql.org/
  • Firebird it's really easy to use and learn!
    • you dont need a big server, ok, run it in a 386 and TCP/IP network!
Edited by programmerdelphi2k

Share this post


Link to post
16 hours ago, omnibill said:

You cannot do much with the Professional version of the software. 

I think Interbase too much for my application. I am looking into using TCP server and client to connect to a program that connects to the database.

People will need to be in the same building as the database to use it.

The information in the database is not very important. It only contains date and time data and some room numbers of a building.

 

Hello Omnibill,

 

I use the Professional version of Delphi to do exactly what you want to do - I can enter some numbers into a database from mobile devices. Using Zeos I can decide wether the Zeos Proxy Server is a better choice or Firebird. I think that doing your own server will leave you in the worst of all places: You have to do all the maintenance yourself. By choosing Firebird or Zeos Proxy you can rely on work that is tested by others and you can concentrate on what is your core job - getting the mobile application to work.

 

Zeos Proxy will allow you to attach directly to your MySQL database but will not give you connection encryption out of the box. For this you would have to add a Apache or IIS as a reverse proxy.

Using a recent version of Firebird will give you an encrypted connection out of the box and you can continue to use FireDAC.

 

Best regards,

 

Jan

Share this post


Link to post

@omnibill

Don't access a DB directly over the internet. 

  1. It exposes the DB and eventual vulnerabilities
  2. It binds your UI to the current DB model, instead of a general data model, making it harder to make changes to the DB without breaking the UI

Use a REST server to hide the underlying database and communicate with API structures (JSON, BSON, XML, etc) adapted to your general data model

  1. It hides the actual structure of the DB - such as unique integers used for relationships, but which has no information content
  2. It prevents SQL injection attacks
  3. Using proper authentication models (OAUTH2), you avoid exposing DB internal users
  4. It allows server side sanity checks of incoming content
  5. It makes outgoing content access control more flexible
  6. You can allow third party to access your APIs
  7. You can change the DB on the backside of the API
  8. You can scale the DBs on the backside of the APIs
  • Like 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×