For most of Internet of Thing project we required a cloud database
There are many IoT database providers example:amazon aws ,Microsoft azure ,In most cases these are cost based ,useful for real time projects ,little complex
If you are beginner in IoT projects you can use Google spreadsheets as your database ,you can log data of sensor or you can fetch data for control..
Google spread sheets have official API to popular coding Languages ,if you are doing the project using Intel Edison ,raspberry pi , most cases you use python ,Google spreadsheets have unofficial api also ,[better than original]
Example overview of IoT system using Google spreadsheets:
[front end(user)]<->[device (phone/lap)]<->[app build using Google api]<->[Internet]<->[Google spreadsheet database]<->[internet]<->[IoT Device(Rpi..)]<->[spreadsheet API]<->[sensor/control]