/Weather Table Columns Solution – Developing Android Apps

Weather Table Columns Solution – Developing Android Apps

Video: Weather Table Columns Solution – Developing Android Apps


All right, let's see how we did. If you checked record ID, weather condition ID, minimum temperature, wind speed, humidity, maximum temperature, date, weather direction and pressure, you've got this right. Now technically, one could have included either date or time, as time includes date. Month doesn't really make any sense here. But since we're really displaying the date, it makes sense for the database to actually replicate what's on the display as much as possible. Units should be stored in a separate table with preferences. There's no reason to store things we aren't displaying, such as, you know, rainfall or average temperature. And besides, we cannot get these from the OpenWeatherMap API. We do need weather condition ID, since we use this to both display the forecast, and determine the image to display.

And finally, while it's not displayed in our UI, we need an ID column to uniquely identify each row. As discussed, it's required for all SQLI database tables that are going to be displayed in Android list views..

READ  King of Avalon English Tutorial - How to Train Your Dragon