diff options
Diffstat (limited to 'demos/quickstart/protected')
-rw-r--r-- | demos/quickstart/protected/pages/Database/ActiveRecord.page | 29 | ||||
-rw-r--r-- | demos/quickstart/protected/pages/Database/ar_objects.png | bin | 0 -> 14323 bytes | |||
-rw-r--r-- | demos/quickstart/protected/pages/Database/ar_objects.vsd | bin | 0 -> 183296 bytes | |||
-rw-r--r-- | demos/quickstart/protected/pages/Database/ar_relations.png | bin | 0 -> 9278 bytes | |||
-rw-r--r-- | demos/quickstart/protected/pages/Database/ar_relations.vsd | bin | 0 -> 97280 bytes |
5 files changed, 23 insertions, 6 deletions
diff --git a/demos/quickstart/protected/pages/Database/ActiveRecord.page b/demos/quickstart/protected/pages/Database/ActiveRecord.page index c3cf663b..967aae89 100644 --- a/demos/quickstart/protected/pages/Database/ActiveRecord.page +++ b/demos/quickstart/protected/pages/Database/ActiveRecord.page @@ -49,15 +49,20 @@ <li>Finder methods to wrap commonly used SQL queries and return Active Record objects.</li> <li>Update existing records and insert new records into the database.</li> </ul> +<h2>Database Supported</h2> <p id="p1" class="block-content"> The Active Record implementation utilizes the <a href="?page=Database.DAO">Prado DAO</a> classes for data access. -The current Active Record implementation supports -<a href="http://www.mysql.com">MySQL</a>, -<a href="http://www.postgres.com">Postgres SQL</a> and -<a href="http://www.sqlite.org">SQLite</a> databases. -Support for other databases can be provided when there are sufficient demand. +The current Active Record implementation supports the following database. </p> -<h2 id="138048">Defining an Active Record</h2> +<ul> + <li><a href="http://www.mysql.com">MySQL 4.1 or later</a></li> + <li><a href="http://www.postgres.com">Postgres SQL 7.3 or later</a></li> + <li><a href="http://www.sqlite.org">SQLite 2 and 3</a></li> + <li><a href="#">MS SQL 2000 or later</a></li> +</ul> +<p>Support for other databases can be provided when there are sufficient demand.</p> + +<h1 id="138048">Defining an Active Record</h1> <p id="690483" class="block-content">Let us consider the following "users" table that contains two columns named "username" and "email", where "username" is also the primary key. @@ -412,6 +417,18 @@ catch(Exception $e) // an exception is raised if a query fails } </com:TTextHighlighter> +<h1 id="ar_relations">Active Record Relationships</h1> +<p id="690504a" class="block-content"> +The Prado ActiveRecord implementation supports the foreign key mappings for database +that supports foreign key contraints. For ActiveRecord relationships to function the +underlying database must support foreign key constraints (e.g. MySQL with InnoDB). +</p> + +<h2>Foreign Key Mapping</h2> + + +<h2>Association Table Mapping</h2> + <h2 id="138054">References</h2> <ul id="u3" class="block-content"> <li>Fowler et. al. <i>Patterns of Enterprise Application Architecture</i>, diff --git a/demos/quickstart/protected/pages/Database/ar_objects.png b/demos/quickstart/protected/pages/Database/ar_objects.png Binary files differnew file mode 100644 index 00000000..027d1e96 --- /dev/null +++ b/demos/quickstart/protected/pages/Database/ar_objects.png diff --git a/demos/quickstart/protected/pages/Database/ar_objects.vsd b/demos/quickstart/protected/pages/Database/ar_objects.vsd Binary files differnew file mode 100644 index 00000000..595b7d86 --- /dev/null +++ b/demos/quickstart/protected/pages/Database/ar_objects.vsd diff --git a/demos/quickstart/protected/pages/Database/ar_relations.png b/demos/quickstart/protected/pages/Database/ar_relations.png Binary files differnew file mode 100644 index 00000000..df72823c --- /dev/null +++ b/demos/quickstart/protected/pages/Database/ar_relations.png diff --git a/demos/quickstart/protected/pages/Database/ar_relations.vsd b/demos/quickstart/protected/pages/Database/ar_relations.vsd Binary files differnew file mode 100644 index 00000000..9b27e7e3 --- /dev/null +++ b/demos/quickstart/protected/pages/Database/ar_relations.vsd |