Sybase ASE 15 DB, Tools Hold SQL-XML Vision

The latest upgrade to Sybase' enterprise database ASE 15, announced this week, does a great deal more than offer a faster, more scalable database. Under the covers, Sybase engineers are using ASE 15 and its tools to lay a rich foundation to make it easier for today's devs and DBAs to co-mingle XML and SQL data.

Tags: XML, ASE, SQL, Database, Sybase, SQL/XML, Message Bus,

The latest upgrade to Sybase' enterprise database, ASE 15, announced this week, does a great deal more than offer a faster, more scalable database.

Under the covers, Sybase engineers are laying a rich groundwork for making it easier for devs and DBAs to co-mingle their XML and SQL data.

Sybase ASE 15 pushes the envelop on SQL-to-XML co-mingling that Sybase started a year ago with ASE 12.5, which was Sybase' the first version to support native XML processing and management from within the SQL database. [Earlier, Sybase supported XML functionality through JVMs (Java Virtual Machines)]

"Our view is generally, as to storage and management, we need to be able to take XML content that people are pumping in, and be able to share in relational structures and store them in relational tables. Others want to generate a lot of XML content from the database" Sybase senior product manager Naveen Puttagunta told IDN. "So, we provide SQLX and XPath functions for those that want to store XML documents natively."

Sybase' SQL-to-XML sharing/intermingling is very much an issue with customers. To fill that need, ASE provides a "duality between SQL and XML," he said. The duality approach of ASE 15 provides a wide range of benefits across the entire lifecycle of design, build and use of hybrid SQL-XML datastore - for developers, designers and end users.

Among these ASE 15 SQL/XML duality features are:

  • Generating -- generate XML results; and easy SQL-to-XML transformation
  • Mapping - XML/SQL mapping to shred XML into relational data
  • Storage/Retrieval -- store and retrieve XML data "as is" (without requiring transformation), and/or store and retrieve XML as relational data (rows/columns)
  • Indexing - fast, automated XML indexes for high query performance, better queries
  • Querying -- SQL/XML interchangeability at language and storage level; native XPATH and SQLX support; ability to support "granulated results" through queries that returns documents, document fragments, elements, etc.
  • Data Integration/Sharing - ability to expose ASE-resident data directly as a web services and integrate that data from/with external web services, ASE data can also directly integrate data to/from a message bus

  • Notably, Sybase also brings a level of state or transactionality protection to ASE 15.

    "To crystallize what's behind these features, you can say in ASE 15, we can let the database actually begin a transaction, such as do an insert of data in a table. And, in that same transaction, the database will send a message to the message bus. Anytime the insert fails or your ability to talk to the message bus is not successful, you can actually rollback the transaction, not just the data inset portion. That is the level of transactional integrity in ASE 15 for web services activity," Sybase senior manager of R&D Kannan Ananthanarayanan told IDN.

    Inside Sybase ASE 15's SQL/XML Duality
    So, why provide such SQL/XML duality? "Even with the growth in interest in XML and XQuery, t There is a slight biased to till do things in a SQL way, and so we provide capabilities to combine SQL and XML," Puttagunta said.

    Our users tend to relate well, if conveyed in the form of SQL. Thrust of engineering went into making sure that any XML functionality we provide nicely plays into the traditional SQL sector. So, what you can do is write a SQL comment (select) and put in the XML constructs within the traditional select command and that will let you process either SQL or SQL/XML data together," Puttagunta said.

    When it comes to whether Sybase sees more demand for putting XML in, or getting XML out of databases, execs put it simply: "We are seeing more demand for being able to take SQL content and publish that as XML," Puttagunta said. Drilling down a bit on that, he added: "This is for 3 different interfaces. Stand-alone apps trying to get XML data out of ASE, so it doesn't have to do XML crunching at the application level. Support for messaging functionality, a lot of users taking SQL data and converting into XML data and publish directly into the message bus, and then publish as web services."

    But that is not to say that ASE 15 hasn't added features to help ensure XML data input complies with existing doc/data policies. "One of the things particular we see more and more is that users are looking at the XML schema associated with the XML documents," Puttagunta said. This led to Sybase implementing support for full-fledged XML schema in ASE 15. :This will ensure that any XML documents put into the database will comply with their schema, and if the schema does not comply with company schema policies then it will be flagged and ASE won't allow that to be put into the database," he added.

    Giving DBAs, Devs a Familiar Way
    To Work with SQL/XML Data

    Even with this SQL/XML duality, Sybase ASE 15 continues to default to allow current devs and DBAs to continue to work with the database with the SQL tools and calls they are familiar with.

    "We have made sure the power of the SQL engine is leveraged in our XML processing as much as we can. In SQL, you can store in Btrieve, and so we have extended the concept of "indexing" into the XML world. We provide the notion of 'indexing' on XML data, and that makes the management of those indexes essentially the same as in SQL," Sybase's Ananthanarayanan said.

    As a use case, points to who want to manipulate SQL and XML data together. "People have XML stored as a document, and they want to take a portion of the XML fragment, and then join that fragment with some other SQL data stored in a table in the database. There, you will absolutely have to have XML and SQL constructs to blend in, and that has been our engineering thrust," xx said.

    That ASE 15 "indexing" feature provides a way for SQL DBAs to gain a structured view of the XML unstructured data. "Also, the indexing allows you to have great querying capabilities on the XML. That's one of the other reasons we do it," xx added.

    And, Puttagunta added, because the abstraction is in the database, and not simply in the tool, other developers, whether Java or Perl, can also benefit. "The moment the document enters the database, the DB automatically indexes every attributes. This lets the DBA not to pre-select what tags or attributes to index on. This gives the developer functionality without the DBA needing to know."