Questions

Please try to answer the following questions (when in doubt, have a look at the content in the chapter itself—you'll find all the answers there!):

  1. In a Cloud Firestore database, what's the difference between a document and a collection? And can a document contain a collection?
  2. Can you name three of the main differences between a SQL and a NoSQL database?
  3. Consider the following code:
 docs = await db.collection('favourites')
.where('userId', isEqualTo: uid).getDocuments();

            What does this query perform? And which data type is the docs variable?

  1. In a Cloud Firestore database, is it possible to allow data access only to authenticated users? If so, how can you achieve that?
  2. How can you create an instance of a FirebaseAuth class?
  3. Consider the following code:
var result = db.collection('favourites').add(fav.toMap()
.then((value) => print(value.documentID))
.catchError((error)=> print (error));

            Can you explain what these instructions perform?

  1. When would you create a getter method for a property in a class? And how do you write the code to create it?
  2. When do you need a Map object to interact with a Cloud Firestore database?
  3. How do you delete a document from a Cloud Firestore database?
  4. How do you pass data from one screen to another?
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.139.83.199