Implementing a Cloud-Based System
Cara Nguyen
Southern New Hampshire University
IT-423-H6451
Synopsis:
-
- Implementing a cloud-based system that meets organizational needs (for a company named YODAE)
- Interface with cloud-based databases to support organizational operations
The following diagram is an Entity Relationship Diagram (ERD) that illustrates the architecture of the cloud database system by YODAE. Now that YODAE has expanded its services and products to include IoT devices, the diagram has combined the classroom management system with the IoT device management system. There are a total of nine entities, consisting of students, courses, students-courses, teachers, schools, staff, products, orders and orders-products. The attributes are shown for each entity, defining various properties or traits of that entity. The cardinality shown in the diagram identifies the relationship between the entities.
At the center of the diagram is the Schools entity, through which all other entities are directly or indirectly connected. On the classroom side is the Students table, where student_id is the primary key. The cardinality between the Students table and the Courses table shows that students can be assigned to zero or many courses, and likewise courses can have zero or many students assigned to them. The Students-Courses table is where you would find the student(s) associated with the course id. The Teachers table shows that a teacher can have zero or many courses to teach, but a course can have one and only one teacher assigned. A teacher can be assigned one or many schools, and a school can have one or many teachers.
YODAE can sell multiple products and services to multiple schools, therefore in the Orders table, the school_id is the foreign key that the Orders table uses to reference the Schools table. Since a product can have zero or many orders, and an order can have one or many products in it, the product_id is the primary identifier in the Products table. The product(s) and services sold will also be identified by name, product_type, purchase_date and quantity attribute, which indicates how many of that product are remaining in stock. The Orders-Products table is where you can find the product id that is associated with the order.
Finally, the Staff table has staff_id as the primary key and staff can be assigned to one and only one school but a school can have one or many staff. The Staff table is further identified by the department and staff member’s first and last name. There is also a permissions attribute in the Staff table that indicates the level of access a staff member can have to IoT data for the school. For example, IT professionals will need access to this information but lower-level administrators might not require access. This system ensures access to sensitive IT data is limited to the staff with the appropriate credentials.
YODAE Entity Relationship Diagram
Set Up Virtual Server
First, an EC2 instance is created using Amazon AWS services. The EC2 is a virtual (cloud) computing environment that allows you to easily control your computing resources and storage infrastructure.
After set-up and upon clicking on an Instance ID, the EC2 instance summary will display a public DNS that can then be used to connect an SSH client to the EC2 server.
PHP / Apache Install
Once you connect to your EC2 instance in your SSH client (Termius), you can then use your SSH client to install PHP, Apache and MySQL, as shown in the following screenshots:
PHP / Apache:
MySQL
Upon successful MySQL setup, you can now create a database that WordPress will use to store data (this one is called wordpressdb).
Deploy a Front-End Component
After configuring database parameters in MySQL setup, you can now use your URL from your EC2 dashboard to install WordPress. Upon successful installation, the WordPress admin page should look like this:
Implement Database Tables
Once in WordPress, you can install plug-ins, which are basically apps that allow you to expand the functionality of WordPress to suit your needs. The plug-in called phpMyAdmin was used to create database tables from our ERD tables shown in the panel on the left.
This screenshot shows the structure of the School database. The school_id is the primary key for this database, so it is set to auto-increment so that each school_id created is unique.
Data Manipulation
After all tables have been created in the plug-in, and some data has been inserted into the databases, a series of SQL statements are used to manipulate the data. This statement was executed to show only students registered to a specific course. Scrolling down the page will display the results of the query statement (second screenshot).
This Delete Statement removes a course from the Courses table.
This statement changes the entry_year for a particular student (student_id 354).
The student’s information now reflects the updated entry year in the Students database.
Interface with Database
In the WordPress admin panel, you can add forms or pages that can interface with the database you created in phpMyAdmin. In this case, a form called “Add Student” was created using PHP code. Here, the user can test their page set-up by entering data into the form they created. Once the ‘Add Student’ button is selected, the information will then be displayed on another page called “View Student”, which is also created using PHP code.
Public URL for the EC2 Instance
The public URL for the EC2 instance used in the setup of these programs has changed a few times throughout the process. When that occurs, it is necessary to update the URL using the SSH client to connect to WordPress Admin page again. This screenshot shows the URL displayed at the time of submitting this project and is subject to change.