Posts tagged query
RESTful service based on ADF Business Components, publishing enterprise database contents the REST way
Oct 16th
After three introductory and exploratory articles on RestLet, RESTful Services and the creation of the latter using the former in JDeveloper 11g as well as hooking it up with ADF, it is now time to create a more serious RESTful service. A service that exposes resources from an enterprise business service. One backed by a enterprise database. One that RESTfully provides access to the Human Resource data. In other words: we will publish RESTful services for DEPT and EMP in the SCOTT schema.
It really is simple. The steps are:
- create default ADF BC business objects for the DEPT and EMP tables; this implicitly publishes a Data Control that exposes the data collections
- create a new JSF page; drag the EMP table to this page and drop it as master-detail (table-table); this implicitly creates a PageDefinition that fuels the BindingContainer we need for our services
- create and configure a servlet filter that will take care of initializing the BindingContainer on every request
- create Resource classes for Depts, Dept, Emps and Emp; these classes get the appropriate data binding from the BindingContainer, set the current row for Dept (all resources except Depts) and Emp (only for the Emp resource) and write the XML representation of the desired data
- attach routes for all resources using appropriate URLs (/depts, /depts/{deptno}, , /depts/{deptno}/emps, /depts/{deptno}/emps/{empno}
- deploy the Web Application and access the RESTfule services from a browser or other Http-client
Let’s take it one step at a time:
Read the rest of this entry »
OOW 2008: The Database – really BIG announcement (industry shocking …)
Sep 22nd
All the tell tale signs are there: nervous Oracle staff – looking around them to check out whether no one can read their minds, some intriguing but very unspecific rumors, quiet anticipation building like a low rumble in the distance that preceeds a hurricane, the series of Thursday sessions on one new topic that seems to appear out of thin air – and is not mentioned in the sessions prior to Thursday… The conclusion seems unavoidable: on Wednesday, Larry E. will make a big (let’s make that BIG) announcement regarding the database. One that will shock the industry. And until Wednesday: all lips are sealed.
(apparently, some months ago, Larry Ellison said to analysts: "We are not going to sit on our laurels; we have a major database
innovation that we will announce in September of this year. It is going
to be a very big and important announcement for us so we are not
standing still in database." (see: http://kevinclosson.wordpress.com/2008/06/26/of-gag-orders-excitement-and-new-products/ )
From looking at the conference program, a second conclusion pushes itself to the front: Thursday has at least four sessions on a topic that is not presented on earlier in the week. And that seems to be new. So is that topic then the BIG announcement? Well, the topic is:
Read the rest of this entry »
Not all has to be black and white in SQL Queries: returning match scores instead of only perfect fits
Sep 19th
Recently I sat in on a very interesting presentation on an advanced search and matching engine called Elise. The power of this engine lies in the fact that it does not just query records, returning the set of records that satisfy the search criteria – although it has some pretty advanced search filters and operators, but is able to score all records according to the match criteria. Every record gets a score – which can be zero, meaning that not a single search criteria matched even the smallest way. Higher scores mean better matches on more, or on the most important, criteria.
Many search operations do not necessarily need perfect matches. They need possibly multiple results that are all matches to a certain degree. Google for example returns web pages that meet your search criteria to a certain degree. The most relevant matches are at the top of the search results – or at least that is the intention. Searching for interesting job vacancies, holiday destinations, new real estate, electronic devices, dating partners on a e-dating site, books on Oracle technology are other examples of searches that look for best matches given criteria, not necessarily perfects fits for all criteria (usually they do not exist).
In this article, I will demonstrate a first attempt at building SQL queries that determine match scores that allow applications to list records in order of relevancy (based on the score). The user can specify the search criteria, for example a certain range around numerical and date values or a list of desirable values for a particular attribute and the level of desirability for each value, as well as the relative weight for each of the search criteria.
Read the rest of this entry »


