Documentation

Manuals

EyeDB manuals, available in HTML and PDF, provide either introduction documentation or detailled programming documentation on the EyeDB ODL and OQL languages and on the EyeDB C++ and Java bindings.

EyeDB Overview HTML PDF
Getting Started HTML PDF
The Object Definition Language HTML PDF
The Object Query Language HTML PDF
The C++ Binding HTML PDF
The Java Binding HTML PDF
Administration HTML PDF
Installation HTML PDF

Programming Reference Manuals

The C++ Programming Reference Manual is the documentation of the C++ API built using the Doxygen code documentation tool.

The Java Programming Reference Manual is the javadoc documentation of the Java API.

Examples

The EyeDB distribution includes a number of programming examples in C++ and Java with a README explaining how to compile and run these examples.

Release notes

The EyeDB release notes are available here.

Download documentation

You can download the EyeDB formatted documentation on EyeDB download page on sourceforge

Mailing lists

Following is a list of EyeDB mailing lists.

To subscribe to a list, visit the list info page given for each list.

eyedb-announce@lists.sourceforge.net Announcement list for EyeDB.
List info page
List archive
eyedb-general@lists.sourceforge.net General discussion list for EyeDB users.
List info page
List archive
eyedb-devel@lists.sourceforge.net Development discussion list for EyeDB.
List info page
List archive
eyedb-cvs@lists.sourceforge.net

Commit notification list for EyeDB.
List info page
List archive

Features

The key features of the EyeDB OODBMS are:

Standard OODBMS features

  • persistent typed data management
  • client/server model
  • transactional services
  • expressive object model
  • inheritance
  • integrity constraints
  • methods
  • triggers
  • query language
  • application programming interfaces

Language orientation

  • a definition language based on the ODMG Object Definition Language (ODL)
  • a query language based on the ODMG Object Query Language (OQL)
  • a C++ binding
  • a Java binding

Genericity and orthogonality of the object model

  • inspired by the SmallTalk, LOOPS, Java and ObjVlisp object models (i.e. every class derives from the object class and can be manipulated as an object)
  • type polymorphism
  • binary relationships
  • literal and object types
  • transient and persistent objects
  • method and trigger overloading
  • template-based collections such as set, bag and array
  • multi-dimensional and variable size dimensional arrays

Support for large databases

  • databases up to several Tb (tera-bytes)

Efficiency

  • database objects are directly mapped within the virtual memory space
  • object memory copy are reduced to the minimum
  • caching policy is implemented

Scalability

  • programs are able to deal with hundred of millions of objects without loss of performance

Query data using the Java binding and OQL

We show in this section how to query objects as defined in the ODL schema using the Java language binding and OQL.

static void query_students(org.eyedb.Database db)
   throws org.eyedb.Exception {
    org.eyedb.OQL oql = new org.eyedb.OQL(db, "select Student");
    org.eyedb.ObjectArray obj_arr = new org.eyedb.ObjectArray();
    oql.execute(obj_arr);
    int count = obj_arr.getCount();
    for (int n = 0; n < count; n++) {
        Student s = (Student)obj_arr.getObject(n);
        if (s != null) {
            System.out.println(s.getFirstname() + " " + s.getLastname());
        }
    }
}

static void query_courses(org.eyedb.Database db,
                          String firstname, String lastname)
    throws org.eyedb.Exception
{
    org.eyedb.OQL oql = new org.eyedb.OQL
        (db, "select c from Course c where " +
         "c.teacher.lastname = \"" + lastname + "\" && " +
         "c.teacher.firstname = \"" + firstname + "\"");

    org.eyedb.ObjectArray obj_arr = new org.eyedb.ObjectArray();
    oql.execute(obj_arr);
    int count = obj_arr.getCount();
    for (int n = 0; n < count; n++) {
        Course c = (Course)obj_arr.getObject(n);
        if (c != null) {
            System.out.println(firstname + " " + lastname + ": " +
                               c.getTitle() + " " + c.getDescription());
        }
    }
}

View the whole Java file

Create data using the Java binding

We show in this section how to create objects as defined in the ODL schema using the Java language binding.

