MySQL

Data Model
https://pupli.net/2017/05/21/data-model/

Store the result of query into a variable
https://pupli.net/2017/05/06/store-the-result-of-query-into-a-variable-in-mysql/