Save data in the firebase db

Im having a problema trying to save data in the db. I found two ways of doing this. I say i Saw two examples of doing this:

  1. the store function does not appear there and i Saw an example using this

  2. json creste objects - this i Also Saw an example using this - the part of function responsible to save data does not appear

How to solve, the functions dont appear there