Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Firebase data structure and its characteristics

Firebase data structure and its characteristics

It is wrong to adopt RDB for Mobile development.
Mobile development should use NoSQL efficiently. And Firebase is able to do mobile development most efficiently now.

1amageek

June 26, 2017
Tweet

More Decks by 1amageek

Other Decks in Technology

Transcript

  1. Firebase data structure and its characteristics nori Jun 2017 @1amageek

    Hello. #Otemachi Firebase #2 Thank you Yahoo Japan
  2. Feed Feed Feed Feed Sample App User Feed Feed Feed

    Feed Feed Photo Photo Photo Photo Photo
  3. How to Design Firebase realtime database 1. Scheme less 2.

    Structure 3. Client side join 4. Denormalization
  4. 1. Flat structure can flexibly respond to changes Flat Nested

    Model Structure 2. Nested structure can constitute simple security Model Model Model
  5. Structure Room { room: { room_00: { message_00: true, message_01:

    true } }, message: { message_00: { text: "hollo" }, message_01: { text: "hollo" } } } { room: { room_00: { message_00: { text: "hollo" }, message_01: { text: "hollo" } } } } Flat Nested 1. Flat structure can flexibly respond to changes 2. Nested structure can constitute simple security
  6. Client side join { id: "000000", user: { id: "user_00",

    name: "1amageek", thumbnailURL: "https://**.jpg" followerUserIDs: ["user_01"], followeeUserIDs: ["user_02"], }, content: { id: "content_00", text: "Hello", imageURL: "https://**.jpg" }, retweetUserIDs: ["user_01", "user_02"], commentUserIDs: ["user_01", "user_02"], likeUserIDs: ["user_01", "user_02"], }
  7. Client side join { id: "000000", userID: "user_00", contentID: "content_00",

    retweetUserIDs: ["user_01", "user_02"], commentUserIDs: ["user_01", "user_02"], likeUserIDs: ["user_01", "user_02"], } user: { id: "user_00", name: "1amageek", thumbnailURL: "https://**.jpg" followerUserIDs: ["user_01"], followeeUserIDs: ["user_02"], } content: { id: "content_00", text: "Hello", imageURL: "https://**.jpg" }
  8. Ads PXL Your photos will be born again as a

    wonderful art. This photo collage is what makes you feel more happy and pleased. Let's share the pixel art to all over the world. $0.99