Converting SQL structures to Firebase structures - The Firebase Database For SQL Developers #2

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

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

Do you struggle with converting relational data models to Firebase Database models? If you said, yes then this lesson is for you.

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

Please keep making these videos ...helps a lot to many of us...!!

samridhgupta
Автор

The sql query refers to e and u but those aliases are defined as event and user

oleersoy
Автор

Late at the party; funny no-one noticed before that the SQL query at 1:11 won't work, as "e" and "u" are referenced, but never defined.
Though I think all humans still understand what was meant. And what is === in SQL?

joepbeusenberg
Автор

I am so happy to watch to this video with Korean subtitle as "Non-Eng" developer :)

lrnngman
Автор

this is a video to come back to once in a while

OnionKnight
Автор

My main problem with this is i want to build an app with a very large collection of static data that is inherently and inexorably relational. The answer to "how do you have a foreign key in firebase" seems to be that, really, you just can't. The data will not resolve itself and you have to basically use naming conventions to simulate a foreign key. In a relational database foreign keys can be validated and ensured by the system itself, forbidding the insertion of an illegal key. In firebase it seems like one typo in a large dataset seems to mean you're going to be hunting for an awfully long time about what is spelled wrong. At least in MongoDB you can use the "$ref":{} notation. It's ugly and a pain, but it works.

Imagine, for a sample example, you were making a game and wanted the server to generate Diablo style dropped weapons. Diablo has a massive list of weapons, with foreign relations to the handedness of the weapon, a range of whitelisted properties it can have applied to it, unique abilities, associated pre and posftxes for the names depending on those abilities, number of properties that can be applied based on the rarity of the weapon, and it goes on and on.

This is a complicated set of inherently relational data, and I wish there was a better way to have these realations strictly enforced for their legality. I'm not saying a NoSQL database cannot represent this data, but I am saying I feel a relational database will represent it more cleanly and make it easier to work with. Relational DBs aren't always the way to go, but sometimes there's an awful lot of value in those relations.

Weaver_Games
Автор

Thanks for making such great videos I was searching for these types of videos for a long time. great work

goharshafiq
Автор

I am an SQL developer, not a Sequel developer!

HolgerJakobs
Автор

#AskFirebase Assuming that one User has attended many Events, how would I get all the Events one User had attended using the data structure that was shown in the video? Thanks! :)

mikkotan
Автор

6 years later and not one comment about the multiple SQL mistakes at @1:04? In tsql you'd get an error about inconsistent aliases, unknown operators, and the IDs themselves are wrong. The Users table doesn't have UId and if it did, it would be all caps. The use of "Id" is supposed to be all caps as well.

To some this may seem irrelevant but to me as a senior software engineer myself, it matters. This is a pitch to SQL Developers, right? A junior dev could've written it correctly.

eio
Автор

I can be wrong, but this flexibility come with a maintenance nightmare (replications of data everywhere, need 1 root structure for every join that I need). I can't even think of it working on large team. I think I'm gonna stick with SQL databases and firebase only when I RLY need realtime requirement #RANT

davidhsv
Автор

What if you wanted to update the phone number of an attendee? Do you have to update it in multiple places, such as attendees and users (if they both have phone number)?

webdevguy_
Автор

This is just what I was looking for. Thanks.

Ges
Автор

What in cases if user changes his data (username, city, etc)? It means that I need to loop through all json objects and change it?

IgorJankovic
Автор

I understood the SQL part of the video but what was about all the noSQL. DAMN!

motorparadise
Автор

When you create the collection for Event Attendees. Are the list of members fields on the Event or are they a Sub Collection. I think Sub Collection but I want to make sure.

matthewurbina
Автор

So how to export an existing data base into the other without manually having to type it in?

sandwichtube
Автор

Great video! Just a minor correction - The alias for Events table should be "e" instead of "event" in the query example at 1:15.

shankarrraju
Автор

holy moly! only if i understand this earlier! thanks so much David!

moseskarunia
Автор

#AskFirebase How do you create auto increment primary key?

JakovljevicMladen