As per the documentation, a database is a named collection of SQL objects. It's not possible to access objects in one database from another database directly. We can access other databases using a database link (or foreign data wrappers), which is an extension, as mentioned in the previous chapter.
There are two template databases:
template1 in any PostgreSQL cluster. When we create a database using
CREATE DATABASE db1;, a clone of the
template1 database is created. If we have a few user-created tables with some master data in
template1, these will be copied to the new database. If we want to create a
newdb database that is a clone of a user-created database
mydb, we can use
CREATE DATABASE newdb ...