Working with structured types
In an object-oriented design, we have business objects as entities and each entity has a set of attributes. A structured type is a user-defined special data type, consisting of one or more data types. To represent an entity in DB2, we can use structured types.
A structured type is a user-defined data type consisting of one or more data types defined as its attributes. For example, in a school, a room can be one entity and its attributes can be length, width, and height. In this example, we can create a structured type as room and define its attributes as width, height, and length. Once we have created a structured type, we can use it as a regular built-in data type. DB2 also provides ways to define its behavior. In ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access