I’m deliberately sharing tables across multiple databases and multiple apps. There’s a method to this madness:
- Within an App, multiple databases (dev, test, production) let me work on and test different versions of the database structure, without impacting actual users.
- Within a related App, the same-named table from each of dev, test, and production.
Now, each table has two names:
- The name that appears in the left-hand Databases Pane. Usually Capitalized.
- The name that appears at the right end of the table header, when the table contents are displayed. Usually snake_case.
Of course, you can change both of these. But it turns out that the two names have different scopes.
The #1 name appears to be the table’s “physical” name. Change that name in one App, and it changes in all of them. Fortunately, code does not refer to a table by this name.
The #2 name appears to be a “logical” or “local” name. That is, local to the App, and must be unique within that App. Change it in one App, and its local name in other Apps remains unchanged.
Because code refers to a table only by name #2, name #1 does not need to be unique within any App. Duplicates are entirely possible. So when you do this, double-check what you’re doing!