static void create(student.Database db) throws org.eyedb.Exception {
    Course perl = new Course(db);
    perl.setTitle("Perl");
    perl.setDescription("Perl Language");

    Course python = new Course(db);
    python.setTitle("Python");
    python.setDescription("Python Language");

    Course eyedb_ = new Course(db);
    eyedb_.setTitle("EyeDB");
    eyedb_.setDescription("EyeDB OODBMS");

    Student henri_muller = new Student(db);
    henri_muller.setFirstname("Henri");
    henri_muller.setLastname("Muller");
    henri_muller.setBeginYear((short)2003);

    Student jacques_martin = new Student(db);
    jacques_martin.setFirstname("Jacques");
    jacques_martin.setLastname("Martin");
    jacques_martin.setBeginYear((short)2003);

    Student mary_kiss = new Student(db);
    mary_kiss.setFirstname("Mary");
    mary_kiss.setLastname("Kiss");
    mary_kiss.setBeginYear((short)2003);

    Teacher max_first = new Teacher(db);
    max_first.setFirstname("Max");
    max_first.setLastname("First");

    Teacher georges_shorter = new Teacher(db);
    georges_shorter.setFirstname("Georges");
    georges_shorter.setLastname("Shorter");

    perl.setTeacher(max_first);
    python.setTeacher(max_first);
    eyedb_.setTeacher(georges_shorter);

    henri_muller.addToCoursesColl(perl);
    henri_muller.addToCoursesColl(eyedb_);

    jacques_martin.addToCoursesColl(python);
    jacques_martin.addToCoursesColl(perl);
    jacques_martin.addToCoursesColl(eyedb_);

    mary_kiss.addToCoursesColl(python);

    // storing objects to database
    henri_muller.store(org.eyedb.RecMode.FullRecurs);
    jacques_martin.store(org.eyedb.RecMode.FullRecurs);
    mary_kiss.store(org.eyedb.RecMode.FullRecurs);
}

View the whole Java file

Query data using the C++ binding and OQL

We show in this section how to query objects as defined in the ODL schema using the C++ language binding and OQL.

static void query_students(eyedb::Database *db)
{
  eyedb::OQL oql(db, "select Student");
  eyedb::ObjectArray obj_arr;
  oql.execute(obj_arr);
  unsigned int count = obj_arr.getCount();
  for (int n = 0; n < count; n++) {
    Student *s = Student_c(obj_arr[n]);
    if (s) {
      std::cout << s->getFirstname() << ” ” << s->getLastname() << std::endl;
    }
  }
}

