SPECS


Modern Databases


Current SQL Related Databases


My most modern and capable development stack to date.


Databases have changed a bit over the years. From the speed and recordset handling of relational databases such as MySQL in typical LAMP stacks, to the power of modern vector capable databases. These databases have alway held the lead for speed, reliability and function; Hence securing a place in my list of favorite databases to work with.

Modern Databases


More Databases


Database Managers



-- MySQL/MariaDB/PostgreSQL/SQLite

-- Create a new database
CREATE DATABASE Bookstore;

-- Switch to the new database context
USE Bookstore;

-- Create the books table
-- MySQL/MariaDB
CREATE TABLE books (
    book_id INT AUTO_INCREMENT,
    title VARCHAR(100) NOT NULL,
    author VARCHAR(100),
    published_year INT,
    price DECIMAL(5, 2),
    PRIMARY KEY (book_id)
);

-- PostgreSQL
CREATE TABLE books (
    book_id SERIAL PRIMARY KEY,
    title VARCHAR(100) NOT NULL,
    author VARCHAR(100),
    published_year INT,
    price NUMERIC(5, 2)
);

-- SQLite
CREATE TABLE books (
    book_id INTEGER PRIMARY KEY AUTOINCREMENT,
    title TEXT NOT NULL,
    author TEXT NOT NULL,
    published_year INTEGER,
    price REAL
)

-- Populate the table with books
INSERT INTO books (title, author, published_year, price) 
VALUES 
('Ulysses', 'James Joyce', 1922, 8.99),
('The Hobbit', 'J.R.R. Tolkien', 1937, 14.99),
('1984', 'George Orwell', 1949, 9.99),
('The Adventures of Ulysses', 'Bernard Evslin', 1969, 11.99),
('The Great Gatsby', 'F. Scott Fitzgerald', 1925, 10.50);

-- Retrieve all books published from 1924 to 1954, cheaper than $12, sorted by price (lowest first)
SELECT title, author, published_year, price FROM books 
WHERE price < 12.00 AND published_year BETWEEN 1924 AND 1954
ORDER BY price ASC;

-- Retrieve the most recently published book with 'The' in the title
SELECT title, author, published_year, price FROM books 
WHERE title LIKE 'The %' 
ORDER BY published_year DESC LIMIT 1;


title author published_year price
1984 George Orwell 1949 9.99
The Great Gatsby F. Scott Fitzgerald 1925 10.50


title author published_year price
The Adventures of Ulysses Bernard Evslin 1969 11.99


Social Media




---
title: Modern Databases
text: Current SQL Related Databases
image: /assets/svg/valkey.svg
link: 
target: 
---