Firebase Database Querying 101 - The Firebase Database For SQL Developers #3

Firebase · 194K views · 2016 · 5:28

Open on YouTube

Databases & storageWeb developmenttutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it, usually as part of the full series list, when people coming from SQL struggle to structure and query data in Firebase.

Recommended by 2 people across 2 different months, 2016 to 2018.

What it is

A five-minute video from the official Firebase channel, third in the 'Firebase Database for SQL Developers' series, introducing how querying works in the Firebase Realtime Database. It explains what you can and cannot do compared with SQL and walks through the basic query options.

What people said

Recommends AL. · 2016-12 · Stack Overflow · on “How to insert data of two tables in Firebase?”

Have you tried going going through the Converting SQL structures to Firebase structures - The Firebase Database For SQL Developers #2 [this video] ? :)

Recommends Niklas · 2017-08 · Stack Overflow · on “Polymer and firebase get data with parameter”

Firebase Database video series: The Firebase Database For SQL Developers [this video] 1. SQL Database & The Firebase Database 2. Converting SQL structures to Firebase structures 3. Firebase Database Querying 101 4. Common SQL Queries converted for the Firebase Database 5. Joins in the Firebase Database 6. Denormalization is normal with the Firebase Database 7. Data consistency with Multi-path updates 8. Securing your data structure with Security Rules

Cites AtaerCaner · 2017-02 · Stack Overflow · on “Firebase Android SearchView by values”

Let's think i'm searching Mike. First, bring all users by username with mDatabase.child("Users").orderByChild("Username") . But i want the Mike's datas, so i add .equalTo("Mike") . This returns a query as i say then set an .addListenerForSingleValueEvent to get datas of Mike. The information i want will come as iterable object with one item in this callback. Then cast it to your User modal. mDatabase.child("Users").orderByChild("Username").equalTo("Mike").addListenerForSingleValueEvent(new ValueEventListener() { @Override public void onDataChange(DataSnapshot dataSnapshot) { User user = dataSnapshot.getChildren().iterator().next().getValue(User.class); } @Override public void onCancelled(Dat

Cites code-8 · 2018-11 · Stack Overflow · on “Firebase Database Query Error : child is not a function”

I have a table users in Firebase with these data { "users" : [ {"id": 1, "fcmToken" : "APA91bHJAzXe384OEYvfk4bKsyS1NQvteph7DwG7JRIMm_HuXg8EeNllVrsSi0v9W_Gh95ezbOStp3ZWuWl0AzFKxMaCOjN81yiz7A5qhkONrd7lP2CTkUbFErw28r3ONTLvo8c8sO7hdiWY78iar8s:APA91bHJAzXe384OEYvfk4bKsyS1NQvteph7DwG7JRIMm_HuXg8EeNllVrsSi0v9W_Gh95ezbOStp3ZWuWl0AzFKxMaCOjN81yiz7A5qhkONrd7lP2CTkUbFErw28r3ONTLvo8c8sO7h", "fName" : "John", "lName" : "Doe", "phone" : "9786770861" }, {"id": 2, "fcmToken" : "APA91bHJAzXe384OEYvfk4bKsyS1NQvteph7DwG7JRIMm_HuXg8EeNllVrsSi0v9W_Gh95ezbOStp3ZWuWl0AzFKxMaCOjN81yiz7A5qhkONrd7lP2CTkUbFErw28r3ONTLvo8c8sO7hdiWY78iar8s:APA91bHJAzXe384OEYvfk4bKsyS1NQvteph7DwG7JRIMm_HuXg8EeNllVrsSi0v9W_Gh95ezbOStp3ZWu