ArticleslgStudy

engineering

Structured type

Structured type is a engineering topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Structured type rather than just read about it. In short: The SQL:1999 standard introduced a number of object–relational database features into SQL, chiefly among them structured user-defined types, usually called just structured types. These can be defined either in plain SQL with CREATE TYPE but also in Java via SQL/JRT.

Key takeaways

  • Structured type belongs to engineering; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Structured type to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Structured type from memory before moving on to harder problems.

Reference excerpt

The SQL:1999 standard introduced a number of object–relational database features into SQL, chiefly among them structured user-defined types, usually called just structured types. These can be defined either in plain SQL with CREATE TYPE but also in Java via SQL/JRT. SQL structured types allow single inheritance. Structured types are supported to varying degrees in Oracle Database, IBM Db2, PostgreSQL and Microsoft SQL Server, although the latter only allows structured types defined in CLR.

SQL examples

Object structured type In order to define a custom structure type using Oracle Database one could use statements such as these:Such structure type can be then used to create a table that would also hold all columns defined in Person_Type:Custom structure types support inheritance, which means that one can create another type that inherits from previous. NOT FINAL statement must be however included in a base structure type definition in order to allow for creation of any other subtypes.Student_Type then could be used in order to create a Student_Table which will include all columns defined in Person_Type as well. Primary Key and Constraints should be defined during or after creation of table and cannot be defined inside structure type itself.Each custom structure type can also contain other types in order to support more complex structures:

Further reading Jim Melton (2003). Advanced SQL: 1999. Morgan Kaufmann. ISBN 978-1-55860-677-7. Chapters 2-4. Suzanne W. Dietrich; Susan D. Urban (2011). Fundamentals of Object Databases: Object-Oriented and Object-Relational Design. Morgan & Claypool Publishers. ISBN 978-1-60845-476-1. Chapter 3. Catherine Ricardo (2011). Databases Illuminated (2nd ed.). Jones & Bartlett Publishers. ISBN 978-1-4496-0600-8. Chapter 8.

Worked examples

Example 1 — a first encounter with Structured type

Start with the simplest possible case. Write down what Structured type claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In engineering, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Structured type before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Structured type ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Structured type

In research
Structured type appears in engineering research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Structured type in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Structured type is common in secondary-school and first-year university syllabi. It links to neighbouring topics Database stubs, SQL, so understanding it makes those chapters shorter.
In everyday life
Look for Structured type outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Structured type in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Structured type means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Structured type out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Structured type in simple terms?

The SQL:1999 standard introduced a number of object–relational database features into SQL, chiefly among them structured user-defined types, usually called just structured types. These can be defined either in plain SQL with CREATE TYPE but also in Java via SQL/JRT.

Why does Structured type matter?

Because it connects several engineering ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Structured type?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Structured type.

Tags

  • Database stubs
  • SQL

Keep exploring