Are you making these 3 database design mistakes?
Using string data types for everything
Inconsistent naming
Aiming for a perfect design from the start
Ben Brumm explains why and what to do instead
Are you making these 3 database design mistakes?
Using string data types for everything
Inconsistent naming
Aiming for a perfect design from the start
Ben Brumm explains why and what to do instead
Define schemas to validate #JSON data in Oracle AI Database
CREATE TABLE ... ( col JSON VALIDATE USING '{ <schema> }' )
You can use this to check
If the JSON is an object or array
The name & type of attributes
Constraint their values
Anas Darkal demos buff.ly/n30C2Dx
Block #SQL injection attempts on Oracle AI Database with the SQL Firewall
This captures a list of permitted statements
The database can then reject statements not on this list, keeping your data safe
@cafedatabase.com shows how it works (in Spanish)
Data Use Case Enumeration Domains (23.4) Create lists of name-value pairs Names are identifiers, values are literals. You can omit the value, first = 1, then 2, 3, etc. Query enum domains as a table to return the list of values Example days_of_week enum
Use enum domains in Oracle AI Database to create lists of name-value pairs:
CREATE DOMAIN ... AS ENUM ( n1, n2, ... )
With these you can
Use the enum as a column's data type to constrain it to the enum's values
Reference the values by name in #SQL
Query the enum like a table
SQuizL for 27 Feb 2026. Guess the SQL statement in the top left which ends "pokemon_trainers" using the clues provided below.
Stretch your #SQL skills with #SQuizL
A free guess the SQL statement quiz
Every day there's a new Oracle SQL statement to solve in six tries or less
Pick from the fragments below to complete the statement on the top left
Can you get it in one?
buff.ly/hpGFuBa
Do semantic search in Oracle AI Database with the VECTOR data type
@adrian.fuzziebrain.com shows you how to
Load a pre-trained LLM model into the database
Vectorize your data with VECTOR_EMBEDDING
Build an APEX app to do AI Vector search
Giving on database user read access to all the tables in another schema is a common need
Granting this access for every table is a chore
Oracle AI Database 26i simplifies this with
GRANT SELECT ANY TABLE ON SCHEMA ... TO ...
Diana Robete explains
In Oracle AI Database 26ai you can set transaction priority:
ALTER SESSION SET txn_priority = { high | medium | low }
When a low priority transaction blocks one with a higher priority, the database can force the lower one to rollback
Gavin Soorma demos buff.ly/K6cZocb
Partition by expression (23.26.1) Use an expression directly in the PARTITION BY clause Example of composite list-range partitioning using expressions upper ( country ) and ( quantity * unit_price )
Want to partition by an expression in Oracle AI Database?
e.g. UPPER ( col )
You can partition on virtual columns containing the expression
From 23.26.1 you can put the expression directly in the PARTITION BY clause
CREATE TABLE ... ( ... ) PARTITION BY ... ( UPPER ( col ) )
SchemaWars homepage - Battle on Oracle SQL & PL/SQL
Test your Oracle #SQL and PL/SQL skills in solo, versus, or tournament battles in
SchemaWars
An online platform with coding challenges by Morten Egan
Work on real schemas, enter your solution, and see your score!
buff.ly/c8Rkvq9
Graph queries enable you to find
Paths and patterns (e.g. flow of money transfers)
Clusters of data
Do this in Oracle AI Database by creating property graphs and querying them with
SELECT * FROM GRAPH_TABLE ( <graph> MATCH ... )
Karin Patenge demos buff.ly/RxCMHZj
Data usecase domains in Oracle AI Database enable you to describe values
e.g. rules for storing, showing, & sorting phone numbers
CREATE DOMAIN phone# AS ...
CHECK ...
DISPLAY ...
ORDER ...
@dbamarco.bsky.social shows how linking these to columns applies the rules
With #JSON duality views in Oracle AI Database you can build a JSON interface over database tables
These come with lost-update detection via ETags
@martindba.bsky.social shows how this prevents conflicting writes for REST calls by using the if-match header
DATEDIFF & TIMESTAMPDIFF (23.26.1) Get the number of unit boundaries crossed (YEAR down to NANOSECOND) between two datetimes Set start of YEAR, QUARTER, & WEEK with the fourth parameter Examples of the diff between dates for various units
Count the unit boundaries crossed between two datetimes with
DATEDIFF ( <unit>, <dt1>, <dt2> )
Note it's the boundaries crossed, not the duration
e.g. 31-Dec-2025 to 2-Jan-2026 crosses the 1st Jan boundary
=> the year diff = 1
Added to Oracle SQL in 23.26.1
A SQL statement finding the top three assertions use cases
Calling #OracleACE: we want your assertion use cases!
Weβre opening a bounty for creative, real-world solutions using assertions
Submit your blog post, video, script or slide deck the contribution app by the end of 15 March
Full details at buff.ly/fNgDHQv
Think you know about #SQL performance?
Take this 3-minute indexing quiz by @winand.at
A simple test that 60% fail!
buff.ly/5C4XZ7N
Did you pass? Let us know how you did!
Struggling to remember which #SQL statements you just ran?
Set
sql_history_enabled = true
in Oracle AI Database 26ai and it records the last 50 statements in each session
Query v$sql_history to find them
@brendan-tierney.bsky.social demos
Understanding a complex data model is challenging
@connormcd.bsky.social explains how you can make this easier in Oracle AI Database with
Constraints to improve data quality
Usecase domains to describe values
Schema annotations to add metadata
MERGE in Oracle AI Database 26ai supports the RETURNING clause:
MERGE INTO ...
USING ...
ON ( ... )
WHEN ...
RETURNING OLD ..., NEW ...
INTO ..., ...
This enables you to get pre (OLD) and post (NEW) merge values from the target
@andrejsql.bsky.social demos
Filter aggregation & window functions (23.26.1) New FILTER ( WHERE β¦ ) clause to limit rows processed by COUNT, SUM, MAX, etc. Examples showing using this to filter the result of COUNT as an aggregate and window function
Limit the rows processed by aggregate and window functions with the FILTER clause
e.g.
COUNT (*) FILTER ( WHERE ... )
The COUNT only includes rows WHERE the condition is true
Each function in a query can have a different FILTER
Available in Oracle AI Database from 23.26.1
ICYMI
Oracle AI Database 26ai Enterprise Edition, 23.26.1.0.0, is available for on-premises download on Linux x86-64 platforms
@mikedietrichde.com shows you where to get it
Oracle AI Database 26ai added operators for sounds like/similar to logic:
Sounds like => PHONIC_ENCODE ( <algorithm>, <str> )
Similar to => FUZZY_MATCH ( <algorithm>, <str1>, <str2> )
These help you find related strings
@oraclebase.bsky.social demos
The QUALIFY clause enables you to filter rows using window functions
e.g. get the top ranked rows with
SELECT ... FROM ...
QUALIFY RANK () OVER ( ORDER BY ... ) = ...
@danischnider.bsky.social looks at how it works in Oracle AI Database 26ai
AI vector search enables you to find rows based on meaning
e.g.
βToys for big dogsβ can match βHeavy Duty Rope for Large Dog Breedsβ
@alina-yurenko.bsky.social shows how to build this with GraalVM, Spring Boot, and Oracle AI Database
Assertions (23.26.1) Declare cross-row, cross-table constraints with simple SQL Use existential ([NOT] EXISTS) expressions to define rule Example creating an assertion ensuring that an employee can't have overlapping start-end dates in their job history
Assertions (23.26.1) Declare cross-row, cross-table constraints with simple SQL New universal expressions (ALL-SATISFY) as a clearer way to express rules that apply to every row Example creating an assertion ensuring that an employee can't have overlapping start-end dates in their job history
Create cross-row, cross-table constraints in Oracle AI Database (23.26.1) with
CREATE ASSERTION ... CHECK ( <rule> )
Define the rule as either an
Existential expr
[ NOT ] EXISTS ( <query> )
Universal expr
ALL ( <query> ) alias SATISFY ( <condition> )
It's amazing what you can do with #SQL
Patrick has built a SQL-powered Doom clone using DuckDB
Parallelizing a task can make it faster; this is different to simultaneous:
Simultaneous β Occurring, operating, or done at the same time.
Parallel β Dividing a task into smaller sub-tasks that can be executed concurrently
Ric Van Dyke discusses
The view GV$SYSMETRIC_HISTORY in Oracle AI Database shows all the database metrics available
This can be useful to help troubleshoot performance issues
@tanelpoder.com has built scripts to display these with 1-minute granularity in a tabular way
The ACID properties of database transactions help keep data consistent
But these aren't enough to stop all data errors!
Failures may cause users to keep retrying and duplicating work
Arkadiusz Chmura shows how to avoid this with effectively once processing
Caching can improve performance by bringing data closer to the client
@anders-swanson.bsky.social gives an overview of the caches in Oracle AI Database, including
Oracle True Cache
Oracle Active Data Guard
Database In-Memory
Buffer Cache
Server-Side Result Cache