Getting startedDatabase creationFor this tutorial we will consider a simple database, that benefits from the relational approach using foreign keys to link information. The database will contain the "departments_dep" and "employees_emp" tables. Consider the following situation: a company needs to maintain certain information about its employees. Thus the necessity of the "employees_emp" table. Considering that many of these employees will come from the same department, we can further group this information, because one may also need to calculate certain aggregated information for each department. First we'll create a new database named "impaktbasics" in which we'll create a "departments_dep" table, containing the "id_dep", "name_dep" and "budget_dep" fields, and a "employees_emp" table, containing the "id_emp", "iddep_emp", "name_emp" and "salary_emp". We have created a link between the "employees_emp" table, here called child table, and the "departments_dep" table, here called parent table, by using the foreign key named "iddep_emp" which corresponds in the parent table to the primary key named "id_dep". More exactly this link describes the one to many relationship between the "departments_dep" table and the "employees_emp" table. The complete scripts used to generate the database tables are included in the ImpAKT 2 distribution package in a zip archive. Please find below the graphical representation of the tables and the relations between them, made using the InterAKT visual query editor, QuB:
Getting startedOpen the Macromedia Dreamweaver MX and, by using the "New Site" option from the "Site" menu, create a new site named "impaktbasics". This new site will use the PHP_ADODB server model to connect to the database server. This option can be set in the "Testing server" section of the "Create New Site" wizard. Create a new file named "index.php" in your site root folder (Using the mouse left button on the site name in the "Files" panel). This file will be the master index list for the "departments_dep" table. Because this is the first page in a new site, no database connection will be available. Therefore, we'll have to create a new database connection by using the "ADODB Connection" option, that can be found using the "plus" button from the "Databases" tab in the "Application" panel. Follow the example below to properly configure the connection:
Please replace the "Database Server", "User Name" and "Passwords" fields values to reflect your configuration settings. |
Adobe acquired InterAKT
InterAKT has been acquired by Adobe.
Learn more
|