CloudDB is a component and database service provided by MIT App Inventor.
CloudDB works just like TinyDB. You store and access data using tag-value pairs.
CloudDB is accessed from the Storage drawer. It is a non-visible component so it won’t appear on the Screen when you add it.
Storing data works the same as TinyDB.
StoreValue stores the new value in CloudDB. You must specify the tag and the value to store.
You can store different types of data. For example, in these blocks, highScore is a number. chat is a list of messages.
Getting data works similar to TinyDB, but with an extra step. Because the database is in the cloud, the app needs to ask to get the value and wait for a response. So an event handler block is needed to signal when the database responds with the data.
GetValue notifies the database the app wants information. valueIfTagNotThere should be the correct data type for the tag. For example, a number or a list.
GotValue is triggered once the database responds with the information. If you have multiple tags in an app, you need an if block to check for the correct tag before using the value.
![](https://technovationchallenge.org/wp-content/uploads/2024/03/clouddb-get.png)
FirebaseDB is a component that uses the Firebase database service provided by Google. MIT App Inventor provides a default account you can use. However, if you intend to store a lot of data and wish to view and/or edit it online, you must register for an account at
firebase.google.com to use it.
Firebase also uses tag-value pairs to store and retrieve data.
FirebaseDB is accessed from the Experimental drawer. It is a non-visible component so it won’t appear on the Screen when you add it.
Storing data works the same as TinyDB.
StoreValue stores the new value in Firebase. You must specify the tag and the value to store.
You can store different types of data. For example, in these blocks, highScore is a number. chat is a list of messages.
Getting data works similar to TinyDB, but with an extra step. Because the database is in the cloud, the app needs to ask to get the value and wait for a response. So an event handler block is needed to signal when the database responds with the data.
GetValue notifies the database the app wants information. valueIfTagNotThere should be the correct data type for the tag. For example, a number or a list.
GotValue is triggered once the database responds with the information. If you have multiple tags in an app, you need an if block to check for the correct tag before using the value.
![firebase get value and got value blocks](https://technovationchallenge.org/wp-content/uploads/2024/03/firebasedb-get-1024x252.png)
The Spreadsheet component allows you to read and write from a Google Sheet. You will need to set up a Google Developer Account and follow some steps to link your app to the document.
The Spreadsheet component is available in the Storage drawer. It is a non-visible component so it will not appear on the Screen when you add it to your app.
There are many blocks available to allow the app to read and write cells, rows, and columns in your spreadsheet. It is a good option if you have table data you want to access from your app. You can also view and edit the data in Google Sheets, which is helpful, especially when testing your app.
![readrow and writecell blocks](https://technovationchallenge.org/wp-content/uploads/2024/03/ai-spreadsheet-blocks-1024x181.png)