Learn Labs
Data Types

Self-test

Check your understanding

Self-test5 questions

—/5
  1. When would you choose numeric over double precision, and what does it cost?

  2. Why is timestamptz usually the right type for event times rather than timestamp?

  3. What is the practical difference between json and jsonb, and which can be indexed with GIN?

  4. When is an array column a reasonable choice, and when should it be a separate table?

  5. Design question

    Design the columns for a payments table: amount, currency, status, created time, and a flexible metadata blob. Justify each type.