Recent

Author Topic: access mdb or accdb format or should I use SQLite  (Read 4009 times)

CLA

  • Newbie
  • Posts: 6
access mdb or accdb format or should I use SQLite
« on: November 10, 2015, 09:55:50 pm »
Hi,
I'm new here & hope to learn a lot. I have been using Delphi 3,5 and 7 years ago to write some tools for land surveying and managing my wifes daycare.
I will convert an old Delphi7 program (I wrote 10 years ago) with paradox tables to work with access tables (I think) in Lazarus.
The program calculates duration of presence and prices for making bills for the daycare.

some questions.
1. What file format can you recommend and will work best with Lazarus.
2. I need some calculated fields. I noticed I can define these in MSAccess or I can define these in Lazarus. What way do you prefer and why?

thanks,

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: access mdb or accdb format or should I use SQLite
« Reply #1 on: November 11, 2015, 12:48:43 am »
1. What file format can you recommend and will work best with Lazarus.
2. I need some calculated fields. I noticed I can define these in MSAccess or I can define these in Lazarus. What way do you prefer and why?

Database is a matter of choice. Everyone may have a different opinion. Mine is Firebird.

Here you may try and find yours:
http://wiki.freepascal.org/Lazarus_Database_Overview

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: access mdb or accdb format or should I use SQLite
« Reply #2 on: November 11, 2015, 01:08:02 am »
Hi,
I'm new here & hope to learn a lot. I have been using Delphi 3,5 and 7 years ago to write some tools for land surveying and managing my wifes daycare.
I will convert an old Delphi7 program (I wrote 10 years ago) with paradox tables to work with access tables (I think) in Lazarus.
The program calculates duration of presence and prices for making bills for the daycare.

some questions.
1. What file format can you recommend and will work best with Lazarus.
2. I need some calculated fields. I noticed I can define these in MSAccess or I can define these in Lazarus. What way do you prefer and why?

thanks,

  • As far as I know lazarus can see access databases only through odbc which makes an odbc issue which ever is better suited for odbc
  • How often do you change front ends? do you want to redefine those calculated fields every time a new frond end is written? How often do you change the calculation method? do you mind recompiling the frond end when you do?
just a couple of thoughts to get you started down your own choices personally I do as much as I can on server side with out using stored/views. After that and when I have everything ready I extend on views for security and stored for functionality that is faster to calculate on server ee any kind of running total type of calculations that an aggregated function already exists is written in server side sql using everything that the server offers from temporary tables to server side transactions, only if the application's speed is critical or the enterprise rules require different calculations for different departments with out sharing of the calculation bwtween the users/departments (ee enterprise level sevurity) then and only then I move those to either a 3rd tire or a fat client design. other than that I prefer to not compile frond ends to often and have small updates to the database/server propagate the changes I need. Then again that is because in the enterprise world it is easier to get approval for a server side update than for a new executable.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

lazjump

  • Jr. Member
  • **
  • Posts: 61
Re: access mdb or accdb format or should I use SQLite
« Reply #3 on: November 11, 2015, 04:50:50 am »
Hi CLA,

1. By default I suggest you to use SQLite because it is simpler. You only have to put a DLL file in your app's folder.

But if you have plan to put the database file in a shared folder (so it could be accessed by more than one instance of your application at the same time) then Access is the way to go. I would recommend MDB rather than ACCDB if this is the case, simply because I know old systems using MDB in shared folder that have run since before 2000 until now without major problems.

2. If the calculation only using values from the database, then do it on the database (if it is easy to do with SQL). And apply taazz's suggestions.

Additionaly, let me suggest you to use Zeos (http://sourceforge.net/projects/zeoslib/) as the database access library, which is somewhat easier to use than Lazarus' SQLdb.
I thought Delphi was expensive until I learned the price of ExtJS

CLA

  • Newbie
  • Posts: 6
Re: access mdb or accdb format or should I use SQLite
« Reply #4 on: November 11, 2015, 08:10:10 am »
Thanks for the hints and fast replies!

 

TinyPortal © 2005-2018