Hi @Phillip Wu !

Namespaces give flexibility and were introduced to make a lot of powerful things possible.

If you are confused with all this uncertainty and don't need flexibility for now you can create Namespace DEV that has only one database DEV for everything and you can think that you are working with database DEV only with no any confusion.

But you will sign in into Namespace DEV in your IRIS system as users log in into Namespaces in InterSystems IRIS.
 

Or, e.g., if you take any vanilla IRIS docker image and run it, it will have a USER namespace that provides access to the USER database, which is convenient to use for any dev experiments.

Thank you, @Tani Frankel !

This is useful through years!

Just adding here the snippet to add role to a user:

ClassMethod AddRoleToUser(user = "CSPSystem", role = "DB_USER_Read") As %Status

{

// Change to the %SYS namespace.

new $NAMESPACE

set $NAMESPACE="%SYS"



set status=##class(Security.Users).Get(user, .MyUserProps)

set $p(MyUserProps("Roles"),",",*)=role

set status=##class(Security.Users).Modify(user,.MyUserProps)



// Announce success.

if $$$ISOK(status) {

write !, "Roles for the user "_user_" were successfully modified."

}

Quit status

}