RSS

LuxCal Forum

The place for questions, suggestions and news about the LuxCal Event Calendar

User:   Password:   Remember Me?   
LuxCal Forum / LuxCal / Comments and Suggestions / LuxCal SQLite as good as LuxCal MySQL?
Posted:  01 Mar 2016 22:34   Last Edited By: Roel B.
Yes!
Some users think that the SQLite database is for Windows servers only. Wrong, it's not! LuxCal - SQLite is a mature alternative for LuxCal - MySQL, on ANY SERVER running PHP 5.3 or greater.
So why would you prefer LuxCal - MySQL over LuxCal - SQLite? I don't know!

The SQLite database is held in a separate single file at a location of your choice. No set up or administration is needed, just tell the calendar where to store it and what name it should be given and that's all there is.
When running multiple calendars, each individual calendar will have its own database file, which name corresponds to the calendar ID. So handling the individual databases is really easy; just a matter of copying, moving, renaming, or whatever you want.

The MySQL database is running on a (maybe virtual) database server installed by your ISP. Before installing the calendar, you will have to create the database, using tools provided by your ISP. The database is defined by host (db server) name, user name, password and db name.
When running multiple calendars, each individual calendar has its own set of database tables in the same MySQL database. For each calendar, the relevant set of tables has a unique name (the calendar ID) prefixed to each database table name. Handling the individual databases can only be done via software tools.

So, again, why would you prefer LuxCal - MySQL over LuxCal - SQLite? You probably don't.
Posted:  03 Mar 2016 04:00   Last Edited By: Roel B.
If doing a fresh installation of LuxCal I would likely install it using SQLite. About the only advantage with MySQL might be using phpMyAdmin to manage it. Due to my lack of knowledge of SQlite there might also be a tool to manage it that I'm not aware of.

The one main LuxCal version I'm running was installed when MySQL was the only option. Perhaps it says in the documentation somewhere that I haven't read that when upgrading a LuxCal under MySQL that it can be switched to SQLite?

I did find phpLiteAdmin for SQLite here. https://www.phpliteadmin.org/

Dan
__________________
"Little Guy"
Some own motorcycles, others ride them.

Find great LuxCal examples by Schwartz at http://www.calendarforum.dk/index.html
Posted:  03 Mar 2016 12:33   Last Edited By: Gork
I run my own web server (at my house) and have several PHP scripts which all use MySQL.  (I have MySQL installed on my own server as well.)  I already have backups set up for all databases in MySQL and newly created databases are automatically backed up.  It's just simpler for me to run everything under the same MySQL umbrella without having each script do its own thing.  Plus, since I've already put in the time to get to know how MySQL operates (to some degree anyway) why learn a new database system when I'm going to use MySQL for other scripts anyway?  So that's why MySQL is better for me.  I'd guess that for very busy database operations MySQL would trounce SQLite, but that is not an issue in my case.
Posted:  03 Mar 2016 16:56   Last Edited By: Roel B.
Hi Dan and Gork,

You are both experts, with a solid knowledge, I'm sure, of how to create and work with MySQL databases. You are definitely not the target audience of this post wink

I regularly get emails form starting LuxCal users who have difficulty setting up a MySQL database. Sometimes they send me a user name and password of their host and ask me to do it for them.
Lately, when I advised some novice LuxCal users to install the SQLite version, they replied saying "but SQLite is for Windows and my server runs Linux". These users I try to enlighten with this post.

And Dan, yes you are right about phpLiteAdmin. It's included in the "toolbox" section of the LuxCal SQLite download package. (Oops, I just discovered that by mistake I even included it in the LuxCal MySQL download package).
Roel
Posted:  03 Mar 2016 17:59
Hi Roel,

If I wanted to switch the current MySQL version to the SQLite version can it be done easily or is it a major job?

Dan
__________________
"Little Guy"
Some own motorcycles, others ride them.

Find great LuxCal examples by Schwartz at http://www.calendarforum.dk/index.html
Posted:  03 Mar 2016 23:38
Piece of cake Dan.

Backup your MySQL calendar database via the admin's database page and download the backup file.
Install LuxCal 4.4.0L (SQLite) in any web-accessible folder.
From the toolbox section of the downloaded zip-file upload the file "lctools.php"
Start this file with your browser (so URL: www.yourplace.xxx/calendar/lctools.php)
Select the last action: "Import calendar backup file of a previous LuxCal version"
As source file select the backup file of your MySQL backup.
Select the destination calendar.
Hit the Import button.
Done!
Good luck.
Roel
Posted:  04 Mar 2016 00:25
Thanks Roel. I'll give her a run this weekend.

You might add that to the installation_guide.html for both the SQLite and MySQL versions so people know it can be done if they want to make the switch.

Regards,
Dan
__________________
"Little Guy"
Some own motorcycles, others ride them.

Find great LuxCal examples by Schwartz at http://www.calendarforum.dk/index.html
Posted:  04 Mar 2016 08:13
@Roel
Yeah, I'd also guess that most of the users of your script would find SQLite more than adequate and much easier to install and use/manage, especially if it's the only database-using web application they're running and don't have thousands or more of users constantly accessing their calendar data.  And I always understood that's the very reason you started writing for SQLite.  I'm ecstatic that you didn't end up giving up on the MySQL version though.
Posted:  05 Mar 2016 11:06
@Dan
Good idea! I will do so.

@Gork,
When I introduced LuxCal SQLite, I've put the differences between LuxCal MySQL and LuxCal SQLite in one single file of 185 lines (toolboxd.php). So it's easy to keep both versions up to date and aligned.

Roel
Posted:  06 Mar 2016 04:25   Last Edited By: Gork
ONLY 185 lines?  So funny to hear you say that...  Granted, it's been a VERY VERY long time since I was into coding of any merit, but the longest program I ever wrote was about 100 lines total.  BASIC.  On the old Atari 800 computer.  heh  I was so proud of that program!  Heck, I still have it...  Some 30 years later...