Example system: Enrollment
In this section, you will learn the basic structure of information systems according to Ampersand. By studying a simple system, you will learn how Ampersand represents such systems.
We will study an information system called "Enrollment". The purpose of that system is to enroll students for modules. Students can enroll (or be enrolled) for any module that is part of the course they take.
Try it out on an Ampersand implementation. Copy this example code, make a new script on an Ampersand system, compile it, and generate a prototype implementation from it. Run the prototype and then click on the icon "Overview" in the top-left of the screen. The application will start. Browse through the data and change things. Find out which courses, students, and modules there are and try to see what happens if you add or remove information from the system. You can use this assignment as a guide:
Who are the three students and what are the courses they take?
Is there a module HRM?
Add, in the tab Course, the module HRM to the Management course. The system sees that the subject is unknown, and provides a green plus-sign to add it.
This information system was built by the following code:
What have you learned?
After finishing your assignment, you have learned:
to recognize details in the source code of your information system and relate them to the information system "Enrollment" that you have been playing with;
that a rule of the business, such as "A student can only enroll for a module that is in the course the student takes" can be formalized in Ampersand.
that such a business rule can be used to constrain data in a database.
Want to learn more?
How can I create my own information system in RAP4? Go to .
What is the conceptual model behind an Ampersand model? Go to
How can I upload from spreadsheets into my application?