During my study, I had to create many UML design (Unified Modelling Language).
This activity for this unit involves me putting my object-oriented design skills into practice.
My first attempt was to design a supermarket model. The purpose of this activity was to demonstrate my understanding of new concepts such as classes, inheritance, composition and how they link together.
That diagram was my first trial. It is important to consider all the different kind of interactions between all the actors. With more and more practice, it will become easier to make a logical design.
The first connection possible is an association. It is a relationship between 2 objects where there is no particular ownership in place ('HAS A' relationship).
Another 'HAS A' relationship is called aggregation. It is a form of association which has a 'use' connection. If the parent class would be destroyed, the child could still exist independently (weak 'HAS A' relationship).
The last one is a Composition. It is a stronger form of aggregation that implies an ownership, where the child class is dependent completely to the parent class. (strong 'HAS A' relationship)
As a practical exercise, I had to develop UML diagrams for a doctor’s surgery based on the following scenario:
Before a patient can see a doctor, or nurse, they will be required to make an appointment. The appointment will be made by the receptionist. However, before making the appointment, the receptionist needs to ask the patient which doctor they would like to see, and whether the appointment is standard consultation or an emergency appointment. The receptionist will use this information to check the appointment schedule, find an available appointment and make the booking. During the appointment itself, the doctor may issue the patient with a prescription. It is possible for a patient to request a repeat prescription be raised. Receptionists are able to cancel appointments as well as create them. A doctor at the clinic may have a maximum of 500 patients registered to them at any one time.
I had to design:
After the practice, comes the real first assignment of this module, I had to design a UML class diagram for an online store. One of the challenges was to meet all the business requirements.
The UML class diagram for the online store has 16 classes:
The main class is the User.
The class Customer and Administrator inherit from the User class in order to stay DRY (Don’t Repeat Yourself) with the code and avoid repetitions.
The same way the class Website and seller inherit from the Administrator class.
There are 2 different kind of administrators:
For the activity diagram, the user starts by visiting the website and then browsing some items. The user can view the item and if he/she likes, can select the quantity and add the item to the basket. If not, he/she can leave the website or come back to the main page and continue browsing. When shopping is done, he/she select the payment method, enter details and confirm the order. The order can be approved or cancelled. The last scenario would be, he/she abandons the shopping cart.
Here you can find the UML diagram
Data is today's new oil in terms of its value and importance. A database is a systematic collection of data. The data in a database is organized and makes data management easier. A DBMS (Database Management System) is a collection of programs which enables its users to access database, manipulate data, and help in representation of data. It can also control access to the database by various users.
Database is made of 3 things:
Attributes describe the different characteristics of an entity. Each row corresponds to a different instance of an entity.
At this stage of the module, I am going through all the fundamental aspects of database design with a focus on normalisation.
In 1970, Edgar Codd defined 3 rules for organizing the data in a database called Normalisation rules. It helps to reduce redundancy and improve the integrity of our data.
After going all through the theorical part, I had to develop a table structure that conforms to third normal form (3NF).