
public interface Database extends HierarchicalResult
| Modifier and Type | Field and Description | 
|---|---|
static OptionID | 
DATABASE_CONNECTION_ID
Option to specify the data source for the database. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
accumulateDataStoreEvents()
Collects all insertion, deletion and update events until
  
flushDataStoreEvents() is called. | 
void | 
addDataStoreListener(DataStoreListener l)
Adds a listener for the  
DataStoreEvent posted after the
 content of the database changes. | 
void | 
addIndex(Index index)
Add a new index to the database. 
 | 
void | 
flushDataStoreEvents()
Fires all collected insertion, deletion and update events as one
 DataStoreEvent, i.e. notifies all registered DataStoreListener how the
 content of the database has been changed since
  
accumulateDataStoreEvents() has been called. | 
SingleObjectBundle | 
getBundle(DBIDRef id)
Returns the DatabaseObject represented by the specified id. 
 | 
<O,D extends Distance<D>>  | 
getDistanceQuery(Relation<O> relation,
                DistanceFunction<? super O,D> distanceFunction,
                Object... hints)
Get the distance query for a particular distance function. 
 | 
Collection<Index> | 
getIndexes()
Collection of known indexes 
 | 
<O,D extends Distance<D>>  | 
getKNNQuery(DistanceQuery<O,D> distanceQuery,
           Object... hints)
Get a KNN query object for the given distance query. 
 | 
<O,D extends Distance<D>>  | 
getRangeQuery(DistanceQuery<O,D> distanceQuery,
             Object... hints)
Get a range query object for the given distance query. 
 | 
<O> Relation<O> | 
getRelation(TypeInformation restriction,
           Object... hints)
Get an object representation. 
 | 
Collection<Relation<?>> | 
getRelations()
Get all relations of a database. 
 | 
<O,D extends Distance<D>>  | 
getRKNNQuery(DistanceQuery<O,D> distanceQuery,
            Object... hints)
Get a rKNN query object for the given distance query. 
 | 
<O,D extends Distance<D>>  | 
getSimilarityQuery(Relation<O> relation,
                  SimilarityFunction<? super O,D> similarityFunction,
                  Object... hints)
Get the similarity query for a particular similarity function. 
 | 
void | 
initialize()
Initialize the database, for example by loading the input data. 
 | 
void | 
removeDataStoreListener(DataStoreListener l)
Removes a listener previously added with
  
addDataStoreListener(DataStoreListener). | 
void | 
removeIndex(Index index)
Remove a particular index 
 | 
getHierarchy, setHierarchygetLongName, getShortNamestatic final OptionID DATABASE_CONNECTION_ID
 -dbc
 
void initialize()
Collection<Relation<?>> getRelations()
<O> Relation<O> getRelation(TypeInformation restriction, Object... hints) throws NoSupportedDataTypeException
O - Object typerestriction - Type restrictionhints - Optimizer hintsNoSupportedDataTypeException<O,D extends Distance<D>> DistanceQuery<O,D> getDistanceQuery(Relation<O> relation, DistanceFunction<? super O,D> distanceFunction, Object... hints)
O - Object typeD - Distance result typerelation - Relation useddistanceFunction - Distance function to usehints - Optimizer hints<O,D extends Distance<D>> SimilarityQuery<O,D> getSimilarityQuery(Relation<O> relation, SimilarityFunction<? super O,D> similarityFunction, Object... hints)
O - Object typeD - Similarity result typerelation - Relation usedsimilarityFunction - Similarity function to usehints - Optimizer hints<O,D extends Distance<D>> KNNQuery<O,D> getKNNQuery(DistanceQuery<O,D> distanceQuery, Object... hints)
DatabaseQuery.HINT_BULK bulk
 query neededO - Object typeD - Distance typedistanceQuery - Distance queryhints - Optimizer hints<O,D extends Distance<D>> RangeQuery<O,D> getRangeQuery(DistanceQuery<O,D> distanceQuery, Object... hints)
DatabaseQuery.HINT_BULK bulk
 query neededO - Object typeD - Distance typedistanceQuery - Distance queryhints - Optimizer hints<O,D extends Distance<D>> RKNNQuery<O,D> getRKNNQuery(DistanceQuery<O,D> distanceQuery, Object... hints)
DatabaseQuery.HINT_BULK bulk
 query neededO - Object typeD - Distance typedistanceQuery - Distance queryhints - Optimizer hintsSingleObjectBundle getBundle(DBIDRef id)
id - the id of the Object to be obtained from the Databasevoid addIndex(Index index)
index - Index to addCollection<Index> getIndexes()
void removeIndex(Index index)
index - Index to removevoid addDataStoreListener(DataStoreListener l)
DataStoreEvent posted after the
 content of the database changes.l - the listener to addremoveDataStoreListener(DataStoreListener), 
DataStoreListener, 
DataStoreEventvoid removeDataStoreListener(DataStoreListener l)
addDataStoreListener(DataStoreListener).l - the listener to removeaddDataStoreListener(DataStoreListener), 
DataStoreListener, 
DataStoreEventvoid accumulateDataStoreEvents()
flushDataStoreEvents() is called.DataStoreEventvoid flushDataStoreEvents()
accumulateDataStoreEvents() has been called.DataStoreListener, 
DataStoreEvent