[ Expand All ] [ Collapse All ] - [ Properties (1) ] [ Methods (16) ] - [ Legend ]

DbStore Class v. V0.9.1

Object
DbStore

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>

AuthorRadoslaw Oldakowski
Properties implemented by DbStore
private method dbConn

Database connection object

Methods implemented by DbStore
private method _createTables_MsAccess

PHP_createTables_MsAccess()

Create tables and indexes for MsAccess database

private method _createTables_mssql

PHP_createTables_mssql()

Create tables and indexes for MSSQL database

private method _createTables_MySql

PHP_createTables_MySql()

Create tables and indexes for MySQL database

private method _createUniqueModelID

PHPinteger _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.

private method _isSetup_MsAccess

PHP_isSetup_MsAccess()

Checks if tables are setup for RAP (MsAccess)

private method _isSetup_MSSQL

PHP_isSetup_MSSQL()

Checks if tables are setup for RAP (MSSQL)

private method _isSetup_MySql

PHP_isSetup_MySql()

Checks if tables are setup for RAP (MySql)

public method close

PHPclose()

Close the DbStore. !!! Warning: If you close the DbStore all active instances of DbModel from this !!! DbStore will lose their database connection !!!

public method createTables

PHPcreateTables(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

constructor DbStore

PHPDbStore(string $dbDriver, string $host, string $dbName, string $user, string $password)

Constructor: Set the database connection with the given parameters.

Arguments

public method getModel

PHPobject 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

public method getNewModel

PHPobject 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

public method isSetup

PHPisSetup(string $databaseType)

Checks if tables are setup for RAP

Arguments

public method listModels

PHParray listModels()

List all DbModels stored in the database.

public method modelExists

PHPboolean modelExists(string $modelURI)

Check if the DbModel with the given modelURI is already stored in the database

Arguments

public method putModel

PHPboolean 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

Generated by PHPEdit - Copyright © 1999-2004 - Sébastien Hordeaux - WaterProof SARL