def register(self, obj, force=False):
if isinstance(obj, orb.Database):<EOL><INDENT>scope = self.__databases<EOL>key = obj.code()<EOL><DEDENT>elif isinstance(obj, orb.Schema):<EOL><INDENT>scope = self.__schemas<EOL>key = obj.name()<EOL><DEDENT>else:<EOL><INDENT>raise orb.errors.OrbError('<STR_LIT>'.format(obj))<EOL><DEDENT>try:<EOL><INDENT>existing = self.__schemas[obj.name()]<EOL><DEDENT>except KeyError:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>if existing != obj and not force:<EOL><INDENT>raise orb.errors.DuplicateEntryFound('<STR_LIT>'.format(key, typ))<EOL><DEDENT><DEDENT>scope[key] = obj<EOL>return True<EOL>
Registers a particular database.

:param      obj     | <orb.Database> || <orb.Schema>