A data type is an attribute of a column in a Table. It describes the kind of data that can be stored by a record in that column. Examples of data types include text, number, date, email address, etc.
Different data types have their own filters, groups, and other functionality available to help you work better with information of that type.
Examples of filtering include:
Examples of grouping include:
All Table columns have a data type in the Mathesar UI. By default, we use the text data type since it has the least restrictions, but you can change the data type to anything else. Here’s an early design of what selecting a data type will look like:
You can pick from a set of options and depending on what option you pick (in this example, it’s Number), you can choose additional settings to configure your column correctly. These additional settings are optional.
Unlike Databases, Schemas, Tables, and Views, data types are not a direct representation of the configuration in the database. We’ve simplified data types within Mathesar to make them easier to use. Based on the settings you choose, we pick the correct underlying data type to use in the database. If you’re curious, the underlying database configuration is shown as
Database Type at the bottom of the menu (seen in the screenshot above)
25, group rows by age groups, and so on.
In the future, users will be able to plug in their own data types into Mathesar.