Advise for a standalone database
Posted
#1
(In Topic #1120)
Enthusiast

Just wanted to ask for some advice. I am creating a small program that needs a database but I don't really any to have to install a full sized MySQL server.
I need to store about 10 tables that would hold about 100-5,000 rows at any given time
Has anyone use SQLite with Gambas and if so is there any example of how to save and recall data (or is that the same way as I'm using MySQL?
Hope someone can guide me to the correct point
Thanks
Andy
Posted
Regular

Posted
Enthusiast

thatbruce said
Note: sqlite is a single connection database, i.e. only one process can access the database in a read/write mode at a time.
Yea that is what I am looking for it's a single application database (the application is used by customers to print dress labels)
So SQLite would be the one to pick?
Posted
Expert

I use SQLite extensively for any project that needs data storage/retrieval.
Unless your data set has millions of records, then it should be more than sufficient for the task.
How are your SQL skills and do you have a rough design for your database structure?
Regardless of size and the underlying platform, it is important to get the design right and I've found that the more time spent on this task, the easier it will be to maintain.
If you could send me a list of the data elements for a table, I'll build a quick example to help you on your way. PM or email.
As a 'very' rough draft, I'm putting together a table mapping of a piece of software for writing a novel - See attachment in pdf form.
Even for simple designs, having one of these and keeping it up to date can be quite useful.
Cheers - Quin.
I code therefore I am
I code therefore I am
Posted
Enthusiast

Code (gambas)
- ' Gambas module file
- '' Module file to handle SQLite file
- '' SQLite file handeling subroutines
- '' writen by GrayGhost4 Marvin Clavey June 2022
- With $con
- .Type = "sqlite3" ' Defines the type of connection
- .Name = "data.SQL" ' database name is the name of the database file"
- sainfo.Add(RS[obj.Name])
- Return saInfo
- saInfo = saInfo.Reverse()
- '' Deleat one reccord from the table with an indexed coluem
1 guest and 0 members have just viewed this.


