title: Accessing an Array of Items in Firebase
body: <p>I actually have 2 questions both similar to each other. A brief overview of my issue is as follows:</p>
  
  <p>The Library App I am developing has a one to many relationship with books and authors meaning one book can have many authors. A sample author and a book is attached as images.</p>
  
  <p><a href="https://i.stack.imgur.com/hAESz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hAESz.png" alt="a sample author"></a></p>
  
  <p><a href="https://i.stack.imgur.com/j1nlq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/j1nlq.png" alt="a sample book"></a></p>
  
  <p>Q1. How can I search for a specific author? For a book that has only 1 author, it will always have the zeroth index. How about a book which has multiple authors? If so the same author can exist in other indexes as well. I want to get all the books from a specific author and I am wondering what is the best way to do it?</p>
  
  <p>Q2. How to find out whether the author has books under their name. I can actually get all the books and iterate through it. However, it will take a whole lot of bandwidth just to do an "EXISTS" operation. Is there an easy way to do it?</p>
  
  <p>Thanks in advance!</p>