Saving Data on Android



Download 19,28 Mb.
Pdf ko'rish
bet253/292
Sana24.01.2022
Hajmi19,28 Mb.
#407089
1   ...   249   250   251   252   253   254   255   256   ...   292
Bog'liq
Bailey J., Dominguez A., Djermanovic D. - Saving Data on Android (1st Edition) - 2019

vertical scaling
.
In many NoSQL databases, including Firestore, when you need more storage, 
Firestore spreads your data across many servers. This is known as 
horizontal 
scaling
, and it’s much easier to scale horizontally than vertically. Why? Because it’s 
much easier to get many moderately powerful machines than to continually upgrade 
a single machine to handle everything. Machines have their limits too, you know!
Saving Data on Android
Chapter 16: Introduction to Cloud Firestore
raywenderlich.com
247


Collec/ons and documents
You learned that the Realtime Database stores data as one large JSON tree that 
contains keys and values. You also learned that these values can be objects 
containing other key-value pairs. The Firestore is a collection of objects that are 
stored in a hierarchical structure that resembles a tree. Every object in a collection is 
represented as a document. The document consists of key-value pairs known as 
fields
 in the Firestore. These values can be strings, numbers, binary data, or nested 
objects in a map format. The limitation, however, is that the document size must be 
less than 1MB.
In simple terms, collections are nothing more than a group of documents. A 
document cannot contain other documents, but it can contain another collection 
known as 
subcollection
.
Cloud Firestore supports many data types. To learn more about them, visit the 
official 
documentation
 at 
https://firebase.google.com/docs/firestore/manage-data/
data-types
.
Key points
• Cloud Firestore is a NoSQL database similar to the Realtime Database.
• Firestore stores data as a collection of objects which are stored in a hierarchical 
structure that resemble a tree.
• Documents and collections are the main building blocks of Cloud Firestore.
• Documents consist of key-value pairs known as fields.
• Collections are a group of documents.
• Collections can only contain documents.
• The root of the Cloud Firestore database can only consist of collections.
• A document cannot contain other documents, but it can contain another 
collection; these are known as subcollections.
Saving Data on Android
Chapter 16: Introduction to Cloud Firestore
raywenderlich.com
248


• It’s easier to query, filter and sort data using the Firestore since it can all be done 
within a single request.
• It’s best to use foreign-key-like fields in objects, as you don’t want to duplicate 
data and clutter the database.
• The Firestore scales horizontally; this is easier than the Realtime Database which 
scales vertically.

Download 19,28 Mb.

Do'stlaringiz bilan baham:
1   ...   249   250   251   252   253   254   255   256   ...   292




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish