简体   繁体   中英

How can I store a single database for multi device access in Delphi 10.3?

I am new to multi-device development in Delphi and I have a basic VCL background. I have worked with multiple projects that use locally stored databases for their functions etc.

Coding is a hobby and I want to learn more about mobile app development for personal usage. I am busy writing a simple application that serves as a scoring system for a card game that we invented. I am currently using SQLite local database to store data.

I am now looking for a way to have a single database that multiple devices can access so that any one of our android smartphones can run the application and interact with the data in that database.

At this stage, I don't really have extensive knowledge about what I am talking about and I want some advice regarding this problem. Is a single database the best solution? Is there perhaps a different approach?

I am familiar with basic FireDac syntax (TFDConnection, TFDQuery, and TFDTable), so I would prefer maybe keeping a FireDac infrastructure if possible.

I would prefer the solution to not be too complicated:)

I do hope that I presented the problem clearly. Please ask if something sounds unclear - I will try my best to elaborate.

I am using Delphi 10.3 (Community Edition)

There are many solutions to this problem. I won't expose all possibles but only the one I think is best:

You need a server somewhere in the cloud to keep data from different devices and you have to make your application communicate with that server. You can build server side with Delphi, or other tool.

I recommend a REST architecture over HTTPS using JSON format to send/receive data to/from devices.

Delphi has everything required to build both client (Your devices) and server side. Not sure for Community Edition. If not included in CE, you may use third party libraries to accomplish the same task.

You next step is to think about that solution, do some research by yourself, write some code and when you are stuck, ask another question on StackOverflow.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM