You are on page 1of 2

Personal Reflection

By finishing this assignment, I had learnt a more advance way to use database system.
It included on how to draw and use a ERD entity relationship diagram, normalize it,
and demoralize it based on situation. Since this assignment database were developed
in MySQL Server. I had understood on how to use MySQL Server to create, delete,
update database. Besides, I have also learned that how to use triggers, primary key,
foreign key, rollup and cube query function after finishing this assignment.
At the first stage of group part, the assignment required a Entity Relationship Model
which included the Entity Relationship Diagram. At this stage, a ERD diagram had
develop based on the case study by the whole group. This had allowed us to
understand on how to develop a ERD diagram, and how to develop database based on
the case required. For example, the case study state that passenger can book seats in 4
different classes which are business class, economic class, premium class, and first
class. At this scenario, a entity had been develop named seats price which contain
pricing with the seats class categorized.
Next is optimization strategy justification. In this optimization strategy part, I had
used indexing strategy. It is basically means by adding the primary key and foreign
key to the table to allow them can be quick searching. But too much of indexing will
slow down the query process, so it is suggested to put maximum 5 to 6 index in one
table the best. Besides it is easier to create the relationship with other table.
Thirdly is constrain, in this constraint part, I have used the foreign key. Foreign key is
a key used to create the relationship between tables. If a table has included the
foreign key from another table, it means it can use the data from that table, so we no
need to copy the same staff for two tables. For example in the reservation table, there
is few foreign keys are use there. They are flight ID and passenger ID.
Next is trigger part, in this trigger part, I have done the passengers trigger. The
function for that trigger is to check which age category the passengers is belong to
and set the age Group data which is adult, child, youth, and infant. This will go
through an if else logic and it is a before update trigger. Besides, the case study also
states that infant will have a special service meals provided by airlines. So in this
trigger, will automatic add on a service for the passengers which is under or equal to 2
years old. By finishing this part, I had learned how to use trigger well.
Lastly is the individual part, it contains 7 questions to test our knowledge on SQL
queries. I had chosen the second member part. During developing the query in this
part, I had learned how to apply Join, Group By, and DISTINCT query function on
the case study. Besides, there were also some new functions which I had never seen
before which are cube and rollup. I had did some research on these functions and
gather some ideas to solve the question XII. Besides, the last question requires me to
develop a query which supports the business case. I had chosen to develop a query
which shows the remaining available seats for selected seats classes and a selected
aircraft. In the example I am using business class seats with the aircraft with ID 8.