From 16bbf435c8048c3c726de78adc8a670b8a527229 Mon Sep 17 00:00:00 2001 From: xue <> Date: Thu, 5 Apr 2007 19:53:01 +0000 Subject: Added Day2 for blog-tutorial. --- .../protected/pages/Day2/CreateDB.page | 41 +++++++++++++++------- 1 file changed, 29 insertions(+), 12 deletions(-) (limited to 'demos/blog-tutorial/protected/pages/Day2/CreateDB.page') diff --git a/demos/blog-tutorial/protected/pages/Day2/CreateDB.page b/demos/blog-tutorial/protected/pages/Day2/CreateDB.page index 04dd0d90..0d45ba50 100644 --- a/demos/blog-tutorial/protected/pages/Day2/CreateDB.page +++ b/demos/blog-tutorial/protected/pages/Day2/CreateDB.page @@ -3,7 +3,7 @@
-Most Web applications use database to keep data. Our blog system is not an exception. In this section, we will describe how to write database-driven pages for our blog system. We will use techniques including database access object (DAO) and active record. +Most Web applications use database to keep data. Our blog system is not an exception. In this section, we will describe how to write database-driven pages for our blog system. We will use techniques including database access object (DAO) and Active Record.
@@ -13,34 +13,51 @@ For tutorial purpose, we have simplified the requirements of our blog system so
-The corresponding SQL statements for creating the tables are as follows, +We use a SQLite 3 database to keep our data. We first convert the ER diagram into the following SQL statements and save them in the file protected/schema.sql.
+We use the SQLite command line tool to create the SQLite database. We first create a directory protected/data to hold the SQLite database file. Per SQLite's requirement, this directory and the database file to be created must be set writable by the Web server process. We now execute the following command under the directory protected/data: +
+ +-We use a SQLite 3 database to keep our data. +The database has been created as protected/data/blog.db and we shall see the following directories and files:
+ \ No newline at end of file -- cgit v1.2.3