Online data storage and retrieval options

Hi there,
I'm new for AI2. It looks very interesting for learning app development but I can see some limitations in terms of data sharing, storage, and retrieval. Ex, cannot use own Firebase account ...etc. I plan to use AI2 to develop a data collection tool for my research project.

The tool(app) aims to help users to identify animal species by answering some questions and monitoring the distribution of the population by taking photos and submitting to the database with their location. Then we can retrieve these data to map the distribution in the area.

With this purpose, the app should be able to:

  1. Create accounts for login and sign up.
  2. Take photos and enter some data in the app
  3. Submit photos with their location to a database
  4. Retrieve the collected data from the database for data analysis.

My questions are:

  1. Does AI2 is able to fully implement these functions?
  2. Do I have full access to the collected data?
  3. What is the best database option? This is the most important concern as this will be a data collection tool and I can see AI2 supports several databases, FirebaseDB, TinyWebDB, CloudDB, TinyDB.

Any suggestion would be appreciated.

Richard

Yes

Yes

You left out a few other well documentated database/storage options:
Google Sheets/Drive, MySQL, sqLite - there are other methods/options

Your choice very much depends on what you are comfortable with, the nature of your data, how "relational" it needs to be, and how much data you will store. Firebase realtime database and storage offers 10GB of space on a free account, Google Drive 15GB on a personal account, others as per your setup. You would use tinydb for database storage on the device only. You can use sqLite on the device or on a server.

If you have a clear idea of your data requirements (provide an example) and your own comfort zone/s, it becomes easier to recommend a suitable storage option.

Hello Richard

You can. A communal Firebase is provided for App testing - data has a very short life. For the released App, you use your own account.

Databases that store a lot of images - I don't know if Firebase is good for that but there are others you can use - if you have your own web server, it is likely to have database services as part of the package.

I will assign your Topic to my colleague TimAI2 - he is an expert in online storage.
His website: METRIC RAT AI2

Hi Chris and Tim,

Thank you for all your help. It sounds a very active community. We actually have an interactive mockup prototype ready in the below link:

http://pollinatorwatch.000webhostapp.com/PollinatorWatch/index.html#login

Basically, the tool will

  1. allow the registered user to create their geolocation and submit some data to the database. (routine inspection)
  2. help the user to identify the species based on their answers and retrieve the correct species from a database, or perhaps the data can be store locally? However, the photos and relevant information will need to be uploaded (incidental capture)
  3. retrieve all of their findings and provide detail about the species as an educational resource. (library)

I have tried to research all the possibilities and requirements of how to implement this tool. Will Google Sheets and Drive be a good idea for this project? Again, any further suggestions would be appreciated.

Richard

Hi Richard

Google Drive - There is a limit to number of times accessed and/or number of people accessing per length of time, so just on that I would say no. There is a 'thing' with Google. They buy-out small companies who deliver a great online service. They then try to enhance that service, but don't generate enough interest. After a while, they ditch the whole thing and customers old and new have to find another solution at great expense of code change, re-release of Apps etc. I'll leave you to decide the moral of the story.

Need Tim's input, but I don't think Google Sheets is going to handle this task well.

My view is that you need a proper relational database (SQL or similar) on your own web server, With at least a one-page web site for login from a PC so that Users also have that route for upload/download. The snag will be the cost. You will need to pay the Host for the server and domain name.

Google likely to kill off Google Drive and Google Sheets ? Really ?

However, I agree that Sheets and Drive is probably not the best solution :slight_smile: - although if all users had G Suite it may be more viable.

Firebase with Realtime Database (or Firestore) and Storage may be an option, but good programming would be important to keep costs down.

As Chris suggests, the best solution is to "roll your own" using your own database server and domain (@ £3 per month from Hostinger - can recommend them). This just takes a bit more know how and setting up on the server side. Or you could consider your own redis server and use CloudDB components in the app for access (this could handle data and images too).

To answer an earlier point, I would probably program the app to pull down all the data/images on first use, then update as new data is added.

Oh, and an alternative to MySQL is sqLite which you can use on your own server (not to be confused with the sqLite available in AI2!)

:joy: I didn't say that. In fact Google Sheets is one of those rare acquisitions Google has made a success of (originally devised by 2Web Technologies, owned by Google since 2006). That longevity has a lot to do with the rivalry from Microsoft of course. The way 'rules' are change by Google at the drop of a hat is a problem though and perhaps we are due some with Google Sheets.......

but now I'm confused... :wink:
because SQLite is a local database... and the link shows tutorials about that local database...

What is SQLite

SQLite is a software library that provides a relational database management system. The lite in SQLite means light weight in terms of setup, database administration, and required resource.

SQLite has the following noticeable features: self-contained, serverless, zero-configuration, transactional.
What is SQLite? Top SQLite Features You Should Know

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

Well I have just created and connected to an sqlite database on my own server (not local) using php...

<?php
    $myPDO = new PDO('sqlite:mysqlite.db');
if ($myPDO != null)
    echo 'Connected to the SQLite database successfully!';
else
    echo 'Whoops, could not connect to the SQLite database!';
?>

https://www.sqlite.org/index.html

maybe this is a better link:

1 Like