Class: DbStore ---------------------------------------------------------------------------------- DbStore is a persistent store of RDF data using relational database technology. DbStore uses ADOdb Library for PHP V3.60 ( http://php.weblogs.com/ADODB ), which allows to connect to multiple databases in a portable manner. This class also provides methods for creating tables for MsAccess, MySQL, and MS SQL Server. If you want to use other databases, you will have to create tables by yourself according to the abstract database schema described in the API documentation. <BR><BR>History:<UL> <LI>12-06-2004 : improved namespace handling added ( tobias.gauss@web.de )</LI> <LI>10-19-2004 : _isSetup_MSSQL() added. tobias.gauss@web.de </LI> <LI>09-02-2004 : _isSetup_MySql() and _isSetupMsAccess() added. ggrimnes@csd.abdn.ac.uk / tobias.gauss@web.de </LI> <LI>06-17-2003 : First version of this class</LI>
|
PHP | integer _createUniqueModelID() |
---|
============================================================================= **************************** private methods ******************************** =============================================================================
Create a unique ID for the DbModel to be insert into the models table. This method was implemented because some databases do not support auto-increment.
PHP | close() |
---|
Close the DbStore. !!! Warning: If you close the DbStore all active instances of DbModel from this !!! DbStore will lose their database connection !!!
PHP | createTables(string $databaseType) |
---|
Create tables and indexes for the given database type. Currently supported: MsAccess and MySQL. If you want to use other databases, you will have to create tables by yourself according to the abstract <a href="database_schema.html">database schema</a> described in the API documentation.
Arguments
PHP | DbStore(string $dbDriver, string $host, string $dbName, string $user, string $password) |
---|
Constructor: Set the database connection with the given parameters.
Arguments
PHP | object getModel(string $modelURI) |
---|
Create a new instance of DbModel with the given $modelURI and load the corresponding values of modelID and baseURI from the database. Return FALSE if the DbModel does not exist.
Arguments
Return
DbModel
PHP | object getNewModel(string $modelURI, string $baseURI) |
---|
Create a new instance of DbModel with the given $modelURI and insert the DbModel variables into the database. Return FALSE if there is already a model with the given URI.
Arguments
Return
DbModel
PHP | isSetup(string $databaseType) |
---|
Checks if tables are setup for RAP
Arguments
PHP | boolean modelExists(string $modelURI) |
---|
Check if the DbModel with the given modelURI is already stored in the database
Arguments
PHP | boolean putModel(unknown $model, string $modelURI) |
---|
Store a MemModel or another DbModel from a different DbStore in the database. Return FALSE if there is already a model with modelURI matching the modelURI of the given model.
Arguments