Hi I'd like to know if there's a way to force the DB structure when using Firebase Console.
For example I need to add an object with name: "Sample" and value: 3, then when I want to add another object i can only insert object with the same structure (name and value). Is there any way to achieve this?
There is no way to enforce a certain data structure when entering data using the Firebase Console.
When you access the Firebase Database through the Firebase Console (console.firebase.google.com), you are accessing the database as an administrative account. Such administrative access bypasses the security rules: all reads and writes are allowed and data is not validated.
After you have completed the registration in Firebase, you can follow this example to put data in your Firebase Console:
DatabaseReference ref = FIRDatabase.database().reference()
String user_key = ref.childByAutoId().key
ref.child("Users").child(user_key).setValue(["username": username, number: "3"])
It is very simple!