Users other than DBC (or a site administrative user already granted privileges on ALL objects in the database by DBC) must explicitly be granted the CREATE DATABASE and CREATE USER privileges before they can create another user or database, even in their own space. For details, see “Privileges That Must Be Explicitly Granted” in Security Administration.
As you create users and databases, a hierarchical relationship evolves.
- DBC owns everything in the hierarchy, and is the immediate owner, or parent, of A and B.
- A owns C, D, and F. A is the immediate owner, or parent, of C and D.
- C is the immediate owner, or parent, of F.
- B is the immediate owner, or parent, of E.
The user who submits the CREATE DATABASE/USER statement is the creator of the database or user. The database or user whose permanent space is used to create a new database or user becomes the immediate owner of that new database or user.
In addition, that owner owns all databases or users below it in the hierarchy, because they are created from its original permanent space. The exception to this is if ownership of a specific database or user is transferred to another database or user.
The creator is not necessarily the immediate owner; a creator is the immediate owner only if the new database or user resides within the database of the creator (and thus is directly below the creator database in the hierarchy). With the appropriate privileges, the creator can create a new database or user somewhere else in the hierarchy. For more information on ownership privileges which are implicit privileges, as well as explicit privileges automatically granted to a creator, see Security Administration.