liveBook · Manning

TINYINT

TINYINT is a small-range SQL integer data type whose storage size, signedness, and numeric range depend on the implementation.

How 3 Manning books explain it

ScyllaDB in Action

TINYINT is a signed ScyllaDB integer type that stores small whole-number values.

How it is used
Stores bounded whole-number fields such as restaurant-review scores and date-bucket values.
How deep it goes
Defines signed 8-bit bounds, demonstrates range validation, and stops short of deeper numeric implementation details.
Examples
Uses review scores, month buckets, successful integer insertion, and an out-of-range value of 5000.
What you can do after
Apply it via CQL by choosing TINYINT for fields whose known values fit its supported bounds.

Read how ScyllaDB in Action explains TINYINT →

100 SQL Server Mistakes and How to Avoid Them

TINYINT is a SQL Server integer data type that stores nonnegative whole-number values using one byte.

How it is used
Sizes SQL Server whole-number columns when storage efficiency must be balanced against the values a column may require.
How deep it goes
Defines TINYINT through its range and one-byte size, then contrasts it with practical identifier and flag choices.
Examples
Uses employee identifiers, a StaffOrContract flag, an Employees table, and DATALENGTH storage checks.
What you can do after
Evaluate integer-column choices and verify their storage sizes with DATALENGTH.

Read how 100 SQL Server Mistakes and How to Avoid Them explains TINYINT →

Grokking Relational Database Design

TINYINT is a small SQL integer data type with an implementation-defined fixed storage size and numeric range.

How it is used
Evaluates TINYINT while choosing integer types for numeric database attributes.
How deep it goes
Defines one-byte storage and signed or unsigned limits, then applies them to a payment identifier.
Examples
Uses payment_id and a galaxy-scale online store to compare TINYINT, INT, and BIGINT.
What you can do after
Evaluate required values and choose an integer type using signed or unsigned ranges.

Read how Grokking Relational Database Design explains TINYINT →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.