Database advice needed lazarus / 16-Databases ---------------------------------------------------------------------- Robert W.B. · 2022-03-28 15:43 I have to move my sql databases to Lazarus databases and import cvs files to it. What database in Lazarus, should I create, that is stable, shall I use? Thanks in advance. Sincerely Old Bob  [Edited to make title meaningful before moving to the Databases forum] ---------------------------------------------------------------------- MichaelBM · 2022-03-28 16:09 This has been working perfectly for me: http://firebirdsql.org/en/firebird-4-0/ ---------------------------------------------------------------------- Thaddy · 2022-03-28 16:21 Quote from: MichaelBM on March 28, 2022, 06:09:31 pmThis has been working perfectly for me: Don't advise FireBird. Take some mainstream, like MySql, MariaDB, Postgress (or Sqlite for lightweight). FPC supports all f them. ---------------------------------------------------------------------- MarkMLl · 2022-03-28 17:26 Quote from: Thaddy on March 28, 2022, 06:21:47 pmQuote from: MichaelBM on March 28, 2022, 06:09:31 pmThis has been working perfectly for me: Don't advise FireBird. Take some mainstream, like MySql, MariaDB, Postgress (or Sqlite for lightweight). FPC supports all f them. Don't consider SQLite if you might need multiple users or even a single user working from a different system. I believe it now has that capability, but it wasn't "designed in". I believe that MySQL/MariaDB have a somewhat fluid API. They're popular, but from the POV of Lazarus that doesn't confer much of an advantage. Firebird and PostgreSQL have fairly compatible SQL dialects, and they both have a notification mechanism (supported by an LCL component) which can be extremely useful. When experimenting with it around five years ago, I found the Firebird documentation to be poor: multiple manuals with version addenda. I've been using PostgreSQL for 20+ years, so am biased. So from my biased POV: SQLite for single-user operation, where it has supplanted e.g. Berkeley DB for configuration files and working storage. Postgres for everything else. MarkMLl ---------------------------------------------------------------------- af0815 · 2022-03-28 17:59 Without more information, all advices are personal POV. What is your knowledge about DBs ? Do you need SQL ? One or more user/connections ? How much data ? Forecast in the next 5  years ? What system? ---------------------------------------------------------------------- marsupilami79 · 2022-03-29 12:09 Quote from: MarkMLl on March 28, 2022, 07:26:51 pmWhen experimenting with it around five years ago, I found the Firebird documentation to be poor: multiple manuals with version addenda. This has been changed since. There are now language reference manuals for Firebird 3.0 anf Firebird 4.0. ---------------------------------------------------------------------- avra · 2022-03-29 12:24 Quote from: Robert W.B. on March 28, 2022, 05:43:47 pmI have to move my sql databases to Lazarus databasesDid you consider to keep data in existing database and just use it from Lazarus? ---------------------------------------------------------------------- MarkMLl · 2022-03-29 12:54 Quote from: avra on March 29, 2022, 02:24:53 pmDid you consider to keep data in existing database and just use it from Lazarus? That is of course a valid point, unless OP is absolutely certain that what he's using is unsupported. Also I find myself wondering whether he's assuming that the only way to move data between databases is CSV. MarkMLl ---------------------------------------------------------------------- Robert W.B. · 2022-03-29 13:16 Thanks for all the answers.  I should clarify though, understand.  I have a database on my mobile, with all the migraine attacks in records that I have had since 2010. So a single-user database.  A small screen and older eyes, have made me realize, that it is starting to be best to move over my database records, in cvs format (sqlite db android) to my computer.  I have used DBF in Lazarus before but it is very buggy, unfortunately.  Otherwise this would have been enough for me but importing the cvs format, I have no idea if it works. Old Bob ---------------------------------------------------------------------- af0815 · 2022-03-29 13:21 You can also use sqlite with Lazarus. Because you have done the job before in sqlite. You can copy your sqlite DB to the PC and look if you are able to open it within Lazarus or sqlitestudio/sqlitebrowser ---------------------------------------------------------------------- incendio · 2022-04-12 11:20 Sorry for the late reply. I just read this post. My suggestion is 1. For local database, don't use sqlite, use embedded firebird. Sqlite features are limited, not worth it. Firebird is lightweight with rich features. 2. For client server, cloud server, etc, it's depend on how complex your app. I still prefer firebird against mysql or postgre because it is simpler to maintenance. Negative point for Firebird is the lack to support paralel query that supports by postgre. But this can be compensate by using Multithreading approach. ---------------------------------------------------------------------- SymbolicFrank · 2022-04-12 14:22 SQLite is easiest to set up: drop the dll/so in the directory with your project. Done. Ok, it only has five data types, but as the old app is using it as well, that doesn't seem to be a problem. And it is vastly superior to DBF files. ---------------------------------------------------------------------- Zvoni · 2022-04-12 14:29 Quote from: incendio on April 12, 2022, 01:20:55 pmMy suggestion is 1. For local database, don't use sqlite, use embedded firebird. Sqlite features are limited, not worth it. Firebird is lightweight with rich features. 2. For client server, cloud server, etc, it's depend on how complex your app. I still prefer firebird against mysql or postgre because it is simpler to maintenance. Negative point for Firebird is the lack to support paralel query that supports by postgre. But this can be compensate by using Multithreading approach. Do you always shoot nuclear rockets at pigeons? QuoteI have a database on my mobile, with all the migraine attacks in records that I have had since 2010. So a single-user database. I wouldn't be surprised if it's even only one table ---------------------------------------------------------------------- winni · 2022-04-12 15:31 Hi! If it is single user then use a TStringGrid. <= 100.000 rows it is very fast. Winni ---------------------------------------------------------------------- incendio · 2022-04-12 17:42 Quote from: SymbolicFrank on April 12, 2022, 04:22:57 pmSQLite is easiest to set up: drop the dll/so in the directory with your project. Done. Ok, it only has five data types, but as the old app is using it as well, that doesn't seem to be a problem. And it is vastly superior to DBF files. So does Firebird. On client server, the setup even easier, just need to copy 1 dll only. ---------------------------------------------------------------------- MarkMLl · 2022-04-12 18:01 Quote from: incendio on April 12, 2022, 07:42:49 pmSo does Firebird. On client server, the setup even easier, just need to copy 1 dll only. The thread's several weeks old, and if you read it in its entirely you'll see that OP doesn't need anything like that sophistication. MarkMLl ---------------------------------------------------------------------- incendio · 2022-04-13 02:11 Quote from: MarkMLl on April 12, 2022, 08:01:06 pmQuote from: incendio on April 12, 2022, 07:42:49 pmSo does Firebird. On client server, the setup even easier, just need to copy 1 dll only. The thread's several weeks old, and if you read it in its entirely you'll see that OP doesn't need anything like that sophistication. MarkMLl Then I suggest OP to mark the thread as solved.