Collaborative Filtering in MySQL: A Tutorial

What is Collaborative Filtering?

Being able to view products and pages liked by other users is not only an interesting exercise, but also a nearly ubiquitous marketing tool — and, it can be easily implemented with MySQL using Arctype.

Nearly every dynamic website uses collaborative filtering to maximize users' exposure to a wider range of potentially relevant content.  You've seen it on Amazon:

Setting Up a CrateDB Cluster With Kubernetes to Store and Query Machine Data

Because of its horizontally scalable shared-nothing architecture, the CrateDB open source database is well-suited for working with Kubernetes. Setting up a CrateDB cluster with Kubernetes can be done in just a few steps, and scaling up and down is straightforward – making the cluster particularly flexible. This step-by-step tutorial will show you how to get CrateDB and Kubernetes working together.

CrateDB is used for real-time machine data processing, monitoring, and analytics. The open source database is suited for applications with high volumes of machine data (like anomaly detection), log data (like ecommerce), network data (like capacity planning), and IoT/IIoT data (like smart manufacturing, smart home products, and fitness gear). However, this database is probably not what you want to use if you require strong (ACID) transactional consistency or highly normalized schemas with many tables and joins.

Using N1QL With Couchbase Eventing Functions

"Now, this is not the end. It is not even the beginning of the end. But it is, perhaps, the end of the beginning." — Winston Churchill

Updating data is usually not the end, but usually progress of a workflow. Shipping follows ordering; inventory update follows shipping; adjusting credit follows returning; The next step in the process is required to act to keep the workflow going. The workflows can be simple with few steps or complex with hundreds of steps. Business Process Management (BPM) is an industry by itself.

Couchbase 5.5 introduced Evening service. Developers can write a Javascript function to execute upon a change to the data. We refer to inserts, Updates, Merges, and Deletions together as mutations. Multiple specific use cases have been documented for developing these eventing functions.

Clean up Your WordPress Database With SQL (2019 Guide)

After years of usage, your WordPress database can contain weird characters, be filled with data you don't need anymore, and so on. In this article, you will learn about SQL queries to clean up your WordPress database.

Two things to note: First, any of these queries should be preceded by a backup of your whole database. Secondly, don't forget to replace the wp_ table prefix by the prefix used on your WordPress website install, otherwise, the queries won't work.

On Types and Transactions

Transactions in any database are intimidating. It requires a level of understanding beyond just what is stored, but also when it is stored. Unlike the happy world that results when countless layers of abstraction can shield you from complexity, transactions require you to go deeper. Redis is not unusual in this regard. In fact, its entirely different way of thinking about transactions causes a lot of people to say it doesn't have transactions at all. Redis has them, just with an approach that's totally different from the rollbacks you've probably grown up with.

To view transactions at 10,000 ft, you have to understand a few things about Redis. One is that it is single-threaded (well, with a list of exceptions that is perhaps continuing to grow). This means that if it's doing something, that's all it's doing. Of course with Redis, "doing something" is best measured in milli- or nano-seconds. Second, keep in mind that Redis has tunable durability, with some options providing very good durability and some that are totally ephemeral. This obviously has an effect on transactions. Third, it lacks rollbacks but can fail a transaction if a key changes before it starts. This inverted way of controlling transactions lets you pull data back to the client, and evaluate it logically to ensure that the data did not change before the transaction started.

Counting Distinct Users in Real-Time With Redis Using Low Memory

If you are developing an event-based application that handles many requests from different users, you most likely want to count distinct user action within a sliding window or a specified time range.

One of the quickest ways to count distinct user is to prepare an SQL like SELECT count(distinct user) from ACTION_TABLE. But, this might be expensive if there are millions of records produced in real time.

PL/SQL — Don’t Mix and Match Scope

In this article, we find out why you shouldn't mix and match scope. Here's a simple little PL/SQL block where we call an inner procedure PARAMETER_TESTER from its parent block. Pay particular attention to the parameter we pass to the procedure and its value throughout the execution of that procedure.

SQL> set serverout on
SQL> declare
  2
  3     glob_var  int := 0;
  4     local_var int;
  5
  6     procedure PARAMETER_TESTER(param int) is
  7     begin
  8         dbms_output.put_line('Param came in as: '||param);
  9         glob_var := glob_var + 1;
 10         dbms_output.put_line('Param left as   : '||param);
 11         dbms_output.put_line('glob_var is now : '||glob_var);
 12     end;
 13
 14  begin
 15     parameter_tester(100);
 16  end;
 17  /
Param came in as: 100
Param left as   : 100
glob_var is now : 1

PL/SQL procedure successfully completed.

Now I'll slowly extend the code, and just by eyeballing it, see if you can predict what the output will be before looking past the end of the PL/SQL block.

How to Deploy and Host a Joomla! Website on Alibaba Cloud ECS

Joomla! is a free and open-source content management system (CMS) and is one of the most popular website hosting software. According to the official website, Joomla! is built on a model-view-controller web application framework that can be used independently of the CMS, allowing you to build powerful online applications.

One of my personal favorites of Joomla! is the multi-language support with its large library of language packs. You can also translate the website admin backend with language extensions, helping you to easily localize your website.

Specify Named Parameters Using the NamedParameterJdbcTemplate

In this article, we will cover how to use NamedParameterJdbcTemplate in a Spring boot application connected to a Postgres Database at the backend. We will be inserting, updating, and deleting employees from Postgres DB using NamedParameterJdbcTemplate. Just to keep the design appropriate, I have separated the dao, service, and controller. Service is just a pass-through in this article.

Overview

NamedParameterJdbcTemplate is a template class that allows a basic set of JDBC operations. It has an underlying classic JdbcTemplate, which allows running native SQL queries with '?' placeholders in execution time for prepared statements. NamedParameterJdbcTemplate implements NamedParameterJdbcOperations interface and holds the reference of JdbcTemplate object in JdbcOperations interface.