Recent

Author Topic: which database?  (Read 5830 times)

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1346
Re: which database?
« Reply #30 on: January 25, 2020, 07:21:13 am »
If you have decided to use sqlite, I would definitely recommend using the mORMot.
Learning curve is steep, but the reward(s) will be high.

Switching from sqlite towards postgresql or mysql or Mongo is as simple a changing one line of source-code.

Besides, mORMot offers static binding of the sqlite3 engine (with encryption). So, the only thing that is needed is a single executable. And it offers easy REST, websockets and many many more features. And a very active community.

Again, it will consume learning time, but extensive help (docs/people) is available.

Thaddy

  • Hero Member
  • *****
  • Posts: 10516
Re: which database?
« Reply #31 on: January 25, 2020, 10:41:15 am »
I agree with that. (except the learning curve is not as steep as you wrote, it is just slopy but there are many examples)
Static bindings are a major asset indeed because it removes dependencies. A.K.A. true embedding.

lawman

  • New Member
  • *
  • Posts: 42
Re: which database?
« Reply #32 on: January 25, 2020, 12:27:04 pm »
If you have decided to use sqlite, I would definitely recommend using the mORMot.
Learning curve is steep, but the reward(s) will be high.

Switching from sqlite towards postgresql or mysql or Mongo is as simple a changing one line of source-code.

Besides, mORMot offers static binding of the sqlite3 engine (with encryption). So, the only thing that is needed is a single executable. And it offers easy REST, websockets and many many more features. And a very active community.

Again, it will consume learning time, but extensive help (docs/people) is available.

1. sounds like mormot is more useful when i want to create a client/server scenario.     can i incorporate mormot later, or do i have to use from start?    as initially I'll just want a local app.

2.  cant sqlite already statically bind and db encrypt already without mormot?

3.  is it also just one line to switch from sqlite to firebird?

« Last Edit: January 25, 2020, 03:02:20 pm by lawman »

lawman

  • New Member
  • *
  • Posts: 42
Re: which database?
« Reply #33 on: January 25, 2020, 10:44:31 pm »
If you have decided to use sqlite, I would definitely recommend using the mORMot.
Learning curve is steep, but the reward(s) will be high.

Switching from sqlite towards postgresql or mysql or Mongo is as simple a changing one line of source-code.

can you use mormot with firebird?

lawman

  • New Member
  • *
  • Posts: 42
Re: which database?
« Reply #34 on: January 27, 2020, 03:33:33 pm »

The only problem I sometimes run into is rare locking of the SQLite base, if two updates are made within the exact same time - I have described that in another post, but I am working on a solution - typically it takes less than 5ms to make an update, so just a few retries of the commit in case of locking should do it.

Doesn't sqlite have a timeout feature to retry locked db for writes?   I'm hoping this resolves the issue as wanting to create a db which will stay on a mapped network drive.


delphi2pk

  • Newbie
  • Posts: 4
Re: which database?
« Reply #35 on: January 30, 2020, 09:52:49 am »
Instead of mormot you can use REST Dataware. These are RAD opensource components and also available in Lazarus online package manager. Data over net is a charm in it. It uses ZeosLib to connect any supported database.

Only drawback is its in Portuguese language.

Thaddy

  • Hero Member
  • *****
  • Posts: 10516
Re: which database?
« Reply #36 on: January 30, 2020, 10:03:55 am »
There are rest examples in fcl-web (standard) and here: https://medium.com/@marcusfernstrm/create-rest-apis-with-freepascal-441e4aa447b7

devEric69

  • Sr. Member
  • ****
  • Posts: 359
Re: which database?
« Reply #37 on: January 30, 2020, 12:15:18 pm »
Static bindings are a major asset indeed because it removes dependencies. A.K.A. true embedding.

Very true.
On Linux, we can also try and adopt aptitude (= to freeze a\the package{s} of a database server): «=» on the desired version.



use: Linux 64 bits (Ubuntu 20.04 LTS).
Lazarus version: 2.0.4 (svn revision: 62502M) compiled with fpc 3.0.4 - fpDebug \ Dwarf3.

lawman

  • New Member
  • *
  • Posts: 42
Re: which database?
« Reply #38 on: January 31, 2020, 06:02:50 pm »
Instead of mormot you can use REST Dataware. These are RAD opensource components and also available in Lazarus online package manager. Data over net is a charm in it. It uses ZeosLib to connect any supported database.

Only drawback is its in Portuguese language.

But this would still require a program running to serve requests from clients.

In that scenario why not just use client server DBMS?

delphi2pk

  • Newbie
  • Posts: 4
Re: which database?
« Reply #39 on: February 04, 2020, 07:38:01 am »
Instead of mormot you can use REST Dataware. These are RAD opensource components and also available in Lazarus online package manager. Data over net is a charm in it. It uses ZeosLib to connect any supported database.

Only drawback is its in Portuguese language.

But this would still require a program running to serve requests from clients.

In that scenario why not just use client server DBMS?

REST Dataware do not require a persistent connection to open and it is stateless. Data transfer speed over internet will be high enough. An example server is provided with it. This server is enough for almost your all projects and databases.

 

TinyPortal © 2005-2018