David J Murray Dev
~ Learn and Do - Excel and Share ~

More on UniVerse to MySQL

Oct 9, 2007
You're Reading: More on UniVerse to MySQL

A post in Code & MVDBS & MySQL & Techniques & U2 SQL & XML

I have now been able to do simple sql statements from within UniVerse to access data in MySQL.

All good stuff.

As I really want to see how I can use MySQL as a multivalued database, I have decided to cheat a bit. MySQL 5.1 has some xml inbuilt functionality. It is possible to extract and update a value within a xml string stored in a MySQL field.

So, I upgraded my MySQL 4.5 to 5.1. This was a bit of a heart-ache. I eventually removed MySQL completely and installed the new version, as the upgrade repeatedly failed. VMWare was very handy with it’s snapshot feature here.

The two MySQL functions are ExtractValue and UpdateXML. It should be possible to convert a multivalue record into xml, using something as simple as using the field, value and subvalue positions as xml delimiters etc.

Field 1
Field 2
value 1value 2subvalue 1 of value 3

and using XPath (XML Path Language) to identify each element – field, value and subvalue.

To see an article on this new feature – MySQL 5.1’s New XML Functions.

This method is actually similar to the EXTRACT, INSERT and UPDATE dynamic array functions within UniBasic.

About the Author

<a href="https://davidjmurray.dev/colomem/davidjmurray/" target="_self">djm</a>

djm

I have been in the computer/IT industry for over 35 years. After spending half a life-time in highly proprietary database environments, I have succumbed to the WordPress Eco-system and I'm well down the chasm. I am specializing in AWS hosting, Wordpress CMS, Elegant Themes, in particular Divi and Extra themes.

0 Comments

Submit a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Pin It on Pinterest

Share This