Welcome to Ed2Ti Blog.

My journey on IT is here.

Last week, my professor at Trebas Institute, Mr. Iyad Koteich started a class talking about ER Model. I confess that I really like to design database models(ER Models).

My classmate Ravi Rawat took a picture from a dashboard with a relationship model designer by Professor Iyad Koteich. This picture was the "kick-off" for this project.

First I need to explain the difference between ER Model and R Model.

R Model: Describe a vision of the problem to be resolved that any person can see and understand.

ER Model: Materializing the relational model in an Entity on a database requires some organizations.

I will use "WE" every time because Professor Iyad Koteich is my mentor and some classmates can contribute with us.

We need to understand how this project will be constructed:

  1. Create the full ER Model -> MVP (2022-07-29)
  2. Develop a PHP program to maintain the data (pΔΊayer, teams, clubs, games, etc) -> MPV (2022-08-31)
  3. Develop a python program, to run in the background, analyzing the teams and the games. (2022-12-31)

The Codes of this project are hosted on GitHub: https://github.com/ed2ti/soccer-game-ia

You can directly download the ER-Model here

Study objectives:

  1. Understand ER Model
  2. Construct a Database (MariaDB or Postgres SQL)
  3. FrontEnd Develop with PHP
  4. BackEnd Develop with PYTON (sklearn, pandas, numpy)

All players were created by a website: https://www.mockaroo.com/. You can directly download it here.

Professor: Iyad Koteich

Objective: Using a MariaDB database, create a simple PHP program to:

  1. Create a new account
  2. Login user

I'm using in this example some technologies like HTML5, CSS3, PHP, and MySQL(MariaDB)

Table: users

DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `firstName` varchar(120) NOT NULL,
  `lastName` varchar(120) NOT NULL,
  `password` varchar(120) NOT NULL,
  `email` varchar(120) NOT NULL,
  `phone` varchar(120) NOT NULL,
  `last` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `email` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

All files from this project you can find on GitHub: GitHub-Link

Professor: Iyad Koteich

On 2022-07-04, I present at class a LAB with AWS using two services:

  1. EC2(Elastic Compute Cloud) Instances
  2. RDS(Relational Database Service) - Database (MariaDB)

The purpose is to compare the configuration and utilization of MariaDB as an IAAS or PAAS.

MariaDB - IAAS(infrastructure-as-a-service)

  1. Create an EC2 Instance with an ubuntu server
  2. Instal MariaDB - apt install mariadb-server
  3. Configure a Security group
  4. Change bind-address to 0.0.0.0
  5. Create a user and give access to him.

Create User:

  1. CREATE USER 'admin'@'%' IDENTIFIED BY 'password';
  2. GRANT ALL PRIVILEGES ON . TO 'admin'@'%' WITH GRANT OPTION;
  3. FLUSH PRIVILEGES;

Change Bind Address: /etc/mysql/mariadb.conf.d/ and change bind-address

MariaDB - PAAS(platform-as-a-service)

  • Create a RDS Instance item
  • Configure a Security group

Relational Database: MariaDB is Relational Database and what is it?

  1. relationship -> one-to-one [indicate]
  2. relationship -> one-to-many [orders]
  3. [son] relationship -> many-to-many [rent cars]

Data Definition Language.

  • CREATE DATABASE trebasdb;
  • ** USE trebasdb; **
  • CREATE TABLE users( id int(4) AUTO_INCREMENT, name varchar(30) NOT NULL, email varchar(50), PRIMARY KEY (id) );

Data Manipulation Language.

  • SELECT * FROM
  • DELETE FROM
  • INSERT INTO

Design patterns.