-
-
Notifications
You must be signed in to change notification settings - Fork 147
simplified data type table #385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🆗 Pre-flight checks passed 😃This pull request has been checked and contains no modified workflow files, spoofing, or invalid commits. It should be safe to Approve and Run the workflows that need maintainer approval. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @amlaenxc! Thanks for this pull request! I agree that including data types that do not appear in SQLite is confusing, and this seems like a good change to simplify the lesson a bit. I put a few suggestions here, let me know if you have any thoughts about them.
episodes/00-sql-introduction.md
Outdated
| NUMERIC(p,s) | Exact numerical, precision p, scale s. (Same as DECIMAL) | | ||
| FLOAT(p) | Approximate numerical, mantissa precision p. A floating number in base 10 exponential notation. | | ||
| TEXT | Character string | | ||
| BLOB | Raw binary data | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not count on learners knowing what binary data is. You might include examples (image file, etc.)
Is BLOB in SQLite always binary? That's generally what BLOB implies but the definition here suggests the BLOB format just stores the data as is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not exactly sure what the documentation means for the BLOB datatype with regards to whether it is always stored as raw binary. In any case, I updated the description in the table to avoid referencing "binary data" and hopefully be more understandable.
| MULTISET | A variable-length and unordered collection of elements | | ||
| XML | Stores XML data | | ||
|
||
### SQL Data Type Quick Reference {#datatypediffs} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that the quick reference table is a lot for the lesson but would like to retain this in learners/sql-cheat-sheet.md.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've moved that quick reference table to learners/sql-cheat-sheet.md, and added a column for SQLite since that is the main database platform used in this workshop.
…uick reference table to cheat sheet
Hi Adam,
I think I have addressed your suggestions, but I haven't heard back from
you yet, so I thought I'd ping you. (Though this is my first time doing
something like this, so apologies if I missed something or shouldn't have
expected a response.)
Cheers,
Alex
…On Wed, Apr 2, 2025 at 11:47 AM Adam Mansur ***@***.***> wrote:
***@***.**** commented on this pull request.
Hi @amlaenxc <https://github.com/amlaenxc>! Thanks for this pull request!
I agree that including data types that do not appear in SQLite is
confusing, and this seems like a good change to simplify the lesson a bit.
I put a few suggestions here, let me know if you have any thoughts about
them.
------------------------------
In episodes/00-sql-introduction.md
<#385 (comment)>
:
> | Data type | Description |
| ----------------------------------------------------- | :------------------------------------------------------------------------------------------------------- |
-| CHARACTER(n) | Character string. Fixed-length n |
-| VARCHAR(n) or CHARACTER VARYING(n) | Character string. Variable length. Maximum length n |
-| BINARY(n) | Binary string. Fixed-length n |
-| BOOLEAN | Stores TRUE or FALSE values |
-| VARBINARY(n) or BINARY VARYING(n) | Binary string. Variable length. Maximum length n |
-| INTEGER(p) | Integer numerical (no decimal). |
-| SMALLINT | Integer numerical (no decimal). |
-| INTEGER | Integer numerical (no decimal). |
-| BIGINT | Integer numerical (no decimal). |
-| DECIMAL(p,s) | Exact numerical, precision p, scale s. |
-| NUMERIC(p,s) | Exact numerical, precision p, scale s. (Same as DECIMAL) |
-| FLOAT(p) | Approximate numerical, mantissa precision p. A floating number in base 10 exponential notation. |
+| TEXT | Character string |
+| BLOB | Raw binary data |
I would not count on learners knowing what binary data is. You might
include examples (image file, etc.)
Is BLOB in SQLite always binary? That's generally what BLOB implies but
the definition here <https://sqlite.org/datatype3.html> suggests the BLOB
format just stores the data as is.
------------------------------
In episodes/00-sql-introduction.md
<#385 (comment)>
:
> | Data type | Description |
| ----------------------------------------------------- | :------------------------------------------------------------------------------------------------------- |
-| CHARACTER(n) | Character string. Fixed-length n |
-| VARCHAR(n) or CHARACTER VARYING(n) | Character string. Variable length. Maximum length n |
-| BINARY(n) | Binary string. Fixed-length n |
-| BOOLEAN | Stores TRUE or FALSE values |
-| VARBINARY(n) or BINARY VARYING(n) | Binary string. Variable length. Maximum length n |
-| INTEGER(p) | Integer numerical (no decimal). |
-| SMALLINT | Integer numerical (no decimal). |
-| INTEGER | Integer numerical (no decimal). |
-| BIGINT | Integer numerical (no decimal). |
-| DECIMAL(p,s) | Exact numerical, precision p, scale s. |
-| NUMERIC(p,s) | Exact numerical, precision p, scale s. (Same as DECIMAL) |
-| FLOAT(p) | Approximate numerical, mantissa precision p. A floating number in base 10 exponential notation. |
+| TEXT | Character string |
Would lean toward "text string" instead
------------------------------
In episodes/00-sql-introduction.md
<#385 (comment)>
:
> | REAL | Approximate numerical |
-| FLOAT | Approximate numerical |
-| DOUBLE PRECISION | Approximate numerical |
-| DATE | Stores year, month, and day values |
-| TIME | Stores hour, minute, and second values |
-| TIMESTAMP | Stores year, month, day, hour, minute, and second values |
-| INTERVAL | Composed of a number of integer fields, representing a period of time, depending on the type of interval |
-| ARRAY | A set-length and ordered collection of elements |
-| MULTISET | A variable-length and unordered collection of elements |
-| XML | Stores XML data |
-
-### SQL Data Type Quick Reference {#datatypediffs}
I agree that the quick reference table is a lot for the lesson but would
like to retain this in learners/sql-cheat-sheet.md.
—
Reply to this email directly, view it on GitHub
<#385 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A6MJN5LFPVGJPQIMPS3DQHD2XQWE5AVCNFSM6AAAAAB2KHD6ZGVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDOMZXGIZTENZRGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
If this pull request addresses an open issue on the repository, please add 'Closes #NN' below, where NN is the issue number.
Closes #316
Please briefly summarise the changes made in the pull request, and the reason(s) for making these changes.
Simplified the changes to the descriptions of the data types in SQLite, since SQLite & the DB Browser for SQLite only use these data types anyway. Though, I don't believe the discussion in #316 was quite correct about exactly what the data types are, and went by the documentation for SQLite: https://www.sqlite.org/datatype3.html
If any relevant discussions have taken place elsewhere, please provide links to these.
For more guidance on how to contribute changes to a Carpentries project, please review the Contributing Guide and Code of Conduct.
Please keep in mind that lesson Maintainers are volunteers and it may be some time before they can respond to your contribution. Although not all contributions can be incorporated into the lesson materials, we appreciate your time and effort to improve the curriculum. If you have any questions about the lesson maintenance process or would like to volunteer your time as a contribution reviewer, please contact The Carpentries Team at [email protected].