# Makumba Specification

[Data Definitions] | [Query Languages] | [JSP tag library: Intro | Listing | Forms] | [Business Logics] | [Summary]

## Query languages

OQL Hibernate HQL | ### OQL The database can be interrogated using the following language ( [] means optional, {} means any number of repetitions). OQL is similar to SQL, a specification can be found at http://www.odmg.org (or check this PDF). Makumba recognizes a subset of OQL at the moment, which it translates to the host SQL when necessary.
    SELECT expression [[AS] label] {, expression [[AS] label] }
    FROM {type [AS] label | label.field{.field} [AS] label }
    [   WHERE expression
        [    GROUP BY expression {,expression}
            [  HAVING expression {,expression}  ]
        ]
    ]
    [ORDER BY expression {,expression} [(ASC|DESC)] ]
Notations like `label.field{.field}` only allow "`field`" to be of pointer type in expression and set type in FROM. In expressions, also `label.ptr{.ptr}.simplefield` is valid. If a label, representing a type, appears alone in an expression, a default field will be added. The default field depends on the type of the label: for set XXX types (sets of foreign objects), the label denotes the pointer to the set member for set int { } and set char { } types, the label denotes the set member (i.e. and int or a string) for all other types, the label denotes the pointer to that object In OQL, NULL values are named 'nil', example
    ms.account_active=1 OR ms.account_active=nil
In the future, the MDDs should use 'nil' instead of null, e.g. nickName = not nil char[20] ### Hibernate Query Language - HQL In the future, makumba will integrate Hibernate. Doing so, you will be able to take full advantage of hibernate's query language HQL.