Starting programming.....

Anything QL Software or Programming Related.
User avatar
genetika
Bent Pin Expansion Port
Posts: 86
Joined: Thu May 05, 2011 5:38 pm
Location: Rome, ITALY
Contact:

Starting programming.....

Postby genetika » Tue Jul 02, 2019 2:48 pm

Hi.
Which is the best SBASIC setup in order to start programming a QL custom Database application ?
Ex. Pointer Enviroment, Compiler, Toolkit, DBAS (?), Suqcess (?), DB API, ...

:geek:

Thanks in advance.
M.


User avatar
BSJR
Chuggy Microdrive
Posts: 62
Joined: Sun Oct 18, 2015 12:53 pm
Location: Amsterdam
Contact:

Re: Starting programming.....

Postby BSJR » Thu Jul 04, 2019 4:46 pm

genetika wrote:Hi.
Which is the best SBASIC setup in order to start programming a QL custom Database application ?
Ex. Pointer Enviroment, Compiler, Toolkit, DBAS (?), Suqcess (?), DB API, ...

What do you mean by programming a Database?
The familiar PSION Archive is the only one that easily lets you create a program to manipulate one or more _dbf databases.

Another option is DATAdesign. This needs the PE to run and only lets you create a database (_ddf) and view, filter and sort or change its contents. However there is a set of keywords in the API to write your own program in S*Basic to process related _ddf files.

DBAS has more or less the same options with a different database format (_dbs).
SUQcess is like the DATAdesign_exe only a front-end for this _dbs format to create, manipulate and view a single database.

Each format has its strong points and weaknesses.
The _dbf format is the most limited in terms of field size or types and number of records allowed.
The _ddf format is the most versatile and has few limitations while DBAS's _dbs fits somewhere in between.

Bob


User avatar
Dave
SandySuperQDave
Posts: 2409
Joined: Sat Jan 22, 2011 6:52 am
Location: Austin, TX
Contact:

Re: Starting programming.....

Postby Dave » Thu Jul 04, 2019 6:02 pm

I always just used flat files or linked lists. It's not like a QL program usually has complex data requirements.

I personally prefer flat files. They occupy more memory, but they are quicker to index and easier to save/load only the specific entries you want if each record set starts on a ^2 boundary.


User avatar
NormanDunbar
Super Gold Card
Posts: 700
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: Starting programming.....

Postby NormanDunbar » Thu Jul 04, 2019 7:47 pm

The answer has to be "it depends" and it does depend on what the database is intended to hold.

Archive is ok, but has some problems if files are not closed correctly and rumours abound of corrupted databases files for other reasons. I've had a few in my time with nothing more sinister than the freezer starting up while I was writing data back to the database. Most annoying, but hey, backups!

I've never used Datadesign so I cannot comment.

DBAS, I have used. It can be called from SuperBASIC, C68 and I think, assembly. I quite like it, although it's been a while since I last had to write something using it. Unless things have changed, the Quanta Library Guide was written in C68 using DBAS as the database back end, by me, some years (decades!) ago. It's reasonably fast and I never had a corruption, freezer or otherwise.

Given the ability these days to set file positions using some of the various toolkits around, Turbo, DJToolkit, TK2 etc, you could easily write a database system using simple files and if the records were all the same size, you can easily get random access to various records using the record number -1 multiplied by the record length to get the starting position in the file. An index on other "columns" in the record could be created simply by holding the key field(s) and a record number in another database table (or even database) - lookup the index fields, get the record number(s) and read the required data from the database.

These flat files can be accessed in SuperBASIC, C68, Assembly and probably a myriad of other languages available for the QL.

If you drop a few hints about the intended purpose, and proposed data structures or layout, we'll be glad to offer further assistance.


Cheers,
Norm.


Why do they put lightning conductors on churches?
If at first you don't succeed, don't take up skydiving!
If you think your job is pointless, remember, there's someone in Germany who fits indicators to BMWs.
User avatar
genetika
Bent Pin Expansion Port
Posts: 86
Joined: Thu May 05, 2011 5:38 pm
Location: Rome, ITALY
Contact:

Re: Starting programming.....

Postby genetika » Mon Jul 08, 2019 9:11 am

Hi.
I would like to create a personal software to manage a club

- a software that allows the storage and search of the members' data and related payments, as well as the club management.

A test app, not a production app, only to try my SBASIC abilities.

:-)

M.

NormanDunbar wrote:The answer has to be "it depends" and it does depend on what the database is intended to hold.

Archive is ok, but has some problems if files are not closed correctly and rumours abound of corrupted databases files for other reasons. I've had a few in my time with nothing more sinister than the freezer starting up while I was writing data back to the database. Most annoying, but hey, backups!

I've never used Datadesign so I cannot comment.

DBAS, I have used. It can be called from SuperBASIC, C68 and I think, assembly. I quite like it, although it's been a while since I last had to write something using it. Unless things have changed, the Quanta Library Guide was written in C68 using DBAS as the database back end, by me, some years (decades!) ago. It's reasonably fast and I never had a corruption, freezer or otherwise.

Given the ability these days to set file positions using some of the various toolkits around, Turbo, DJToolkit, TK2 etc, you could easily write a database system using simple files and if the records were all the same size, you can easily get random access to various records using the record number -1 multiplied by the record length to get the starting position in the file. An index on other "columns" in the record could be created simply by holding the key field(s) and a record number in another database table (or even database) - lookup the index fields, get the record number(s) and read the required data from the database.

These flat files can be accessed in SuperBASIC, C68, Assembly and probably a myriad of other languages available for the QL.

If you drop a few hints about the intended purpose, and proposed data structures or layout, we'll be glad to offer further assistance.


Cheers,
Norm.


User avatar
BSJR
Chuggy Microdrive
Posts: 62
Joined: Sun Oct 18, 2015 12:53 pm
Location: Amsterdam
Contact:

Re: Starting programming.....

Postby BSJR » Mon Jul 08, 2019 12:46 pm

genetika wrote:Hi.
I would like to create a personal software to manage a club
- a software that allows the storage and search of the members' data and related payments, as well as the club management.
A test app, not a production app, only to try my SBASIC abilities.

Both DATAdesign and DBAS can be programmed in SBasic.
The full DBAS package (Dilwyn's site) comes with basic examples on using its keywords and is the simpler of the two but I think more than capable for your club's needs.
Quantum Technology uses DBAS for the Black Phoenix configuration files and most of its programs.

Bob


User avatar
NormanDunbar
Super Gold Card
Posts: 700
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: Starting programming.....

Postby NormanDunbar » Mon Jul 08, 2019 10:26 pm

I agree, go for DBAS. But try out a few ideas before you dive into your main application.

Good luck.

Cheers,
Norm.


Why do they put lightning conductors on churches?
If at first you don't succeed, don't take up skydiving!
If you think your job is pointless, remember, there's someone in Germany who fits indicators to BMWs.

Who is online

Users browsing this forum: No registered users and 3 guests