All of you who are planning on starting your projects with firebase, should know that you can not use a query like you would in SQL: select .. where d=1 AND d=2 you can only use equal_to once and do the other filtering within the client code.
this might be actually helpful not sure if you wanted to implement the same thing stackoverflow.com/questions/42118908/query-with-multiple-where-clauses-in-firebase
So for more advanced filtering we need to send all the objects in the child to the client and have their copy of the code do the work? If that is the case wouldn't there be security issues? Like if I have an array of sensitive documents assigned to different people but also could be assigned to more than one person I would have to send a list of all the documents and then trust that the client code sorts out only the ones they are allowed to view. Would it not be better for the data server to only send what is necessary? I'll keep watching and maybe the answer will show up.
Sir, My query is like this... Select * from table where name="John doe" and country="USA"; So here how can I orderbychild (name & country) and country.
Rey Guerrero I don't think so. Like in regular SQL, to do things right you need to explicitely index data you wanna search in a dedicated platform, a search engine like ElasticSearch. Or... If you dont have petabytes to search, just use Firebase and perform filtering operations yourself in javascript. This second solution has the great advantage to be 100% client so it works offline.
Hello, it seems there is an error in the code shown at 4m19s. It should be const events = db.ref().child('events'); instead of const events = db.child('events'); (or const events = db.ref('events');)
David, I'm studying Firebase right now, and I think I still miss the big picture. It looks like Firebase is very easy to use, flexible, and whatever, but the advantage of NOT having and intermediate server layer makes the whole thing fall short when we want to realize a really secure and protected application. For example, what if I would like to prevent users from inserting data on Sundays, or if I have to issue an external web api request to see if the user is allowed to edit data... It looks like there is some javascript interpreter, to execute the rules in Firebase, but (please correct me!) I don't think this is done to let developers write really complex scenarios, it would really be overkill. Please, can you help me in understanding better? Thanks
how can I query for a specific node in my realtime database that has been created using push() method using one of the values stored within that node(e.g. city = new york), Will the following query work: mRef.child("restaurants").orderByChild("city").equalTo("New York");
IsuruKusumal Firebase is a NoSQL storage engine. Means a key-value store. Only simple querying operations allowed. You have to design the database to create as much indexes (key-value) as needed and maintain them yourself. Brain revolution, isn't it ? After decades of SQL it can take few months to fully understand the concepts.
Denis TRUFFAUT wouldn't it create so much redundant data? and I know that multi-path updates are a thing, but that would still create so many paths to be updated, slowing down the entire database
Depends on your usage. In SQL you have centralized data so write/update operations are easier. But when you want to read, you need to join accross multiple tables and your application can slow down dramatically. NoSQL have indeed redundant data so managing write/updates (consistency) is your responsibility but as you don't need to join (your data has been prepared/computed in the write/update operation) reads are significantly faster. Oh and don't worry about speed or storage capacity, Firebase Realtime database is built upon Google infrastructure.
why its not working in realtime in searchview? Query text = productreff.orderBy("Name").whereEqualTo("Name", searchView.getQuery()); after this step, my app has crashed
Nicely presented but VERY disappointing. The last query was a joke. Where are the LIKE statements? Firebase team, PLEASE sort this out. What you're offering here just isn't up to the job.
Hello sir, thank you for your explanation, really help me as junior programmer. Can you explain me how to convert query like this one: SELECT * FROM Event WHERE name="a" AND job="b" into query format in firebase? Thank you...
how can i use orderByKey and orderByChild in the same query? For example : i need to get next question of specific category (1). but i know current question id value (10). ```firebase.database().ref('/questions').orderByKey() .startAt("10") .orderByChild('category_id') .startAt("1") .limitToFirst(1).once('value').then(function(snapshot)```
When I add ".orderByChild('myproperty')" to my query, I get an error" Using an unspecified index. Consider adding ".indexOn": "myproperty"? Can't I use this without messing with rules? Not ready for that just yet...
No. These queries are just not responding to my requests! I've tried rectifying every possible error! Still i ain't able to get desired result, and retrieve correct data. Please help if possible. :)
It would be good if they could use the find() method as seen in MongoDB, but for some reason, even though Firebase is essentially a fork of MongoDB, it doesn't contain any such method.
None of these codes works anymore while these videos are still on the website. Amazed by the lack of support given that almost everything with the firebase database documentation found on the web is deprecated.
Odair Sixas I performed it doing this: docDB.orderByChild('your-document') .startAt('John') .endAt('John\uf8ff') But I could'n perform something like "name like '%John%'.
It's a evil query sintax I cannot found a simple query like this : select * from events where eventname like '%MEET%' and de case sensitive is a other evil Heeeellllpppppp
when the damn hipsters gather in one place they create something like Firebase. I can't even imagine how it got popular. I'm praying each day so there could be someone who can create something like Parse. When comparing Parse vs Backendless vs Firebase it is same if you compare JS Bach vs Sinatra vs my neighbour that sometimes sing in his bath. Horrible logic, 0 guides.
All of you who are planning on starting your projects with firebase, should know that you can not use a query like you would in SQL:
select .. where d=1 AND d=2
you can only use equal_to once and do the other filtering within the client code.
this might be actually helpful not sure if you wanted to implement the same thing
stackoverflow.com/questions/42118908/query-with-multiple-where-clauses-in-firebase
Am i the only one to spot the SQL queries use "==" which is incorrect. ?
SQL syntax is just a single "="
It depends on the DB type. Some of then uses double equals.
So for more advanced filtering we need to send all the objects in the child to the client and have their copy of the code do the work? If that is the case wouldn't there be security issues? Like if I have an array of sensitive documents assigned to different people but also could be assigned to more than one person I would have to send a list of all the documents and then trust that the client code sorts out only the ones they are allowed to view. Would it not be better for the data server to only send what is necessary? I'll keep watching and maybe the answer will show up.
I wish to have watched this video last week. Really good explanation.
Ok
Sir,
My query is like this...
Select * from table where name="John doe" and country="USA";
So here how can I orderbychild (name & country) and country.
How i can use "DISTINCT" in firebase? like: SELECT DISTINCT City FROM Customers
excellent firebase query course
Is there a function for contains? like in sql it would be: select * from events where eventname like '%MEET%'
Rey Guerrero I don't think so. Like in regular SQL, to do things right you need to explicitely index data you wanna search in a dedicated platform, a search engine like ElasticSearch.
Or... If you dont have petabytes to search, just use Firebase and perform filtering operations yourself in javascript. This second solution has the great advantage to be 100% client so it works offline.
@@DenisTRUFFAUT this sucks. Such a basic thing !
this tutorial is just amazing thanks a lot
Glad you liked it!
I like the way it was compared to the sql relational database way
Hello, it seems there is an error in the code shown at 4m19s. It should be const events = db.ref().child('events'); instead of const events = db.child('events'); (or const events = db.ref('events');)
Hi! How can I order the result with timestamp?
David, I'm studying Firebase right now, and I think I still miss the big picture.
It looks like Firebase is very easy to use, flexible, and whatever, but the advantage of NOT having and intermediate server layer makes the whole thing fall short when we want to realize a really secure and protected application.
For example, what if I would like to prevent users from inserting data on Sundays, or if I have to issue an external web api request to see if the user is allowed to edit data...
It looks like there is some javascript interpreter, to execute the rules in Firebase, but (please correct me!) I don't think this is done to let developers write really complex scenarios, it would really be overkill.
Please, can you help me in understanding better?
Thanks
How to you achieve the same query results in java or kotlin?
why does orderByChild return the wrong ordered data for me
Is this tutorial for Firestone or RealTime Database or both
how can I query for a specific node in my realtime database that has been created using push() method using one of the values stored within that node(e.g. city = new york),
Will the following query work:
mRef.child("restaurants").orderByChild("city").equalTo("New York");
you saved 2 days thank you
how can i query using two goddamn constraints?
IsuruKusumal Firebase is a NoSQL storage engine. Means a key-value store. Only simple querying operations allowed. You have to design the database to create as much indexes (key-value) as needed and maintain them yourself. Brain revolution, isn't it ? After decades of SQL it can take few months to fully understand the concepts.
Denis TRUFFAUT wouldn't it create so much redundant data? and I know that multi-path updates are a thing, but that would still create so many paths to be updated, slowing down the entire database
Depends on your usage.
In SQL you have centralized data so write/update operations are easier. But when you want to read, you need to join accross multiple tables and your application can slow down dramatically.
NoSQL have indeed redundant data so managing write/updates (consistency) is your responsibility but as you don't need to join (your data has been prepared/computed in the write/update operation) reads are significantly faster.
Oh and don't worry about speed or storage capacity, Firebase Realtime database is built upon Google infrastructure.
I'm personally finding the NoSQL world to be very limiting so far.
I'm personally finding the NoSQL world to be very limiting so far.
Any tutorials about cloud firestore?
How to query for a key at different copies without events
why its not working in realtime in searchview? Query text = productreff.orderBy("Name").whereEqualTo("Name", searchView.getQuery()); after this step, my app has crashed
How about OR & AND queries in Firebase with multiple fields?
How can I do the part "render data to HTML"? If I do a console.log(snap.val()) it returns [object Object]
how to query using a url and get the users based on name
So let's say I have a books database and I want to search a substring in the books titles. Not clear if it's even possible !
Good question.. since name being the primary key.. have you found a solution to this ? lemme know .. cheers
How do I search for a particular word in string? In sql like operator
Nicely presented but VERY disappointing. The last query was a joke. Where are the LIKE statements? Firebase team, PLEASE sort this out. What you're offering here just isn't up to the job.
is there any tutorials on cloud firestore.
This is an excellent tutorial but the firebase documentation is somewhat confusing
Hello sir, thank you for your explanation, really help me as junior programmer. Can you explain me how to convert query like this one:
SELECT * FROM Event WHERE name="a" AND job="b"
into query format in firebase?
Thank you...
I suggest using stackoverflow for technical questions. RUclips does not support this well.
how to display recently added data to database on top once you call from database? I mean recently added data first in the list view.
how to order desc??
Perfect, congratulations.
how can i use orderByKey and orderByChild in the same query?
For example : i need to get next question of specific category (1). but i know current question id value (10).
```firebase.database().ref('/questions').orderByKey()
.startAt("10")
.orderByChild('category_id')
.startAt("1")
.limitToFirst(1).once('value').then(function(snapshot)```
and how do you covert like (‘abc%)
Can you tell me How to filter data to show it in search view of android
only node.js works but not python???
This video is missing follow up with the people asking questions here
When I add ".orderByChild('myproperty')" to my query, I get an error" Using an unspecified index. Consider adding ".indexOn": "myproperty"? Can't I use this without messing with rules? Not ready for that just yet...
that's not an error it's just a tip
No.
These queries are just not responding to my requests! I've tried rectifying every possible error!
Still i ain't able to get desired result, and retrieve correct data.
Please help if possible. :)
I try to sort a list alphabetically (asc) for Turkish app, but letters like ö,ç,ş,I,ğ,ü goes to end of the list. How can I fix it? Thank you
There needs to be locale-aware comparison/collation, but I don't know if Firebase has that.
It would be good if they could use the find() method as seen in MongoDB, but for some reason, even though Firebase is essentially a fork of MongoDB, it doesn't contain any such method.
how can i use SQL IN clause in Firebase . e.g. select name from users where id in (1,2,3)
hi dude how to order by desc in firebase
Firebase looks cool, but am finding a big problem implementing %like% for searching as it is easily done in sql. can some one help me please
which app is used to edit the video clips like that?
whatsapp
Last screen with the screwing machine such a fail xD. Good video though! Firebase is awesome!
how to get column name firebase select query in javascript
#AskFirebase Same question, how to query using two constraints.
Mikko Tan See my answer for isuru
awesome..
None of these codes works anymore while these videos are still on the website. Amazed by the lack of support given that almost everything with the firebase database documentation found on the web is deprecated.
2016?
there is one way to do something like "name like 'John%'" ?
Odair Seixas I think it's startAt("John")
Odair Seixas see my answer for rey
Odair Sixas I performed it doing this:
docDB.orderByChild('your-document')
.startAt('John')
.endAt('John\uf8ff')
But I could'n perform something like "name like '%John%'.
Good
This is no way to do a descending order query like "Newest dates first" ???
you found a solution?
i love you man
Thanks!!!
Your comments is a week ago and the video was released just today! #tf
I don't think they support themselves with fake accounts if that's what I'm thinking
This code doesn't work no more
great content do you guys work for google to teach?
It's a evil query sintax I cannot found a simple query like this : select * from events where eventname like '%MEET%' and de case sensitive is a other evil Heeeellllpppppp
Hey David East, please help out on this below
Its not working for meeeeeeeeee HEELLPPP
when the damn hipsters gather in one place they create something like Firebase. I can't even imagine how it got popular. I'm praying each day so there could be someone who can create something like Parse. When comparing Parse vs Backendless vs Firebase it is same if you compare JS Bach vs Sinatra vs my neighbour that sometimes sing in his bath. Horrible logic, 0 guides.
Ironically, I think Parse was absorbed and became Firebase. But still, this is funny