Launch price: every exam for $29.99 a year, for the first 300 buyers. See the price

CertStreak
Menu

Model schemas and implement indexing strategies, including designing tables and choosing appropriate data types

A worked example

Match

Your company uses one Azure Database for PostgreSQL flexible server. Several development teams must decide how to organize their tables on this server. No team may provision an additional server.

Match each team's requirement to the way you should organize its objects. Each option can be used once, more than once, or not at all.

  • Correct match: Separate schemas in one database.

    Schemas inside one database allow related objects in different namespaces to reference each other through foreign keys. Separate databases would not work because queries cannot directly access objects in another database on the same server.

  • Correct match: Separate schemas in one database.

    Separate schemas in one database support queries that join data across namespaces. Separate databases would block the single-statement join because connections target one specific database.

  • Correct match: Separate databases.

    Each database is an isolated container selected when establishing a connection. Separate schemas provide namespaces within the same database and therefore do not provide separate database connection targets.

  • Correct match: Default public schema in one database.

    The application can keep its tables in public because it needs no additional organizational boundaries. Extra schemas or databases would introduce unnecessary structure.

Why

Separate databases provide distinct connection targets and containers for application objects. Separate schemas organize objects within one database while allowing joins and foreign keys across namespaces. An application without separation requirements can use public in a single database.

Practise this topic until it's automatic.

Ten questions a day, every answer explained, and misses that come back until you beat them.

Start free