Database setup (server or cloud)

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
ErwinV
Posts: 4
Joined: Tue Feb 18, 2014 4:39 pm

Database setup (server or cloud)

Post by ErwinV » Tue Feb 18, 2014 4:49 pm

Hi all,
I'm totally new to programming and databases with some basic conceptual understanding and I need some direction before I start.

I'm developing a database that I want to have available online to store data for personal use. Going forward, I hope to increase the data quality and make it available to others by providing:
- iOS app
- OSX app
Later on likely a Win and Android app and maybe a web app (with help of others).

This is currently a personal project and will likely be a not-for-profit effort so I want to keep cost to a minimum. What online database service would you suggest that allows me to create and expand my database? I want to list gardener/plant information as a start and later on add picture and links to videos. I have no xSQL knowledge, I can however find my way around a tool like Filemaker.

The db solution should be compatible with LiveCode (obviously)

Looking forward to your input.
Erwin

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: Database setup (server or cloud)

Post by bangkok » Tue Feb 18, 2014 9:02 pm

Server :

-1-you go for web hosting + MySQL + PHP : gazillons of companies. Cheap. But you need to learn PHP (a script will receive SQL queries from your client apps, fetches the results from the MySQL database, see bellow)

-2- web hosting + MySQL with LiveCode Server already installed and ready to use :
Cheap (7.95 USD / month) like http://www.hostm.com/web-hosting.m

Or higher, On-Rev (sold by RunRev) 24 USD per month
http://on-rev.com/

-3- web hosting + MySQL... and then you install yourself LiveCode Server (community edition).
Again, gazillons of offers. But more tricky.
You'll find on the forum some examples with DreamHost (a large web hosting company) for instance.

Just to recap the principle :

-a web server hosts your database (MySQL is a standard) and a script language (PHP, very common, or LiveCode Server)

-on the webserver, you write a script that will receive queries, sent by any client app.

-the script processes the query, do some security analysis [remove some tricky strings, see "sql injection attack"], and then forward the query to the MySQL database, and then fetches the results and displays them to the client app.

-why such a scheme ? Security : your database is not "opened" to the outside world. Only the local script can access the database, locally, on the server. That's good practice. But of course, it's always possible to open a MySQL server to the outside world. The choice is yours.

If you go that way... then no need for PHP or LiveCode Server... you apps will send directly SQL queries to the MySQL server.
Watchout... if your apps are "public" it could make a mess with firewalls (MySQL port number is 3306)... some corporate networks would block any communication on that port.

-on the client app side... it's very simple. You'll send queries with POST command.

It's simple as that :

Code: Select all

post tMyQuery to url "http://www.myserver.com/livecode/myscript.lc"
put it into tResult
answer tResult

ErwinV
Posts: 4
Joined: Tue Feb 18, 2014 4:39 pm

Re: Database setup (server or cloud)

Post by ErwinV » Wed Feb 19, 2014 10:26 am

How about services like Google or Amazon?

In a perfect world, I want a (free) one-stop-shop to build & host & connect to the db - so without hosting it myself. I'm completely new to 'connecting to' databases ... my MS Access experience dates from last century :-)
So really, I am a true beginner on the technical level.

Post Reply