Day 99: 15 December 2020
I spent much of the day preparing a good presentation for the sixth OpenClassRooms project.
The sixth project uses the MEAN stack and it's a web application that allows users to registers an account and publish their favourite sauces. They can also like or dislike other users' sauces.
I passed the exam, so now it's better if I immediately start following the suggested courses on OpenclassRooms.
Even if I started to write a project a few days ago, I will put freeCodeCamp on pause for a few weeks.
A good traveler has no fixed plans and is not intent on arriving.Lao Tzu
Since this will be my last project on OpenClassRooms, the difficulty is increased because it puts everything together! This time I have to write frontend & backend to create a social network like reddit. Fullstack baby!
In order to be able to create a complex web application like reddit, the platform suggests two courses (in French):
I am vaguely familiar with MySQL (studied at university like 15 years ago) and Vue.js because I already followed a course on Vue Master a few days ago.
And also the examinator at the end of my presentation suggested me to study the Agile method for the last project:
Since the project has only one requirement, i.e. the use of MySQL, it seems right to start immediately by building the backend part first. But first, I need to complete these three courses.
Let's proceed in order.
The course on MySQL has a very long duration when compared to the other courses I have taken so far.
Also, each lesson contains an impressive amount of information!
I followed the first 4 lessons and remembered facts that were in the hidden areas of my long-term memory:
- MySQL is a Relational Database Management System (RDBMS) based on the client-server model
- The SQL language is used for communication between the client and the server
- In a relational database, data is represented in the form of tables
- MySQL can be used in command line or with a graphical user interface
- To connect to MySQL from the command line, use: mysql -u user [-h host] -p
- To terminate a SQL statement, the ; character is used
- In SQL, strings must be enclosed in single quotes '
- When connecting to MySQL, the encoding used should be defined either directly in the connection with the option--default-character-set or with the command SET NAMES
- MySQL defines several types of data: integer numbers, decimal numbers, alphanumeric texts, alphanumeric binary strings and time data
- It is important to always use the correct data type for the situation
- SET and ENUM are data types that exist only in MySQL. Therefore, it is best to avoid using them
- To create a database, the CREATE DATABASE command is used
- To delete a database : DROP DATABASE basename
- Each time you connect to MySQL (or each time you want to use a different database from the one selected previously), you must specify which database you are going to work with, using USE database_name
The author also mentions this website (in French) where you can find other courses and tutorials on MySQL!
The course suggests a specific version of MYSQL and the steps to take to get it and configure it properly.
The only difficulty I've had to deal with so far has been a error that caused me to lose a lot of time:
"Can't connect to MySQL server on 'localhost' (10061)"
Fortunately, by doing a Google search I found several answers but none had the desired result except this one.
We run the tool "MySQL Installer - Community" and then we click on the Reconfigure Quick Action.
A wizard will appear to help us!
Lesson of the day
One of the basic rules to follow when designing a database is that the structure of the database (i.e. tables, columns) must not change when adding data. Therefore, anything that is likely to change must be data, not part of the database structure.
The journey of a thousand miles begins with a single step.Lao Tzu
We are coming to the end of this incredible journey and it's impressive to see the amount of things I've learned to build.
Knowledge is a treasure, but practice is the key to it.Lao Tzu
**Link to tweet:**