54 thoughts to “Converting SQL structures to Firebase structures – The Firebase Database For SQL Developers #2”

  1. #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! 🙂

  2. 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?

  3. What if its the case where I have many events and not many attendees. Besides the event being lame, would it be better to opt for having the attendees put along with the events or is it better to have seperate them. Does requesting data from two locations constraint more in this case vs having all the data in one place.

  4. Am I right for an n:n relationships, we will need both EventUsers and UserEvents pathes to enalbe listing entities from both directions?

  5. 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

  6. #AskFirebase as a browserify fan, it there any way of using firebase with npm/browserify? Tried to implement it, but got errors "firebase not found" until i put firebase script src to html file and then it was working. Thanks!

  7. #AskFirebase Does the server upload transfer data to realtime database counting in price? The price table describes GB downloaded. I do not understand the standard. Thanks!

  8. Another question how to work with information that get updated after they have been put in a relation.
    My application lists places. The details for each place can be updated any time. The users of my database can mark their favorites places. The ids for the places are stored in the user table as an object.
    – With an SQLdatabase, I would create a query to just select the place details for the stored IDs of favorites and get the data. Can I do something similar with Firebase?
    – Or should I store all details of a favorite place in the user database and update every instance of the place at every user when the details of the place are updated (it does not even feel right to ask the question)?

    Background: working with javascript and Polymer/polymerfire

  9. 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.

  10. Pause at 2:16. Isn't that stupid? The names 'David' and 'Alice' are redundant. There should rather be a single JSON array with the ids of all attendees.

  11. this was very helpful but can u do something like this for android i am haven't lots of trouble querying and the moment

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

  13. Does Bob know Alice is meeting up with David? (2:09) Joking aside, thanks for the video it's very helpful.

  14. in sql we put all name in table and make a relationship between it and users table
    Name { NameID (int),Name (string) } Users {UserID (int) , FirstName (int) ,secoundname (int)  }

    how to make this in Firebase???

  15. Okay so I think if you want to use user ID's in the eventsAttendees it should look something like this.

    "eventAttendees":{
          "fm": {
                  "0" : "1",
                   "1": :9"
            }
    }

    If someone could tell me if this is the correct way to do this and best practice that would be great 🙂

  16. #AskFirebase
    So every client will download a full list of UID's with names? Was this video really described as a advanced example ?

  17. #AskFirebase What if I have lots of events and I realize that the name of one of the attendees is wrong who is in many of the events, is there a way to update all at once?, I see this as main con on noSQL, how do you manage it?

  18. Ok, I got it. This video explains, how to implement 'many-to-many' in firebase for SQL-developers, but how to do it right for no-sql developers? Should events contains attendees with users-data, or maybe just store array with uid's? In MongoDB documentation said, that if document should contains few subdocuments, we can just store their in array, but if there gonna be many subdocuments, is better to store id's of subdocuments in array. How about Firebase? Can I do it like in MongoDB, or there is another rules?
    #AskFirebase

  19. 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?

  20. Hii sir, Answer my query
    https://stackoverflow.com/questions/57624782/how-to-retrieve-multiple-data-using-specific-field-in-firebase-database

  21. In this example, in Firebase, you would now have a duplicate entry, you have the username in users and on attendies, you could duplicate the data the same way in SQL couldnt you ? But its just realy bad practice 😀 I guess what im saying is, why?!?!?!

  22. It was very helpful for me, I am trying the structure at 02:54 in this video, but stuck in retrieving data of event-attendees with angularfiresrore

  23. Great vids! You've helped with several cloud and Firebase topics I'm new to. One note.. the title says "For SQL Developers" but you explain what a foreign key is. Not much of an SQL dev if you don't know that! 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *