DBA Exercise – Table creation

Today we will work on the creation of 2 tables with relationship. This one is not complex but you should be familiar with Database Normalization. You can read a brief about it on Guru99. More resources will be made available while browsing for the solution of this exercise. Context Request Build 3 tables covering the […]

Solution to SQL Aggregation exercise

Explain on mysql query

This is the solution to the last SQL exercise from the series covering the students/disciplines field. The Third one from the series featured a WITH AS and GROUP BY clause, today we are working more on SQL aggregations such as : MIN MAX AVG Same Context Solution Here is what you should obtain as a […]

Php7.4+ MVC Pattern & PDO

PDO statement and Typed properties

We will explore a bit the PDO Library (Php Data Objects) provided by Php. Context The code base includes the following features : PSR4 autoloading with Composer Typed properties Mysql DB with 2 tables A controller and 2 entities following the tutorial (following the MVC Pattern) A default endpoint (homepage displaying all data from an […]

DBA Exercise – Aggregation

This is the last SQL training exercise of the series featuring the students business field. As a reminder, check out the 4 exercises : Select query DBA exercise – including the context data 3 best students select statement Group By Statement exercise More about Aggregation (current page) Context As usual load the context data provided […]

DBA – Solution to Exercise 4 on Select with Group By

I hope that you played the game and try 1 or more SQL queries to answer the request from the Database Administrator provided activity. Once again we try on an approach easy to understand with a real world use case. Do not hesitate to post a comment to discuss about it. Context reminder Using your […]

DBA – Select Statement exercise 4 – Group By

DBA Database SQL

Yet another SQL exercise in the series using the same context data. This one is getting a bit more in depth in the business field, you might encounter such use case if you plan on making statistics about your students… You will again practice on a select statement with a group by clause. Context Please […]

Dockerize LAMP

Let’s produce a docker-compose file to let a full website run from on any of your machines ! Actually more precisely we will prepare a docker compose file so we can test some web resources real quick and not only WordPress, Drupal, Magento… ! Checkout the features covered : Docker Compose Apache Mysql Php Virtualhosts […]

DBA – Solution to exercise 3

Today we solve the exercise 3 by introducing a select statement and sharing our analyse with some arguments. I assume that you already loaded the context data in order to try the query.  The solution Let’s say that we only know about the name of the discipline to compute the query. This way we need […]

DBA – SQL SELECT QUERY – EXERCISE 3

Following the DBA exercise 2, we continue the series with a new SQL select statement to compute. Context You will use the same data for this training exercise, you can also reuse the index you’ve likely introduced if you have been through the solution. Request Let’s say I want to retrieve the 3 best students […]

DBA – SQL select query – solution to exercise 2

Step by step we will solve the problem to the DBA exercise 2 I assume you’ve successfully loaded all data in your environment. Analyse We have 3 tables and we need to build a query which rely on fields present across all of them.  Obviously there is a need to make some SQL joins as […]

DBA – SQL Select query – Exercise 2

Following the exercise 1 on sql update, today we introduce a new problem to train yourself on a select query. The context provided will be valid for the 4 next exercises. Context 3 SQL tables with some relation which you can create using the below scripts. Student table Discipline Exam score Note : As of […]

DBA SQL Update – Solution to exercise 1

SQL Update exercise

Let’s answer the first exercise you have been working on (DBA SQL Update exercise). Before any update, you may use a SQL select query if you are not sure and with even more safety and furthermore if you are in production, then make a dump of your base before applying any update ! Here is […]

DBA – SQL update – Exercise 1

This it the first DBA (DataBase Administrator) exercise of a long series, in my opinion to be a better programmer, you need to practice regularly and the same affirmation stands for a DBA so I decided to introduce a new training exercise every week. Before I implement a fully working interface to make you benefit […]

Transfer wordpress posts from one database to the other

Sometimes you need to access your WordPress database in order to modify things quickly and “dirtily” you could use a plugin but when you enjoy dealing with source code without worrying about installing any third part applications, why not just doing it ! Where are our posts inside our WordPress Database ? Get yourself onto […]

One to one relationship using Zend 3 and Doctrine 2

One 2 One relationship

Using Doctrine 2 annotations in a Zend project requires us to design our database model at first then we are integrating ou entities which themselves are instantiated within services. Today we are going to implement a simple example of using a One to one relationship using Doctrine and Zend 3. Example of a One2one relationship […]

On demand doctrine database switch with Zend 3

Configuration sequence - Zend 3

When working on different database with Zend, you may load defined parameters from your local configuration files depending on the action you need to trigger. In the case you need to load a database which is defined by a specific environment for instance from a session data, you need to update your configuration inside your […]

Zend script to create tables on demand

create table on fly with zend 3

When you are working on a large project like a CMS system, you provide different kind of modules and you allow the end user to enable or disable certain modules depending on his needs. There are different way of achieving this : You create the whole database with all tables in it, giving the possibility […]

Creating a Database using Zend 3 and Doctrine2

Database creation - Doctrine & ZF3

Let’s say we need to create a database on the fly and use it within our Zend 3 project. Typically you will create the database then store the credentials within your global or local php config file in your autoload directory. But this time we do need to create a second database which name depends […]

Bulk prices update of Magento2 products using Mysql

Sometimes, you need to update a whole list of products at once and to achieve this in Magento 2, you can come up with the following ideas : using a module, exporting/importing updated products, any manual method hitting through the right Mysql tables Now depending on your skills, you might choose one option over another […]

Want more information?

Related links will be displayed within articles for you to pick up another good spot to get more details about software development, deployment & monitoring.

Stay tuned by following us on Youtube.