Source for file DbStore.php

Documentation is available at DbStore.php

  1. <?php
  2.  
  3. // ----------------------------------------------------------------------------------
  4. // Class: DbStore
  5. // ----------------------------------------------------------------------------------
  6.  
  7. /**
  8. * DbStore is a persistent store of RDF data using relational database technology.
  9. * DbStore uses ADOdb Library for PHP V3.60 (http://php.weblogs.com/ADODB),
  10. * which allows to connect to multiple databases in a portable manner.
  11. * This class also provides methods for creating tables for MsAccess, MySQL, and MS SQL Server.
  12. * If you want to use other databases, you will have to create tables by yourself
  13. * according to the abstract database schema described in the API documentation.
  14. *
  15. * <BR><BR>History:<UL>
  16. * <LI>05-30-2005 : added dataset support
  17. * <LI>12-06-2004 : improved namespace handling added (tobias.gauss@web.de)</LI>
  18. * <LI>10-19-2004 : _isSetup_MSSQL() added. tobias.gauss@web.de</LI>
  19. * <LI>09-02-2004 : _isSetup_MySql() and _isSetupMsAccess() added. ggrimnes@csd.abdn.ac.uk/ tobias.gauss@web.de</LI>
  20. * <LI>06-17-2003 : First version of this class</LI>
  21. *
  22. *
  23. * @version V0.9.3
  24. * @author Radoslaw Oldakowski <radol@gmx.de>
  25. * @author Daniel Westphal (http://www.d-westphal.de)
  26. *
  27. * @package model
  28. * @access public
  29. */
  30.  
  31.  
  32. class DbStore extends Object{
  33.  
  34. /**
  35. * Database connection object
  36. *
  37. * @var object ADOConnection
  38. * @access private
  39. */
  40. var $dbConn;
  41.  
  42.  
  43. /**
  44. * Constructor:
  45. * Set the database connection with the given parameters.
  46. *
  47. * @param string $dbDriver
  48. * @param string $host
  49. * @param string $dbName
  50. * @param string $user
  51. * @param string $password
  52. * @access public
  53. */
  54. function DbStore ($dbDriver=ADODB_DB_DRIVER, $host=ADODB_DB_HOST, $dbName=ADODB_DB_NAME,
  55. $user=ADODB_DB_USER, $password=ADODB_DB_PASSWORD) {
  56. // include DBase Package
  57. require_once(RDFAPI_INCLUDE_DIR.PACKAGE_DBASE);
  58. // create a new connection object
  59. $this->dbConn =& ADONewConnection($dbDriver);
  60. // connect to database
  61. $this->dbConn->connect($host, $user, $password, $dbName);
  62. // optimized for speed
  63. $this->dbConn->setFetchMode(ADODB_FETCH_NUM);
  64. $ADODB_COUNTRECS = FALSE;
  65. //activate the ADOdb DEBUG mode
  66. if (ADODB_DEBUG_MODE ==''1'')
  67. $this->dbConn->debug = TRUE;
  68. }
  69.  
  70.  
  71. /**
  72. * Create tables and indexes for the given database type.
  73. * Currently supported: MsAccess and MySQL.
  74. * If you want to use other databases, you will have to create tables by yourself
  75. * according to the abstract <a href="database_schema.html">database schema</a>
  76. * described in the API documentation.
  77. *
  78. * @param string $databaseType
  79. * @throws PhpError
  80. * @access public
  81. */
  82. function createTables($databaseType) {
  83.  
  84. if (!strcasecmp($databaseType, ''MsAccess''))
  85. $this->_createTables_MsAccess();
  86. elseif (!strcasecmp($databaseType, ''MySQL''))
  87. $this->_createTables_MySql();
  88. elseif (!strcasecmp($databaseType, ''MSSQL''))
  89. $this->_createTables_mssql();
  90. else {
  91. $errmsg = RDFAPI_ERROR . "(class: DbStore; method: createTables(''$databaseType'')):
  92. Currently only MsAcces, MySQL and MSSQL supported.";
  93. trigger_error($errmsg, E_USER_ERROR);
  94. }
  95. }
  96.  
  97. /**
  98. * List all DbModels stored in the database.
  99. *
  100. * @return array
  101. * @throws SqlError
  102. * @access public
  103. */
  104. function listModels() {
  105.  
  106. $recordSet =& $this->dbConn->execute("SELECT modelURI, baseURI
  107. FROM models");
  108. if (!$recordSet)
  109. echo $this->dbConn->errorMsg();
  110. else {
  111. $models = array();
  112. $i=0;
  113. while (!$recordSet->EOF) {
  114.  
  115. $models[$i][''modelURI''] = $recordSet->fields[0];
  116. $models[$i][''baseURI''] = $recordSet->fields[1];
  117. ++$i;
  118. $recordSet->moveNext();
  119. }
  120. return $models;
  121. }
  122. }
  123. /**
  124. * Check if the DbModel with the given modelURI is already stored in the database
  125. *
  126. * @param string $modelURI
  127. * @return boolean
  128. * @throws SqlError
  129. * @access public
  130. */
  131. function modelExists($modelURI) {
  132.  
  133. $res =& $this->dbConn->execute("SELECT COUNT(*) FROM models
  134. WHERE modelURI = ''" .$modelURI ."''");
  135. if (!$res)
  136. echo $this->dbConn->errorMsg();
  137. else {
  138. if (!$res->fields[0])
  139. return FALSE;
  140. return TRUE;
  141. }
  142. }
  143.  
  144.  
  145. /**
  146. * Create a new instance of DbModel with the given $modelURI and
  147. * load the corresponding values of modelID and baseURI from the database.
  148. * Return FALSE if the DbModel does not exist.
  149. *
  150. * @param string $modelURI
  151. * @return object DbModel
  152. * @access public
  153. */
  154. function getModel($modelURI) {
  155.  
  156. if (!$this->modelExists($modelURI))
  157. return FALSE;
  158. else {
  159. $modelVars =& $this->dbConn->execute("SELECT modelURI, modelID, baseURI
  160. FROM models
  161. WHERE modelURI=''" .$modelURI ."''");
  162.  
  163. return new DbModel($this->dbConn, $modelVars->fields[0],
  164. $modelVars->fields[1], $modelVars->fields[2]);
  165. }
  166. }
  167.  
  168.  
  169. /**
  170. * Create a new instance of DbModel with the given $modelURI
  171. * and insert the DbModel variables into the database.
  172. * Return FALSE if there is already a model with the given URI.
  173. *
  174. * @param string $modelURI
  175. * @param string $baseURI
  176. * @return object DbModel
  177. * @throws SqlError
  178. * @access public
  179. */
  180. function getNewModel($modelURI, $baseURI=NULL) {
  181.  
  182. if ($this->modelExists($modelURI))
  183. return FALSE;
  184. else {
  185. $modelID = $this->_createUniqueModelID();
  186. $rs =& $this->dbConn->execute("INSERT INTO models
  187. VALUES (''" .$modelID ."'',
  188. ''" .$modelURI ."'',
  189. ''" .$baseURI ."'')");
  190. if (!$rs)
  191. $this->dbConn->errorMsg();
  192. else
  193. return new DbModel($this->dbConn, $modelURI, $modelID, $baseURI);
  194. }
  195. }
  196.  
  197.  
  198. /**
  199. * Store a MemModel or another DbModel from a different DbStore in the database.
  200. * Return FALSE if there is already a model with modelURI matching the modelURI
  201. * of the given model.
  202. *
  203. * @param object Model &$model
  204. * @param string $modelURI
  205. * @return boolean
  206. * @access public
  207. */
  208. function putModel(&$model, $modelURI=NULL) {
  209.  
  210. if (!$modelURI) {
  211. if (is_a($model, ''MemModel''))
  212. $modelURI = ''DbModel-'' .$this->_createUniqueModelID();
  213. else
  214. $modelURI = $model->modelURI;
  215. }else
  216. if ($this->modelExists($modelURI))
  217. return FALSE;
  218.  
  219. $newDbModel = $this->getNewModel($modelURI, $model->getBaseURI());
  220. $newDbModel->addModel($model);
  221. }
  222.  
  223.  
  224. /**
  225. * Close the DbStore.
  226. * !!! Warning: If you close the DbStore all active instances of DbModel from this
  227. * !!! DbStore will lose their database connection !!!
  228. *
  229. * @access public
  230. */
  231. function close() {
  232.  
  233. $this->dbConn->close();
  234. unset($this);
  235. }
  236.  
  237. // =============================================================================
  238. // **************************** private methods ********************************
  239. // =============================================================================
  240.  
  241.  
  242. /**
  243. * Create a unique ID for the DbModel to be insert into the models table.
  244. * This method was implemented because some databases do not support auto-increment.
  245. *
  246. * @return integer
  247. * @access private
  248. */
  249. function _createUniqueModelID() {
  250. $maxModelID =& $this->dbConn->GetOne(''SELECT MAX(modelID) FROM models'');
  251. return ++$maxModelID;
  252. }
  253. /**
  254. * Create a unique ID for the dataset to be insert into the datasets table.
  255. * This method was implemented because some databases do not support auto-increment.
  256. *
  257. * @return integer
  258. * @access private
  259. */
  260. function _createUniqueDatasetID() {
  261. $maxDatasetID =& $this->dbConn->GetOne(''SELECT MAX(datasetId) FROM datasets'');
  262. return ++$maxDatasetID;
  263. }
  264.  
  265.  
  266. /**
  267. * Create tables and indexes for MsAccess database
  268. *
  269. * @throws SqlError
  270. * @access private
  271. */
  272. function _createTables_MsAccess() {
  273.  
  274. $this->dbConn->startTrans();
  275. $this->dbConn->execute(''CREATE TABLE models
  276. (modelID long primary key,
  277. modelURI varchar not null,
  278. baseURI varchar)'');
  279.  
  280. $this->dbConn->execute(''CREATE UNIQUE INDEX m_modURI_idx ON models (modelURI)'');
  281.  
  282. $this->dbConn->execute(''CREATE TABLE statements
  283. (modelID long,
  284. subject varchar,
  285. predicate varchar,
  286. object Memo,
  287. l_language varchar,
  288. l_datatype varchar,
  289. subject_is varchar(1),
  290. object_is varchar(1),
  291. primary key (modelID, subject, predicate, object,
  292. l_language, l_datatype))'');
  293. $this->dbConn->execute(''CREATE INDEX s_mod_idx ON statements (modelID)'');
  294. $this->dbConn->execute(''CREATE INDEX s_sub_idx ON statements (subject)'');
  295. $this->dbConn->execute(''CREATE INDEX s_pred_idx ON statements (predicate)'');
  296. $this->dbConn->execute(''CREATE INDEX s_obj_idx ON statements (object)'');
  297.  
  298. $this->dbConn->execute(''CREATE TABLE namespaces
  299. (modelID long,
  300. namespace varchar,
  301. prefix varchar,
  302. primary key (modelID, namespace, prefix))'');
  303.  
  304. $this->dbConn->execute(''CREATE INDEX n_name_idx ON namespaces (namespace)'');
  305. $this->dbConn->execute(''CREATE INDEX n_pref_idx ON namespaces (prefix)'');
  306.  
  307. $this->dbConn->execute("CREATE TABLE datasets
  308. (datasetName varchar,
  309. defaultModelUri varchar,
  310. primary key (datasetName))");
  311. $this->dbConn->execute(''CREATE INDEX nGS_idx1 ON datasets (datasetName)'');
  312.  
  313. $this->dbConn->execute("CREATE TABLE `dataset_model` (
  314. datasetName varchar,
  315. modelId long,
  316. graphURI varchar,
  317. PRIMARY KEY (modelId,datasetName))");
  318. if (!$this->dbConn->completeTrans())
  319. echo $this->dbConn->errorMsg();
  320. }
  321.  
  322.  
  323. /**
  324. * Create tables and indexes for MySQL database
  325. *
  326. * @throws SqlError
  327. * @access private
  328. */
  329. function _createTables_MySql() {
  330.  
  331. $this->dbConn->startTrans();
  332.  
  333. $this->dbConn->execute("CREATE TABLE models
  334. (modelID bigint NOT NULL,
  335. modelURI varchar(255) NOT NULL,
  336. baseURI varchar(255) DEFAULT '''',
  337. primary key (modelID))");
  338. $this->dbConn->execute(''CREATE UNIQUE INDEX m_modURI_idx ON models (modelURI)'');
  339.  
  340. $this->dbConn->execute("CREATE TABLE statements
  341. (modelID bigint NOT NULL,
  342. subject varchar(255) NOT NULL,
  343. predicate varchar(255) NOT NULL,
  344. object text,
  345. l_language varchar(255) DEFAULT '''',
  346. l_datatype varchar(255) DEFAULT '''',
  347. subject_is varchar(1) NOT NULL,
  348. object_is varchar(1) NOT NULL)");
  349. $this->dbConn->execute("CREATE TABLE namespaces
  350. (modelID bigint NOT NULL,
  351. namespace varchar(255) NOT NULL,
  352. prefix varchar(255) NOT NULL,
  353. primary key (modelID,namespace))");
  354.  
  355. $this->dbConn->execute("CREATE TABLE `dataset_model` (
  356. `datasetName` varchar(255) NOT NULL default ''0'',
  357. `modelId` bigint(20) NOT NULL default ''0'',
  358. `graphURI` varchar(255) NOT NULL default '''',
  359. PRIMARY KEY (`modelId`,`datasetName`))");
  360. $this->dbConn->execute("CREATE TABLE `datasets` (
  361. `datasetName` varchar(255) NOT NULL default '''',
  362. `defaultModelUri` varchar(255) NOT NULL default ''0'',
  363. PRIMARY KEY (`datasetName`),
  364. KEY `datasetName` (`datasetName`))");
  365. $this->dbConn->execute(''CREATE INDEX s_mod_idx ON statements (modelID)'');
  366. $this->dbConn->execute(''CREATE INDEX n_mod_idx ON namespaces (modelID)'');
  367. $this->dbConn->execute(''CREATE INDEX s_sub_pred_idx ON statements
  368. (subject(200),predicate(200))'');
  369. $this->dbConn->execute(''CREATE INDEX s_obj_idx ON statements (object(250))'');
  370.  
  371. if (!$this->dbConn->completeTrans())
  372. echo $this->dbConn->errorMsg();
  373. }
  374. /**
  375. * Create tables and indexes for MSSQL database
  376. *
  377. * @throws SqlError
  378. * @access private
  379. */
  380. function _createTables_mssql(){
  381. $this->dbConn->startTrans();
  382.  
  383. $this->dbConn->execute("CREATE TABLE [dbo].[models] (
  384. [modelID] [int] NOT NULL ,
  385. [modelURI] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  386. [baseURI] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
  387. ) ON [PRIMARY]");
  388. $this->dbConn->execute("CREATE TABLE [dbo].[statements] (
  389. [modelID] [int] NOT NULL ,
  390. [subject] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  391. [predicate] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  392. [object] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  393. [l_language] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  394. [l_datatype] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  395. [subject_is] [nchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  396. [object_is] [nchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
  397. ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]");
  398. $this->dbConn->execute("CREATE TABLE [dbo].[namespaces] (
  399. [modelID] [int] NOT NULL ,
  400. [namespace] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
  401. [prefix] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  402. ) ON [PRIMARY]");
  403.  
  404. $this->dbConn->execute("ALTER TABLE [dbo].[models] WITH NOCHECK ADD
  405. CONSTRAINT [PK_models] PRIMARY KEY CLUSTERED
  406. (
  407. [modelID]
  408. ) ON [PRIMARY] ");
  409. $this->dbConn->execute("ALTER TABLE [dbo].[namespaces] WITH NOCHECK ADD
  410. CONSTRAINT [PK_namespaces] PRIMARY KEY CLUSTERED
  411. (
  412. [modelID],[namespace]
  413. ) ON [PRIMARY] ");
  414. $this->dbConn->execute("CREATE INDEX [joint index on subject and predicate] ON [dbo].[statements]([subject], [predicate]) ON [PRIMARY]");
  415.  
  416. if (!$this->dbConn->completeTrans())
  417. echo $this->dbConn->errorMsg();
  418. }
  419. /**
  420. * Checks if tables are setup for RAP
  421. *
  422. * @param string $databaseType
  423. * @throws SqlError
  424. * @access public
  425. ***/
  426. function isSetup($databaseType="MySQL") {
  427. if ($databaseType=="MySQL")
  428. return $this->_isSetup_MySql();
  429. if ($databaseType=="MSSQL")
  430. return $this->_isSetup_MSSQL();
  431. else {
  432. if ($databaseType==''MsAccess''){
  433. return $this->_isSetup_MsAccess();
  434. }else{
  435. $errmsg=RDFAPI_ERROR."(class: DbStore; method isSetup(''$databaseType'')):\nCurrently only MySQL, MsAccess and MSSQL are supported!";
  436. trigger_error($errmsg, E_USER_ERROR);}
  437. }
  438. }
  439.  
  440. /**
  441. * Checks if tables are setup for RAP (MySql)
  442. *
  443. * @throws SqlError
  444. * @access private
  445. ***/
  446. function _isSetup_MySql() {
  447. $recordSet =& $this->dbConn->execute("SHOW TABLES");
  448. if (!$recordSet)
  449. echo $this->dbConn->errorMsg();
  450. else {
  451. $tables = array();
  452. while (!$recordSet->EOF) {
  453.  
  454. $tables[]= $recordSet->fields[0];
  455. if(isset($i)){++$i;}
  456. $recordSet->moveNext();
  457. }
  458. if (in_array("models",$tables) && in_array("statements",$tables)&& in_array("namespaces",$tables)) return true;
  459. }
  460. return false;
  461. }
  462. /**
  463. * Checks if tables are setup for RAP (MsAccess)
  464. *
  465. * @throws SqlError
  466. * @access private
  467. ***/
  468. function _isSetup_MsAccess() {
  469. $tables =& $this->dbConn->MetaTables();
  470. if (!$tables)
  471. echo $this->dbConn->errorMsg();
  472. if (count($tables)==0){
  473. return false;}
  474. else {
  475. if (in_array("models",$tables) && in_array("statements",$tables) && in_array("namespaces",$tables)){ return true;
  476. }else{return false;}
  477. }
  478. }
  479. /**
  480. * Checks if tables are setup for RAP (MSSQL)
  481. *
  482. * @throws SqlError
  483. * @access private
  484. ***/
  485. function _isSetup_MSSQL() {
  486. $tables =& $this->dbConn->MetaTables();
  487. if (!$tables)
  488. echo $this->dbConn->errorMsg();
  489. if (count($tables)==0){
  490. return false;}
  491. else {
  492. if (in_array("models",$tables) && in_array("statements",$tables) && in_array("namespaces",$tables)){ return true;
  493. }else{return false;}
  494. }
  495. }
  496. /**
  497. * Create a new instance of DatasetDb with the given $datasetName
  498. * and insert the DatasetDb variables into the database.
  499. * Return FALSE if there is already a model with the given URI.
  500. *
  501. * @param $datasetName string
  502. * @return object DatasetDB
  503. * @throws SqlError
  504. * @access public
  505. */
  506. function & getNewDatasetDb($datasetName)
  507. {
  508.  
  509. require_once(RDFAPI_INCLUDE_DIR . PACKAGE_DATASET);
  510. if ($this->datasetExists($datasetName))
  511. return FALSE;
  512. else
  513. {
  514. $defaultModelUri=uniqid(''http://rdfapi-php/dataset_defaultmodel_'');
  515. $defaultModel=$this->getNewModel($defaultModelUri);
  516. $rs =& $this->dbConn->execute("INSERT INTO datasets
  517. VALUES (''" .$datasetName ."'',
  518. ''" .$defaultModelUri."'')");
  519. if (!$rs)
  520. $this->dbConn->errorMsg();
  521. else
  522. $return=new DatasetDb(&$this->dbConn,&$this,$datasetName);
  523. return ($return);
  524. }
  525. }
  526.  
  527. /**
  528. * Check if the Dataset with the given $datasetName is already stored in the database
  529. *
  530. * @param $datasetName string
  531. * @return boolean
  532. * @throws SqlError
  533. * @access public
  534. */
  535. function datasetExists($datasetName) {
  536.  
  537. $res =& $this->dbConn->execute("SELECT COUNT(*) FROM datasets
  538. WHERE datasetName = ''" .$datasetName ."''");
  539. if (!$res)
  540. echo $this->dbConn->errorMsg();
  541. else {
  542. if (!$res->fields[0])
  543. return FALSE;
  544. return TRUE;
  545. }
  546. }
  547. /**
  548. * Create a new instance of DatasetDb with the given $datasetName and
  549. * load the corresponding values from the database.
  550. * Return FALSE if the DbModel does not exist.
  551. *
  552. * @param $datasetId string
  553. * @return object DatasetDb
  554. * @access public
  555. */
  556. function getDatasetDb($datasetName) {
  557. require_once(RDFAPI_INCLUDE_DIR . PACKAGE_DATASET);
  558.  
  559. if (!$this->datasetExists($datasetName))
  560. return FALSE;
  561. else
  562. {
  563. $return=new DatasetDb(&$this->dbConn,&$this,$datasetName);
  564. return ($return);
  565. }
  566. }
  567. /**
  568. * Create a new instance of namedGraphDb with the given $modelURI and graphName and
  569. * load the corresponding values of modelID and baseURI from the database.
  570. * Return FALSE if the DbModel does not exist.
  571. *
  572. * @param $modelURI string
  573. * @param $graphName string
  574. * @return object NamedGraphMem
  575. * @access public
  576. */
  577. function getNamedGraphDb($modelURI, $graphName)
  578. {
  579. require_once(RDFAPI_INCLUDE_DIR . PACKAGE_DATASET);
  580. if (!$this->modelExists($modelURI))
  581. return FALSE;
  582. else {
  583. $modelVars =& $this->dbConn->execute("SELECT modelURI, modelID, baseURI
  584. FROM models
  585. WHERE modelURI=''" .$modelURI ."''");
  586.  
  587. return new NamedGraphDb($this->dbConn, $modelVars->fields[0],
  588. $modelVars->fields[1], $graphName ,$modelVars->fields[2]);
  589. }
  590. }
  591. /**
  592. * Create a new instance of namedGraphDb with the given $modelURI and graphName
  593. * and insert the DbModel variables into the database (not the graphName. This
  594. * is only stored persistently, when added to dataset).
  595. * Return FALSE if there is already a model with the given URI.
  596. *
  597. * @param $modelURI string
  598. * @param $graphName string
  599. * @param $baseURI string
  600. * @return object namedGraphDb
  601. * @throws SqlError
  602. * @access public
  603. */
  604. function getNewNamedGraphDb($modelURI, $graphName, $baseURI=NULL) {
  605.  
  606. if ($this->modelExists($modelURI))
  607. return FALSE;
  608. else {
  609. $modelID = $this->_createUniqueModelID();
  610. $rs =& $this->dbConn->execute("INSERT INTO models
  611. VALUES (''" .$modelID ."'',
  612. ''" .$modelURI ."'',
  613. ''" .$baseURI ."'')");
  614. if (!$rs)
  615. $this->dbConn->errorMsg();
  616. else
  617. return new NamedGraphDb($this->dbConn, $modelURI, $modelID, $graphName, $baseURI);
  618. }
  619. }
  620. /**
  621. * Removes the graph with all statements from the database.
  622. * Warning: A single namedGraph can be added to several datasets. So it''ll be
  623. * removed from all datasets.
  624. *
  625. * @param $modelURI string
  626. * @return boolean
  627. * @throws SqlError
  628. * @access public
  629. */
  630. function removeNamedGraphDb($modelURI)
  631. {
  632. if (!$this->modelExists($modelURI))
  633. return FALSE;
  634. $modelID = $this->dbConn->GetOne("SELECT modelID FROM models WHERE modelURI=''".$modelURI."''");
  635. $this->dbConn->execute("DELETE FROM models WHERE modelID=".$modelID);
  636. $this->dbConn->execute("DELETE FROM dataset_model WHERE modelId=".$modelID);
  637. $this->dbConn->execute("DELETE FROM statements WHERE modelID=".$modelID);
  638. return true;
  639. }
  640. } // end: Class DbStore
  641. ?>

Documentation generated on Fri, 13 Jan 2006 07:48:12 +0100 by phpDocumentor 1.3.0RC4