datacarpentry / sql-ecology-lesson

Data Management with SQL for Ecologists
http://datacarpentry.github.io/sql-ecology-lesson
Other
49 stars 144 forks source link

Lesson Contribution - datatypes INTEGER and SMALLINT #318

Open Talishask opened 3 years ago

Talishask commented 3 years ago

I'm a member of The Carpentries staff and I'm submitting this issue on behalf of another member of the community. In most cases, I won't be able to follow up or provide more details other than what I'm providing below.


In the Introduction to Database and SQL lesson(https://datacarpentry.org/sql-ecology-lesson/00-sql-introduction/index.html), I am recommending an addition(s). In the datatype section, two datatypes INTEGER and SMALLINT, were mentioned. However, their description is exactly the same and can create confusion. Hence, I propose adding an explanation such as INTEGER data type has 32 bits and can represent whole numbers from [(-2 power 31)-1] through [(2 power 31)-1]. In contrast, the SMALLINT data type has only 16 bits.

Similarly, two datatypes, CHAR and VARCHAR, were mentioned. However, it has not been explained when to use which one. Such as:

I think these two additions will be helpful for the learners.

ChristinaLK commented 3 years ago

Thanks Talisha. :)

We've had other issues opened about the data types, so will include this feedback if/when that section is revised.