Ask the Expert

Nested tables in MySQL

I am a novice trying to learn MySQL. I want to create a table with nested tables inside. Can you tell me how?

    Requires Free Membership to View

Nested tables? Like in Oracle? I've never used them, and all I know about them, I found through Google. For example, the article Oracle9i Data Model Extensions describes nested tables, and frankly, the nested table structure seems to be well beyond novice level. The article furthermore adds the following remark:

Nested tables have the advantage of being indexed, and the repeating groups are separated into another table so as not to degrade the performance of full-table scans. Nested tables allow for an infinite number of repeating groups. However, it sometimes takes longer to dereference the OID to access the nested table entries as opposed to ordinary SQL tables join operations. Most Oracle experts see no compelling benefit of using nested tables over traditional table joins.

In any case, I don't believe you can do anything like this in MySQL. Just create normalized tables, and relate them with primary and foreign keys.

For More Information


This was first published in January 2003

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: