SQL: derived tables
In some contexts, it is necessary to compute intermediate results on which we then perform further operations, such as filtering, grouping, and calculating aggregate measures. The SQL language allows us to do this through the definition of derived tables, that is, SELECT statements defined within the FROM clause. Through some examples we will discover how to use them appropriately.
SELECT: set operators
Sometimes we need to operate on the results of several queries as if they were sets. We do not have to use a programming language to do these operations on the data, but we can use constructs from the SQL language. The operators available allow us to both join and exclude the results two sets, as well as define the intersection. With some examples we will understand how to use these constructs appropriately.
SELECT: NOT IN operator and tuple constructor
In some cases there is a need to exclude one set of values from another set. The SQL language allows us to exclude values to be excluded returned by a nested query using the NOT IN operator. Where the elements to be excluded are identified by a set of attributes we can use the tuple constructor. With some examples we will understand how to use these constructs appropriately.
SELECT: IN operator
In some cases writing SQL queries can be really complex. The divide and conquer strategy, always turns out to be successful because it allows us to merge the results of two or more queries. We have, however, the need to use special constructs. By means of nested queries and in particular of the IN operator this operation is simple and intuitive.
SELECT: query with JOIN and GROUP BY
Relational databases are based on modeling that divides the concepts we want to represent into different tables. However, when we use them in real application contexts we have to reconstruct these operations and sometimes define subsets of data to calculate statistics. How can we do this in the SQL language? By means of the JOIN and GROUP BY clauses! Let’s find out how to write them through practical examples.
SELECT: simple query structure
The SELECT statement in the SQL language is perhaps the most widely used as it allows us to retrieve information of interest from the database. Its syntax is simple and well-structured, but we need to know some constraints behind each clause of the statement. By means of some examples we will discover how to write queries that are simple but at the same time useful in a real context.
SQL: transactions and data manipulation
Databases provide a great tool for storing large masses of data. But how do we write the data correctly into it? Are there mechanisms to ensure that we get the data right? Let’s find out what transactions and their properties are, as well as basic commands for manipulating data.
SQL: creating a database
Relational databases play a key role in the design and development of any software application. Learning how to model and query a database in addition to properly manipulating data using the SQL language is within everyone’s reach. Let’s start by discovering some features of this language through the instructions for creating a database and defining its constituent tables.
Firebase: how to integrate a real-time database in Python
Firebase is a Google Cloud product that can. be used to build web applications quickly and easily. Among its features is the ability to create a NoSQL realtime database. Let’s find out how to interact with the database in a python program.
MongoDB 6.0: new features to improve applications
The new version of MongoDB provides new features to both improve the efficiency of some operations and increase developer productivity. Switching, therefore, to MongoDB 6 is an excellent choice!!!