commenting ex17 to fully understand it. Start on Database_set functoin.