In this 'how to' tutorial you will learn how to manage many-to-many related database tables. One of the best-known examples of many-to-many relations lies in students registering for courses: one student can attend one or more courses, and one course can be attended by one or more students.
This application will allow you to list the current students (name and e-mail address), to add new ones along with their options for courses, to edit the information related to one or more students (at the same time), and to delete students and their options.
If you have the MX Kollection 3 bundle installed, then you have all the needed tools to build this application. Otherwise, the following separate products should be installed on your computer in order to complete the How to manage many-to-many relations tutorial:
NeXTensio
ImpAKT
MX Form Validation (optional)
The estimated completion time for this tutorial is about 20 minutes. It also depends on your authoring knowledge with Dreamweaver and MX Kollection 3.
The database structure used is clear and simple. It uses the following
three tables:

Note: The database diagram in the image above was built with MX Query Builder (also referred as QuB) to better illustrate the database structure. You do not need to build it in order to complete this 'how to' tutorial.
The student_std table stores data about the students:
id_std - student's ID.
name_std - student's name.
email_std - student's e-mail address.
The course_crs table stores data about the available courses:
id_crs - course ID.
name_crs - course name.
The student_to_course_stc table stores the student-course relations (what student registered to what course):
idstd_stc - the ID of a student who registered to a course.
idcrs_stc - the ID of a course that a student registered to.
To quickly create the database structure, use the scripts provided in the zip package (either .sql or .mdb) corresponding to your database server. You can find the scripts in the \tutorials\_HOW_TO\Many-to-many relations\db\ folder.
In order to complete this tutorial, you only need two files in your Dreamweaver site:
create the index page, where you will apply the wizard that creates the NeXTensio list.
the form page will be automatically created by the wizard applied before. This is where another wizard will be used, creating the NeXTensio form.
Before you start building the actual application, open the index page and define a Dreamweaver database connection: conn_ManyToMany. Configure it to connect to your database server and make it point to the database containing the tables described above.