Database Storage App with List Values

I'm new when it comes to programming and I'm trying to figure out how to do this particular app.
DatabaseStorage
I already set up the screen but I don't know how to do the code. This is the format I'm suppose to follow.
Format

Is TinyDB okay for this?

If so, make two TinyDB instances, with different TinyDB names and NameSpace values:

  • tdbPhone (tag = name, value = phone, NameSpace = 'PHONE')
  • tdbEmail (tag = name, value = email, NameSpace='EMAIL')

To add a name, set tag to name, and add each value (phone, email) to their respective TinyDB NameSpace.

The instructions I've seen don't require Tiny DB. Could I see an example of how this would be formatted?

What instructions?
What database then ?

I'm supposed to build an app with a database that has keys and the values that are lists. Then I need to add code to add the contact to the data base using this key, value structure I screenshot above. I hope that gave more clarification.

keys and values implies you are to use

See the documentation in: Dictionaries blocks

and save the data and store it in a database. There are numerous databases you can save to using App Inventor; a TinyDB is a local database on the device; CloudDB and FirebaseDB are among those that can be saved 'in the cloud' using App Inventor controls.

What have you tried? The community is not going to be graded for providing a solution but we are willing to help you code this assignment. :astonished: The dictionary documentation provides some Blocks for you to start.

1 Like

What database ? (2nd attempt)

Things such as a name, email, and phone are part of the database.

What is a database = Databases

Here is a rough outline of blocks required. I used the tinydb, which is the persistent storage component for local storage on the device

1 Like

Thank you.

Hello dear sir ... Can you please post the aia file?

The aia has long since been deleted.

The blocks are there though (up above), you will need to (carefully) copy these.