databasedatabase-designrelational-database

When should you use a one-to-one relationship with tables in your database?


When should you use a one-to-one relationship with tables in your database?

You can implement necessary fields inside one table. Even if data becomes very large you can enumerate column names that you need in a SELECT statement instead of using SELECT *.


Solution

  • 1 to 0..1

    1 to 1

    These considerations are irrelevant in most cases, so in most cases you should consider merging the "1 to 1" tables into a single table.

    See also: Why use a 1-to-1 relationship in database design?