Understanding SQL & Java Together: A Guide to SQLJ, JDBC, and Related Technologies

7.4: Structured Types

7.4 Structured Types

As we just said in Section 7.3.2, SQL:1999's structured types normally have some sort of internal structure associated with them. (Of course, that's not an absolute requirement: you could define a structured type with only a single element, although the advantages of such a structured type are not always obvious when compared with defining a distinct type.) We've also said that they have behaviors, or semantics, associated with them. It's time to look much more closely at structured types and see just what they're capable of doing.

7.4.1 Major Characteristics

The two principal characteristics of structured types in SQL:1999 are these: They normally have stored data associated with them, and the operations that can be performed on them are provided by userprovided code. (Although distinct types can have operations on them enhanced by user-provided code, and they certainly have stored data associated with them, they behave much more like SQL's built-in types and thus don't really share with structured types all of the characteristics discussed in this section.) However, there are other characteristics that we'll cover, including a very important one called encapsulation, which we'll discuss in some detail later on, primarily in Section 7.4.3, but will introduce now because of its importance.

In SQL:1999, all structured types are encapsulated, [1] meaning that they are defined in a way that makes it difficult though, as we'll see later in this chapter, not quite impossible for applications to learn how various characteristics are actually implemented. The word...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Mesh Generators
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.