static void query_courses(eyedb::Database *db,
			  const char *firstname, const char *lastname)
{
  eyedb::OQL oql(db, “select c from Course c where ”
		 “c.teacher.lastname = \”%s\” && ”
		 “c.teacher.firstname = \”%s\”", lastname, firstname);
  eyedb::ObjectArray obj_arr;
  oql.execute(obj_arr);
  unsigned int count = obj_arr.getCount();
  for (int n = 0; n < count; n++) {
    Course *c = Course_c(obj_arr[n]);
    if (c) {
      std::cout << firstname << ” ” << lastname << “: ” <<
	c->getTitle() << ” ” << c->getDescription() << std::endl;
    }
  }
}

View the whole C++ file

Create data using the C++ binding

We show in this section how to create objects as defined in the ODL schema using the C++ language binding.

static void create(eyedb::Database *db)
{
  Course *perl = new Course(db);
  perl->setTitle("Perl");
  perl->setDescription("Perl Language");

  Course *python = new Course(db);
  python->setTitle("Python");
  python->setDescription("Python Language");

  Course *eyedb_ = new Course(db);
  eyedb_->setTitle("EyeDB");
  eyedb_->setDescription("EyeDB OODBMS");

  Student *henri_muller = new Student(db);
  henri_muller->setFirstname("Henri");
  henri_muller->setLastname("Muller");
  henri_muller->setBeginYear(2003);

  Student *jacques_martin = new Student(db);
  jacques_martin->setFirstname("Jacques");
  jacques_martin->setLastname("Martin");
  jacques_martin->setBeginYear(2003);

  Student *mary_kiss = new Student(db);
  mary_kiss->setFirstname("Mary");
  mary_kiss->setLastname("Kiss");
  mary_kiss->setBeginYear(2003);

  Teacher *max_first = new Teacher(db);
  max_first->setFirstname("Max");
  max_first->setLastname("First");

  Teacher *georges_shorter = new Teacher(db);
  georges_shorter->setFirstname("Georges");
  georges_shorter->setLastname("Shorter");

  perl->setTeacher(max_first);
  python->setTeacher(max_first);
  eyedb_->setTeacher(georges_shorter);

  henri_muller->addToCoursesColl(perl);
  henri_muller->addToCoursesColl(eyedb_);

  jacques_martin->addToCoursesColl(python);
  jacques_martin->addToCoursesColl(perl);
  jacques_martin->addToCoursesColl(eyedb_);

  mary_kiss->addToCoursesColl(python);

  // storing objects to database
  henri_muller->store(eyedb::RecMode::FullRecurs);
  jacques_martin->store(eyedb::RecMode::FullRecurs);
  mary_kiss->store(eyedb::RecMode::FullRecurs);
}

View the whole C++ source code

Create data using OQL

We show in this section how to create the objects and relationships between these objects as defined in the ODL schema using the Object Query Language (OQL). The EyeDB OQL is a superset of the standard ODMG 3 OQL.

To enter the following OQL statement, we can use the eyedboql interactive tool included in the distribution.

Creating a few courses

We begin by creating a few courses:

oodbms := new Course(title : "OODBMS",
		     description : "Object database management systems");

rdbms := new Course(title : "RDBMS",
		    description : "Relational database management systems");

uml := new Course(title : "UML",
		  description : "Unified Modeling Language");

cplus := new Course(title : "C++",
		    description : "C++ Language");

java := new Course(title : "Java",
		   description : "Java Language");

php := new Course(title : "PHP",
		  description : "PHP Language");

A few comments:

  • The new OQL operator allows us to create a persistent object of the given type
  • To construct an object, we give a list of pairs of attribute name and attributes value as shown previously, for instance: title: "Java", description : "Java Language". If an attribute value is not given during construction, its value is assigned to the NULL value (not initialised)
  • The OQL variables oodbms, rdbms and so on are not persistent: they are assigned to persistent objects, but there scope is limitated to the current OQL session

Creating a few students

We can now create a few students:

john_harris := new Student(firstname : "John", lastname : "Harris",
			   begin_year : 2002);

suzan_mulder := new Student(firstname : "Suzan", lastname : "Mulder",
			    begin_year : 2002);

francois_martin := new Student(firstname : "Francois", lastname : "Martin",
			       begin_year : 2001);

Note that as a Student inherits from a Person, it includes the firstname and lastname attributes.

Creating two teachers

We create now two teachers:

eric_viara := new Teacher(firstname : "Eric", lastname : "Viara");

francois_dechelle := new Teacher(firstname : "Francois",
                                 lastname : "Dechelle");

Assigning the courses to the teachers

We deal now with the relationship “in charge” between Course and Teacher:

oodbms.teacher := eric_viara;
rdbms.teacher := eric_viara;
uml.teacher := francois_dechelle;
cplus.teacher := eric_viara;
java.teacher := francois_dechelle;
php.teacher := francois_dechelle;

Important notices:

  • When we assigned a teacher to a given course (for instance oodbms.teacher := eric_viara), the inverse attribute courses in the Teacher class is automatically updated (the course is added to the courses collections of the teacher eric_viara) because of the inverse directive
  • When we change the teacher of a given course (for instance oodbms.teacher := francois_dechelle), the inverse attribute courses of eric_viara is updated (the course is suppressed from its courses collection) and the inverse attribute courses of francois_dechelle is also updated (the course is added to the courses collections of the teacher francois_dechelle)

Assigning the courses to the students

We deal now with the relationship “registered to” between Student and Course:

add oodbms to john_harris.courses;
add rdbms to john_harris.courses;

add oodbms to suzan_mulder.courses;
add uml to suzan_mulder.courses;
add java to suzan_mulder.courses;

add oodbms to francois_martin.courses;
add rdbms to francois_martin.courses;
add uml to francois_martin.courses;
add java to francois_martin.courses;
add cplus to francois_martin.courses;
add php to francois_martin.courses;

Important notices:

  • When we add a course to a given student (for instance add oodbms to suzan_mulder.courses), the inverse attribute students in the Course class is automatically updated (the student is added to the students collections of the course oodbms) because of the inverse directive
  • When we suppress a course of a given student (for instance suppress oodbms from suzan_mulder.courses), the inverse attribute students of oodbms is updated (the student is suppressed from its students collection)

Define a schema using ODL

We want to modelize a very simple university environment:

  • A course is caracterized by a title and a description
  • A student is caracterized by a firstname, a lastname and a registration year
  • A teacher is caracterized by a firstname and a lastname
  • A teacher is in charge of one or several courses
  • A student is registered to one or several courses

The following schema implements the previous model by introducing:

  • The given attributes: firstname, lastname, begin_year, title, description
  • A superclass Person which factorizes the firstname and lastname attributes of students and teachers
  • Relationships between:
    • Student and registered courses (called “registered to”)
    • Teacher and in charge courses (called “in charge”)

Here is the Object Definition Language (ODL) implementation of the previous model:

class Person {
  attribute string firstname;
  attribute string lastname;
};

class Student extends Person {
  attribute short begin_year;
  relationship set<Course *> courses inverse students;
};

class Course {
  attribute string title;
  attribute string description;
  relationship set<Student *> students inverse courses;
  relationship Teacher *teacher inverse courses;
};

class Teacher extends Person {
  relationship set<Course *> courses inverse teacher;
};

View the ODL file.

A few comments:

  • The inheritance between the classes Student and Person and between Teacher and Person is indicated by the extends keyword.
  • The set<Course *> courses attribute in the Student class and the set<Student *> students attribute in
    the Course class denote the relationship between the Student and its registered courses
  • The set<Course *> courses attribute in the Teacher class and the Teacher *teacher attribute in the
    Course class denotes the relationship between the Teacher and its in charge Courses
  • The inverse directives on the relationship attributes are there to indicate to EyeDB to maintain the referential integrity of the relationships

To enter this schema in a database, we must use the eyedbodl tool which checks the syntax and semantics of the schema and in case of succes submit the given schema to the given database.

Query data using OQL

We show in this section how to query objects as defined in the ODL schema using the Object Query Language (OQL).

Looking for persons

select Student;
select Teacher;
select Person;

select Student.firstname = "Francois";
select firstname + " " + lastname from Student where firstname = "Francois";

select Teacher.firstname = "Francois";
select Person.firstname = "Francois";

Looking for courses

select description from Course where title = "OODBMS";
select * from Course where title = "OODBMS";

Looking for Teacher teaching a given course

select x.teacher.firstname + " " + x.teacher.lastname from Course x
       where x.title = "OODBMS";

select (Course.title = "OODBMS").teacher.lastname;

Looking for courses teached by a given teacher

// Using Course class:
select title from Course where teacher.lastname = "Dechelle";
// Using Teacher class:
select x.courses[?].title from Teacher x where x.lastname = “Dechelle”;

Looking for courses learnt by a given student

// Using Student class:
select s.courses[?].title from Student s where s.lastname = “Mulder”;

select s.courses[?].title from Student s where s.lastname = “Mulder”
                                               and s.firstname = “Suzan”;

// Using Course class:
select c.title from Course c where c.students[?].lastname = “Mulder”;

select c.title from Course c where c.students[?] =
   (select one s from Student s where s.lastname = “Mulder” and
                                      s.firstname = “Suzan”);

View the whole OQL file

Articles

EyeDB Papers

  • The EyeDB OODBMS. E. Viara, E. Barillot & G. Vaysseix; International Database Engineering and Applications Symposium 1999, Montreal, August 1999, IEEE publications, pp 390-402, 1999.
  • Distributing CORBA Views From an OODBMS. E. Viara, E. Barillot & G. Vaysseix;International Database Engineering and Applications Symposium 2002, Edmonton, July 2002, IEEE publications, pp 116-129, 2002.

Projects using EyeDB

  • The IDB database system and its use in the human genome project: HUGEMAP.E. Viara, S. Pook, B. Lacroix, M. Tissot, L. Atlan, A. Cohen-Akenine,
    G. Vaysseix & E. Barillot; Interconnection of Molecular Biology Databases, Stanford, California, 1994.
  • RHmap, a radiation hybrid database for heavy user access and a test case for comparing relational and object oriented technologies.P. Rodriguez-Tomé, G. Vaysseix, E. Viara & E. Barillot;Interconnection of Molecular Biology Databases, Cambridge, United Kingdom, 1995.
  • Solutions to the interoperation of biological databases.E. Barillot, G. Vaysseix, F. Achard, E. Viara, T. Flores & P. Rodriguez-Tomé; Human Genome Meeting, Heidelberg, Germany, 1996.
  • RHYME: An Implementation of Database Interoperation in Molecular Biology based on distributed and architecture-independant techniques.E. Barillot, F. Guyon, E. Viara & G. Vaysseix; Human Genome Meeting, Toronto, Canada, 1997.
  • HuGeMap: a distributed and integrated Human Genome Map database.E. Barillot, F. Guyon, C. Cussat-Blanc, E. Viara & G. Vaysseix;Nucleic Acids Research, Vol. 26, pp 106-107, 1998.
  • Virgil: a database of rich links between GDB and Genbank.F. Achard & E. Barillot;Nucleic Acids Research, Vol. 26, pp 100-101, 1998.
  • The new Virgil database: a service of rich links.F. Achard, C. Cussat-Blanc, E. Viara & E. Barillot;BIOINFORMATICS, Vol. 14, pp 342-348, 1998.
  • A standard representation for links between genome objectsF. Achard, C. Cussat-Blanc, E. Viara, G. Vaysseix, P. Dessen and E. Barillot;Human Genome Meeting, Turin, Italy, 1998.
  • Zomit: biological data visualisation and browsing.S. Pook, G. Vaysseix & E. Barillot; BIOINFORMATICS, Vol. 14 No. 9, pp 807-814, 1998.
  • Virgil: a databank of links between GDB and Genbank.F. Achard & E. Barillot;BIOINFORMATICS, Vol. 14, 342-348, 1998.
  • Distributing and visualising biological objects at Infobiogen.E. Viara, S. Pook, F. Guyon, C. Cussat-Blanc, G. Vaysseix & E. Barillot>;Objects In Bioinformatics, Hinxton, 1998.
  • The HuGeMap database: Interconnection and Visualisation of Human Genome Maps.E. Barillot, S. Pook, F. Guyon, C. Cussat-Blanc, E. Viara & G. Vaysseix; Nucleic Acids Research, in press, 1999.
  • Virgil database for rich links (1999 update).F. Achard, G. Vaysseix, P. Dessen & E. Barillot; Nucleic Acids Research, in press, 1999.
  • The Genetpig database: a tool for comparative mapping in pig (Sus scrofa).E. Karsenty, E. Barillot, G. Tosser-Klopp, Y. Lahbib-Mansais, F. Hatey, S. Cirera, M. Fredholm, B. Chowdhary, C. B. Jørgensen, M. Sawera, K. Wimmers, S. Ponsuksili, R. Davoli, L. Fontanesi, S. Braglia, P. Zambonelli, D. Bigi, S. Neuenschwander & J. Gellin; Nucleic Acids Research 2003 Jan 1;31(1):138-41.

Quick tour

This page provide a very quick tour of the EyeDB OODBMS by showing some of its capabilities.

We introduce here the ways to:

History

A first prototype, IDB, was developed at Genethon laboratories for the Genome View project.

The Genome View project was initiated in 1992 to store and facilitate access to the human genome data produced at Genethon (physical and genetic maps).

The Genome View environment includes an integrated database of the human genome, HUGEMAP, a graphical interface, WWW and mail servers, and a C API.

Since April 1994, a new version has being developed at SYSRA with partial fundings from the ANVAR (Agence Nationale pour la Valorisation de la Recherche), the Conseil Regional d’Ile de France and the European Contract EC BIO4-CT96-0346.

This second version of EyeDB, is a complete rewrite.

Since 1994, EyeDB has been used in a lot of bioinformatics projects in collaboration with the CRI Infobiogen and european projects with the EBI.

Here is the list of the publications related to EyeDB.

Home

EyeDB is an Object Oriented Database Management System (OODBMS) based on the ODMG 3 specification, developed and supported by the French company SYSRA.

EyeDB provides an advanced object model (inheritance, collections, arrays, methods, triggers, constraints, reflexivity), an object definition language based on ODMG ODL, an object query and manipulation language based on ODMG OQL and programming interfaces for C++ and Java.

EyeDB is free software, distributed under the terms of the GNU Lesser General Public License.