Newbe… which DB?

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

xanant
Posts: 25
Joined: Sun Nov 09, 2014 5:38 pm

Re: Newbe… which DB?

Post by xanant » Mon Mar 28, 2016 12:47 pm

After reading this post I am unfortunately still undecided whether to use SQLite or MySQL for concurrent operations (still prefer SQLite :D : one and only one DBfile, no complicated configuration, creating users, MySQL server install, etc.). Suppose you have four computer stations. The first is physically the DB in and all 4 still connecting to perform operations. In fact, a LiveCode front-end, (same on all 4 computers), manages the INSERT, UPDATE, and DELETE records. Let us assume that one student wishes to enroll "CorsoA" from station n. 2 which, by querying DB through the front-end, becomes aware that it is free only 1 place. Before the recording is carried out on this station (COMMIT), at the location n. 4, another student wants to enroll simultaneously in the same course. The front-end on terminal n. 4 naturally sees that there is still only one free place. But at the same time the terminal 2 performs the enrollment register (COMMIT). What happens in the terminal 4? Right now for the possible entries from DB to show: there is 1 or 0 places? The situation needs to be handled first and only by the front-end? The problem would be the same whether using SQLite or MySQL? I know this is an extreme case of course, but it can happen. I do not know if I got it right but it seems that MySQL handles this situation properly and independently, while SQLite would have problems (manual executing of lock tables, use of exclusive transactions, etc.). Nevertheless I would be happy to avoid complications with the use of MySQL :cry: . Someone help me in making a final decision?
Thank you in advance.
Sandro

(P.S. The front-end is essential to operate because it allows other and various operations through complete and effective interface, considering the DB as only a data storage)

ghettocottage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 366
Joined: Tue Apr 10, 2012 9:18 am

Re: Newbe… which DB?

Post by ghettocottage » Mon Mar 28, 2016 10:55 pm

Your use-case sounds like a good candidate for MySQL database on a remote server. There is a learning curve, but it will save you some headaches down the road, and open a lot of doors for other applications.

xanant
Posts: 25
Joined: Sun Nov 09, 2014 5:38 pm

Re: Newbe… which DB?

Post by xanant » Tue Mar 29, 2016 9:44 am

Hi ghettocottage
thanks for replay.
Giving a peek around about MySQL overall management requires a little more effort.
Anyway, I think I will have to swim in its waters ..
Best wishes
Sandro

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Newbe… which DB?

Post by Simon » Tue Mar 29, 2016 5:05 pm

Hi Sandro,
Here is a link to the very mystical part of running mySQL (mystical because it's php)
http://forums.livecode.com/viewtopic.ph ... 15#p124003
Check out his blog posting.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

xanant
Posts: 25
Joined: Sun Nov 09, 2014 5:38 pm

Re: Newbe… which DB?

Post by xanant » Sat Apr 02, 2016 12:11 am

Hi Simon
many thanks for reply and for the interesting links, there is always a lot to learn.
My intention, however, is to use MySQL in a more immediate way. All this is based on four networked computers (in the same building), of which one has physically the DB reachable by three other connected as a client. Previously there was only one location and then the front-end created with LiveCode dialogued to SQLite simply. Having to handle now concurrent access, they say that SQLite is not recommended or not suitable for this purpose. For its extreme ease of use SQLite would really be ok without need for installations, provide or restrict privileges, various safety settings, etc.
I knew that my search of simplicity would remain only a hope.

Best regards
Sandro

MaxV
Posts: 1579
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: Newbe… which DB?

Post by MaxV » Thu Apr 14, 2016 3:33 pm

Install MySQL in one user PC. End of the story.
MySQL requires no resource for such few users, so user PC don't slow.
Keep that PC always on during working time.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

Post Reply

Return to “Databases”