简体   繁体   中英

What is a node in Firebase Realtime Database?

In the Firebase Realtime Database security docs https://firebase.google.com/docs/database/security/quickstart , they mention nodes. However, I can't seem to figure out what a node is in Firebase. Can anyone help?

You should read the documentation about structuring your data . If you don't already understand that, then security rules are going to be difficult to reason about. From that page:

All Firebase Realtime Database data is stored as JSON objects. You can think of the database as a cloud-hosted JSON tree. Unlike a SQL database, there are no tables or records. When you add data to the JSON tree, it becomes a node in the existing JSON structure with an associated key.

And:

When you fetch data at a location in your database, you also retrieve all of its child nodes. In addition, when you grant someone read or write access at a node in your database, you also grant them access to all data under that node. Therefore, in practice, it's best to keep your data structure as flat as possible.

A node is just a location in the database, like other tree-like data structures in computer science.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM