Information Systems Visual Studio Worked Example
Information Systems Visual Studio Worked Example
Do not come to the exam if you do not know the classical Client-Order structure. You must know it.
Make sure you know how to write the relational models from an EERD and vice versa.
Modern Computer Aided design (CAD) packages like AutoCAD and Solid Ede rely on an underlying relational
database to store design information. This enables the designer to see the effect of a single design change on the
whole design. It also ensures that a change in e.g. a dimension is made in one place so multiple changes are avoided.
A product that is created consists of at least one or more sub-assemblies. A sub-assembly may consist of none or
more other sub-assemblies., while a sub-assembly again consists of at least one or more parts. A part can be used in
different sub-assemblies. Standard features define a part, where features can be faces, edges, holes, chamfers and
so on. Each feature is defined by its type (hole, groove etc.) and at least one but usually more than one dimension
that must be stored separately. An existing sub-assembly may be reused in other products. Products, sub-
assemblies, parts and standard features all have text descriptions.
Notice the table that links to itself twice. The sub assembly can consist of two or more sub-assemblies.
Indicate primary entities. Otherwise it is wrong. Write P next to the block or thicken the lines.
ELO 3 Questions
Question 3: Normalization See 2010 A2 – Q3
You can’t apply the basic steps here. The repetition rule is not applicable here. You are being tested on how you will
break the rules to get to the answer. [This question was hell. Very unsure of my answer]
A vehicle fleet management system (VFMS) monitors the movement of trucks via satellite tracking technology. A
truck sends its position, registration number, speed and fuel consumption continuously to the system via a
telemetry, but the system samples the signal only every 10 minutes where after the observation is stored
electronically. A credit card is used when a truck must pay a toll fee at a toll gate, and the receipt is sent directly and
electronically to the VFMS financial clerk. An operator of the VFMS can at any time request the position and/or
average speed over a certain time period of a given truck.
Never have data stores on Context diagram level. Only Diagram Zero gets major data stores. So we ignore the saving
of data as it is detail for another level.
ELO 3 Questions
Question 5: Standard Project question - The A3 will have a similar structure
A large number of students participate in a project to collect funds to support other students with textbooks. A bank
account is maintained for this purpose, and the curator of the project registers all amounts paid in the database. A
student can register many amounts, but an amount registered is associated with a specific student. The student
collecting the most money by June 30th receives a gift from McDonuts. The total amount collected to date (a derived
item) by a student must be stored with the students detail. The data structure of the database is shown below.
Design a webpage using MS-Visual Studio and SQL code to accomplish registration of amounts. Explain your design in
detail. The design must enable the curator to enter new amounts and the change(s) must be shown, i.e. the latest
amounts must be displayed. The web page must contain at least one insert form and all students and their total
amounts collected must be shown. The individual amounts collected must be shown. The individual amount
transactions of the past must also be shown. Give the purpose of each VB (Visual Basic) object you use.
Assume:
1. A SQL database with valid tables and relationships exist and is already populated.
2. A valid working connection string exists.
3. It’s not necessary to describe the starting Visual studio or opening a new apex page. Simply start as if the
program is ready.
4. Assume a valid webpage is open.
The relationship is one to many (From tStudents to Amounts table) each time you add an amount you create a new
enrty for the student so that you can have multiple entries for a student on a table.
The final layout of the answer was given under as the user interface. We just need to add two Gridviews. One that
shows the total amount of each student transaction and the second that shows the individual payments received
from each student.
Prof wants to see a form where he can ADD (INSERT) the date. He wants to ADD (INSERT) the amount and he wants
a dropdown list (DDL) with the Student name to choose from to prevent typing a name wrong.
We are not expected to write out code. We must conceptually show that we can intercept the ItemInserted event at
the Amounts table and use it to update our tStudents table.
Conceptually tell that we need the Amount table and we need tStudents table via: [2]
Sub fvInsertAmount_ItemInserted ( )
Dim txtAmount as Textbox = fvInsertAmount.FindControl (“AmountPaidTextBox”)
This will refer to that little box next to amounts. This gives you a handle on that. If the syntax is not exactly like that
in VB it’s not an issue but the main idea should conceptually be intact and shown that you understand the logic.
The concept is: Working over the boundary of the Formview asking it to give the handle to the Amounts box (where
we enter the contribution made) and we put it into the (integer) Dim txtAmount.
We now do the same for the ddlStudents because an amount is linked to a specific student chosen. [1]
Dim ddlStudents as DropDownList = fvInsertAmount_FindControl (“ddlStudents”)
The concept is we now have references to txtAmounts and ddlStudents with this code.
Why do we need these references? We want to write an update SQL string. And this is the important part of the
secondary task (② Secondary UPDATE).
Before we can update the SQL string we must define it: [1]
Dim SQL as String
Now we write the code that will update the tStudents table. [1]
SQL = “UPDATE tStudents SET CumulativeAmount = CumulativeAmount + ” & txtAmount.Text & “WHERE
StudentNo = “ & ddlStudents.Text
This string of code updates the CumulativeAmount in the tStudents table by taking the specific student that
contributed and taking their specific current cumulative value and adding the new amount contributed using the
txtAmount we defined. The WHERE tells the program where to update the contribution. And we told it to update
WHERE the StudentNo is the same as what is in the ddlStudents box using the reference we made for the
ddlStudents at the second line of code.
ELO 3 Questions
The exact code is not as important as showing prof that you want to:
Update tStudents table Adjust Cumulative amounts Remember to do it WHERE
Please remember that: INSERT happens at the end of a table and UPDATE changes data in a specific row and the
specific row is given by WHERE. Know what we want to do. Otherwise he will know you don’t know what’s up.
End Sub
Visual representation of step 7)
Amounts Table:
After linking the Formview to the Amounts table and changing the behaviour to ‘Insert’. Then changing the
Formview to an InsertItemTemplate you get the following: