Skip to content

Lesson Contribution - datatypes INTEGER and SMALLINT #318

Open
@Talishask

Description

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:

    1. Char when the sizes of the column data entries are consistent.
    1. Varchar when the sizes of the column data entries vary considerably.

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions