Notes uses a document-oriented database called NSF (Notes Storage Facility) to manage semi-structured data like rich text and files. The data is stored as documents and views unlike relational databases.
To query NSFs you can use the Java API but they are hard to use especially if you are used to relational databases and standart Java collections. (i.e. most of the collection return types are not iterable so you have to use while to iterate through them :S, also expect a lot of weird exceptions). Here is an example:
Session session = NotesFactory.createSession(host, user, password);
View view = session.getDatabase(DATABASE).getView(VIEW);
ViewEntryCollection allEntries = view.getAllEntries();
ViewEntry entry = allEntries.getFirstEntry();
while (entry != null) {
if (entry.isDocument()) {
Document doc = entry.getDocument();
String no = doc.getItemValueString("No");
}
entry = allEntries.getNextEntry();
}
Using the above code I retrieved a field labeled as "No"
on a notes document which I got from a collection of entries which ultimately form a view named VIEW
, and that view is under the database DATABASE
.
There is also a scripting language called Lotus Domino Formula Language which is also used to query NSFs, you can learn about that here: Lotus Programming Guide and Formula Language.