Common SQL Queries converted for the Firebase Database - The Firebase Database For SQL Developers #4

preview_player
Показать описание

Welcome to the fourth video in the Firebase Database for SQL Developers series!

This video translates 8 common SQL queries to Firebase Database queries.

Рекомендации по теме
Комментарии
Автор

I was hoping he'd just say "JUST KIDDING" after doing #8. Holy Hack!!!

saadazzz
Автор

8. ruined it
not going to use it until there's a way to check multiple equal values.

trendyil
Автор

8. Query - End of my short journey with firebase

Mikos
Автор

Come on David, #8 is a pure hack! As far as I experienced, queries are the worst part of the Firebase.. I wish you guys could improve that soon.

muratyasar
Автор

Query #4: What if I need something like "SELECT * FROM Users WHERE Name LIKE '%ab%'?

Query #8 is REALLY scary, what if I need Users with age > 20 and location = 'Berlin'? What about a screen where the user can have a unlimited number of filtering the results? should I duplicate all the possibilities and transform the DB in a monster?

rafaelbrugnollo
Автор

With Firebase(NoSQL) you don't need to know your schema beforehand; BUT you need to know your queries, which is way more difficult. Bye bye easy and real-time analytics. Let's admit it people, SQL was good and it worked well so far.

aamederen
Автор

The indexing trick at the end of the video seems to be general enough to be part of the database functionality. These DIY things are what scare me as a Firebase noob.

StoianAtanasov
Автор

Indeed #8 cannot be called a "fix"! its a freaking patch poorly done.... WHAT IF i need to check 3 or more conditions? Do i have to create triplet "indexes"? WHAT IF i have a db with 1 billion entries? Do i have to "index" all entries for all possible combinations of queries?
This looks absurd #askfirebase

fgbarone
Автор

Does 8 just mean that I have to go through ALL of my 3 million users every day, calculate their age and update the age_location index?

dimitrioschatzidimitriou
Автор

Hmm working with the Firebase Database seems to be a lot harder compared to the other one...

stvltn
Автор

#8 impossible to deal with, seems still pretty in beta stage to do such kind of hack...Hope they could make it neat soon

Mr.charles.s
Автор

no. 8 looks hackish. hopefully soon we don't have to create things like age_location else the database will grow like hell. just imagine i have to deal with this on every item without assistance. prone to errors.

ValAllenSamonte
Автор

Hi David, I have 2 further questions regarding your last query: a) Don't u think your index is kinda redundant? If Alice moved from Berlin, Is there a way we can set a rule to automatically update our indexes without altering existing insertions? b) Let's say we have 1M recoreds, how can we add 1M indexes fast? #Askfirebase

parisqs
Автор

When you get the users back do they return as JSON files? How would I obtain a certain attribute from a user that I get as a result of my query?

stevefreed
Автор

#8 just killed my enthusiasm. I've had the impression Firebase was a limited Data Management system, now it looks like a fancy key-value store.

Ghaniballx
Автор

They need to add the ability to query by multiple filters, like:

knexpert
Автор

8 just doesn't seem right. Is there no other way to query when there are conditions on 2 different children?

RahulSainani
Автор

That last query seem won't go well. To use the query, do I have to add the custom age_location entry to every record in the database?

What if my database has been in use for long and I need to use a new query like that e.g. when there's an update to my app where I need to add a new query view? Do I then need to go and edit every record in the database and add the custom entry field as shown in this video?

JonathanIsmaila
Автор

How to make a select "select count(*) from users where age>30" which return 1000+ records. If I get these objects and count from client side, it may cost a lot of bandwidth. So any solution on this case

chrismok
Автор

I also think #8 is a no go with this scary thing until the right approach. may be you should cover more of those queries come up with something that is practically possible.

akshaykulkarni