Graph Metadata Modeling Commands
The following are the graph metadata modeling commands:
| create attrdesc | |
|---|---|
| Syntax | create [encrypted] attrdesc <attrname> as <type> |
| Description |
Create a new attribute descriptor (attrdesc) with name, type, and optional encryption. type string, boolean, byte, char, short, int, long, float, double, number(precision, scale), date, time, timestamp, blob, clob |
| Example | create encrypted attrdesc salary as double. |
| Role Requirements |
permissions: read, create, update on the system catalog encrypted on the system catalog to create encrypted attribute descriptors. |
| create nodetype | |
|---|---|
| Syntax | create nodetype <nodetypename> [attributes ([<attrname>]+)] [pkeys ([<pkeyname>]+)] |
| Description | Create a new nodetype in the database |
| Example | create nodetype basicnode attributes (name, address, salary) pkeys (name) |
| Role Requirements |
permissions: read, create, update on the system catalog encrypted on the system catalog to create a nodetype with an encrypted attribute descriptor . |
| create edgetype | |
|---|---|
| Syntax | create directed|undirected|bidirected edgetype <edgetypename> [attributes([<attrname>]+)] [from <nodetypename>] [to <nodetypename>] |
| Description | Create a new edgetype in the database |
| Example | create undirected edgetype basicedge attributes(desc) from basicnode to basicnode |
| Role Requirements |
permissions: read, create, update on the system catalog encrypted on the system catalog to create a nodetype with an encrypted attribute descriptor. |
| create user | |
|---|---|
| Syntax | create user <username> passwd=<passwd> [roles=<role>[,<role>]+] |
| Description | Creates a user with the username, password, and roles specified |
| Example | create user scott passwd=***** roles=basicrole |
| Role Requirements |
permissions: read on the system catalog create on a role to create a user with that role. |
| create role | |
|---|---|
| Syntax | create role <ROLENAME> [with [privilege ([g][r][o][d][i][e][p])|all)] [permission (([c][r][x][u][d][e])|all) on types ([(<ANY_TYPE>, all, $SYSCATALOG) ,]+ (<ANY_TYPE>, all, $SYSCATALOG))]+] |
| Description |
Creates a role with any privileges or permissions specified in the TIBCO Graph Database Server. The all type indicates what the permissions should be when for a type and a permission, the type-specific permission is not set. $SYSCATALOG allows for operations on the system catalog like creating a nodetype. |
| Example | create role basicrole with privilege g permission crx on types (basicedge, basicnode) |
| Role Requirements |
privileges: grant permissions: read on the system catalog |
| grant | |
|---|---|
| Syntax | grant role <ROLENAME> with [privileges ([g][r][o][d][i][e][p])|all)] [permission (([c][r][x][u][d][e])|all) on types ([(<ANY_TYPE>, all, $SYSCATALOG),]+ (<ANY_TYPE>, all, $SYSCATALOG))]+ |
| Description |
Grants to the role specified the privileges and/or permissions on the types specified. The all type indicates what the permissions should be when for a type and a permission, the type-specific permission is not set. $SYSCATALOG allows for operations on the system catalog like creating a nodetype. |
| Example | grant role basicrole with permission cr on types (basicnode,basicedge) |
| Role Requirements |
privileges: grant permissions: read on the system catalog |
| revoke | |
|---|---|
| Syntax | revoke role <ROLENAME> of [privileges ([g][r][o][d][i][e][p])|all)] [permissions (([c][r][x][u][d][e])|all) on types ([(<ANY_TYPE>, all, $SYSCATALOG) ,]+ (<ANY_TYPE>, all, $SYSCATALOG))]+ |
| Description |
Revokes from the role specified the privileges and/or permissions on the types specified. The all type indicates what the permissions should be when for a type and a permission, the type-specific permission is not set. $SYSCATALOG allows for operations on the system catalog like creating a nodetype. |
| Example | revoke role basicrole of privilege g permission r on types (basicnode,basicedge) |
| Role Requirements |
privileges: revoke permissions: update on the system catalog |
