Represents attribute information. Indexes for class_of and attr_name are created.
Attribute Name |
Data Type |
Description |
---|---|---|
class_of |
_db_class |
Class to which the attribute belongs |
attr_name |
VARCHAR(255) |
Attribute name |
attr_type |
INTEGER |
Type defined for the attribute. 0 for an instance attribute, 1 for a class attribute, and 2 for a shared attribute. |
from_class_of |
_db_class |
If the attribute is inherited, the super class in which the attribute is defined is specified. Otherwise, NULL is specified. |
from_attr_name |
VARCHAR(255) |
Inherited attribute. If an attribute name has changed to resolve a name conflict, the original name define in the super class is specified. Otherwise, NULL is specified. |
def_order |
INTEGER |
Order of attributes in the class. Begins with 0. If the attribute is inherited, the order is the one defined in the super class. For example, if class y inherits attribute a from class x and a was first defined in x, def_order becomes 0. |
data_type |
INTEGER |
Data type of the attribute. One of the values specified in the "Data Types Supported by CUBRID" table below. |
default_value |
VARCHAR(255) |
Default value. Stores as a character string regardless of data types. If there is no default value, NULL. If the default value is NULL, NULL is used. If the data type is an object, ‘volume id | page id | slot id’ is used. If the data type is a set, ‘{element 1, element 2, ... is used. |
domains |
SEQUENCE OF _db_domain |
Domain information of the data type |
is_nullable |
INTEGER |
0 if a not null constraint is configured, and 1 otherwise. |
Data Types Supported by CUBRID
Value |
Meaning |
Value | Meaning |
---|---|---|---|
1 |
INTEGER |
13 |
MONETARY |
2 |
FLOAT |
18 |
SHORT |
3 |
DOUBLE |
20 |
OID |
4 |
STRING |
22 |
NUMERIC |
5 |
OBJECT |
23 |
BIT |
6 |
SET |
24 |
VARBIT |
7 |
MULTISET |
25 |
CHAR |
8 |
SEQUENCE |
26 |
NCHAR |
9 |
ELO |
27 |
VARNCHAR |
10 |
TIME |
31 |
BIGINT |
11 |
TIMESTAMP |
32 |
DATETIME |
12 |
DATE |
33 |
BLOB |
|
|
34 |
CLOB |
Character Sets Supported by CUBRID
Value |
Meaning |
---|---|
0 |
US English - ASCII encoding |
3 |
Latin 1 - ISO 8859 encoding |
4 |
KSC 5601 1990 - EUC encoding |
The following example shows how to retrieve user classes (from_class_of.is_system_class = 0) among the ones owned by user 'PUBLIC'.'
SELECT class_of.class_name, attr_name
FROM _db_attribute
WHERE class_of.owner.name = 'PUBLIC' AND FROM _class_of.is_system_class = 0
ORDER BY 1, def_order;
class_of.class_name attr_name
============================================
'female_event' 'code'
'female_event' 'sports'
'female_event' 'name'
'female_event' 'gender'
'female_event' 'players'