What is a column?
Values in a column share a data type. That is, if a column’s data type is
Integer, that means every value within that column must be an integer. There may be other constraints too, related to formatting, character length, or whether or not that value is mandatory.
Here’s an image of the
Orders table in Metabase’s Sample Database, with the
Created At column highlighted. The
Created At column’s data type is
DateTime, and the values in this column each correspond to the timestamp of a single order.
Columns vs fields
While columns and fields aren’t technically the same thing, it’s usually okay to use these terms interchangeably. See Columns vs. Fields.
However, keep in mind that columns don’t always directly correspond to fields in a database. For example, you may want to create a custom column in Metabase that contains calculated values, like one that displays the percentage discount for each order. You’d create this custom column by telling Metabase to calculate the
Discount divided by the
Subtotal and display the resulting value in a new column.
While many traditional relational databases store data as rows and are typically best suited for holding transactional data, some databases (like data warehouses optimized for analytics) utilize columnar storage.
Columnar databases (also known as column-oriented databases) physically store a column’s values together, rather than indexing based on entire rows. This can drastically speed up analytical queries and aggregate functions, since those queries will be able to retrieve similar data from the same location on a disk, rather than executing large reads across the database to pull a column’s values from individual records.
Did this article help you?
Thanks for your feedback!