Wisetome Articles

JAXB - Handling Lists in Generated Proxy Classes

JAXB has ".. goal of the JAXB project is to develop and evolve the code base for the Reference of JAXB, the Java Architecture for XML Binding".

It is effectively used to convert XML to Java objects and the other way round, based on XSD specification. When the XSDs are run through the JAXB compiles (through command line, plugins or Ant tasks), they generate the source code of classes for all the different elements defined in the XSD.

... JAXB not generating setter method for Lists ...

All the classes have setters and getters for the different members within the class. When one of the complex type in the XSD has a maxOccurs="unbounded", then there is no setter method. This makes it seemingly impossible to construct and load the object so that it can be marshalled (converted) to XML.

MathML - XML Application

Mathematical notations present a tricky problem in terms of storing as file. What do you store about the equations? The content information or the presentation information?

SVG - XML Application

SVG, Scalable Vector Graphics, is an application of XML. SVG is a markup language (based on XML specifications) for describing static and animated vector graphics. It is an open standard drafted by W3C - World Wide Web Consortium, that released the XML specifications.

Feeds - RSS and Atom as XML Application

The feeds as an XML application can be better stated as RSS and Atom, since these terms have been quite ubiquitous.

Feeds let us keep ourselves up to date with a particular site, and the technologies that let us do this are the feed formats RSS or Atom, both applications of XML. These feeds formats follow the XML specifications.

RSS as a syndication or feed format had its debut at around 2002. Atom, is actually a evolution of the format, and seems to have been incepted around mid-2003. As I mentioned earlier both these formats are based on the XML specifications. Then one would ask, what is the difference? Why do we need two formats?

XHTML - XML Application

XHTML, as the name suggests, was derived from HTML and is an application of XML. Hence the name has a ‘X’ prefixed to HTML. W3C recommended XHTML version 1.0 sometime around January 2000. It soon evolved to version 1.1.

XHTML is a stricter markup language compared to the lenient HTML. HTML forgives when you miss a closing tag, or overlap two tag groups. But XHTML must follow the basic rules of XML and has more stringent specifications. The rules of XHTML basically follow that of XML.

XML - Extended Markup Language

XML or eXtended Markup Language, has been a buzz word for quite a long time. And with the proliferation of AJAX, it has seemed to gain more credibelity. More so, it has been pitching in the compatibility front.

XML, as stated above, stands for eXtended Markup Language. It is not a programming language, but a mark-up language. Even HTML has been wrongly considered as a programming language, while like XML it is a mark-up language. The history of XML, seems to be an evolution out of SGML - Standard Generalized Markup Language.

XML, like SGML, is not a markup language in itself, but a specification for defining a markup language. HTML is a markup language, where as SGML is not. SGML tells how to define HTML. Hence, HTML is application of SGML. Similarly, with the advent of XML we have found HTML evolving into XHTML. Here XHTML is a application of XML. Note that XHTML is just a subset of the many applications of XML.

Using a markup language - standardised markup language - one can use any system or application, and still be able to exchange document or more generally data with others who might be using a different system or application. If there is a standard markup for a document, then effectively, one should be able to open it in Open Office Word, Microsoft Word, or may be even my own home-brewed application. You are not bound by a proprietary format.

XML is not a magic wand that will let us all live happily ever after. It would still require different software vendors of a particular league of application to sit down together and work out a XML definition for their data. This has happened to some extent in terms of the browser players - by the introduction of XHTML. There has been a moderate standardisation in vector graphics file format. There are qutie a lot of application that support SVG - Scalable Vector Graphics - as a file format for vector graphics. SVG is a application of XML.

Some of the applications of XML are:

Some of the other things that are worth a look are WSDL and SMDL. WSDL or WebSerivce Description Language is a major key player already even though it has not yet become a W3C recommendation yet. SMDL, Standardised Music Description Language is for marking up musical notation. It is presently a ISO standard.

SQL Primer - Data Definition Tasks

In this part, we will see how one can create simple tables.

In the last parts we have looked into how to view the data in the tables and how to modify them. But for all this to happen, there must be a structure in the database that can hold all the rows. Tables define the structure of how many elements each row must contain.

For example, the table definition of the table emp_data that we have been using would something as follows:

CREATE TABLE emp_data (empid NUMBER(4), empname VARCHAR2(30), dept VARCHAR2(20));

The syntax is something like this:

SQL Primer - Data Modification And Control Tasks

Data Modification Tasks

Again, for sake of illustration, I would assume that the following table exists in the database:

SQL Primer - Data Retrieval Tasks

The data retrieval using SQL is done using a SELECT statement.

For sake of illustrations consider the following imaginary EMP_DATA table:

SQL Primer

SQL is Structure Query Language. It is a way of communicating with the DataBase Management System (DBMS). A DBMS has the stored data in a particular format, and has tools that retrieves and manipulates this data. The SQL communicates to the DBMS on what task requires to be done by it.

There are a lot of different DBMS. The earlier ones started of by storing data in simple flat files with each record stuffed in a line and each column of data separated by comma or other ASCII character. Then, they evolved into what are called as RDBMS - relational DBMS. In these databases, the data is organized into tables that have one or more columns. Each record is stored as a row, with each of the data split into the different columns.

The tabular structure forms the basis for many of the SQL instructions. The SQL instructions may be grouped as: