This week we'll show you how you can not only interact with the AI in a playful way using the Game Play Pattern, but also bring out your creative side.
What can you expect? Instructions on how to develop your own games with AI or immerse yourself in an interactive game. And best of all: two additional creative impulses provide even more variety in your everyday AI life.
This is how it works:
- Create a game around X - Choose a theme and let the AI develop a game from it.
- We are playing an X game - Define the basic rules and interact with the AI in the course of the game. The AI asks questions until a defined condition (Y) is fulfilled or the desired goal (X) has been achieved.
Example: "Create a SQL game for me to write a very large SQL insert statement in Java code that is as performant as possible. Describe what the SQL statement should do and how I can wander through an SQL world to find different statements that I can merge into one big one. Start with one part of the statement and then ask me what action I want to take."
Answer (note: the game may take a little longer - have fun discovering!):
Journey to the SQL market
You travel to the SQL market, a busy area full of databases and tables. Here you can collect additional values for your insert statement.
Once on the market, you have the following options:
- Buy product data: Find new product values that you can add to your insert statement.
- Meet the SQL master: Learn from an experienced SQL master how to efficiently design insert statements.
- Explore the market stalls: Search various stands for useful SQL fragments and tips.
Choose your next action:
- Buy product data
- Meet the SQL master
- Explore the market stalls
Please enter the number of your choice.
User input: "1"
Journey to the SQL market
You travel to the SQL market, a busy area full of databases and tables. Here you can collect additional values for your insert statement.
Once on the market, you have the following options:
- Buy product data: Find new product values that you can add to your insert statement.
- Meet the SQL master: Learn from an experienced SQL master how to efficiently design insert statements.
- Explore the market stalls: Search various stands for useful SQL fragments and tips.
Choose your next action:
- Buy product data
- Meet the SQL master
- Explore the market stalls
Please enter the number of your choice.
User input: "2"
Meeting with the SQL master
You go to a small hut on the edge of the market where the SQL master lives. The master welcomes you and offers you valuable advice on how to make your insert statements more efficient.
The SQL master says: "An efficient insert statement can be improved by several techniques. Here are some that might help you:"
- Batch inserts: Instead of making many individual inserts, you can combine several values in a single insert statement.
- Prepared Statements: Use prepared statements to increase performance and security.
- Indexes: Make sure that your tables are well indexed to increase the insertion speed.
Now let's look at an example of a batch insert statement:
INSERT INTO products (product_id, product_name, category, price, created_at) VALUES (1, 'Product A', 'Category 1', 10.99, NOW()), (2, 'Product B', 'Category 2', 12.99, NOW()), (3, 'Product C', 'Category 3', 15.99, NOW());
The master hands you this example and says: "You can expand this to include more products at once. Which technique would you like to explore next?"
- Learn more about batch inserts
- Learn more about Prepared Statements
- Deepen your knowledge of indexing
- Return to the SQL market
Please enter the number of your choice.
User input: "1"
Learn more about batch inserts
The SQL master explains the advantages and details of batch inserts.
"Batch inserts allow you to insert multiple records in a single SQL command, which reduces the number of database transactions and can significantly improve performance. Here is an advanced example of how you can use batch inserts in your Java code:"
Sample code in Java for batch inserts
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException;
public class BatchInsertExample {
private static final String DB_URL = "jdbc:mysql://localhost:3306/your_database";
private static final String USER = "your_username";
private static final String PASSWORD = "your_password";
public static void main(String[] args) {
String insertSQL = "INSERT INTO products (product_id, product_name, category, price, created_at) VALUES (?, ?, ?, ?, ?)";
try (Connection conn = DriverManager.getConnection(DB_URL, USER, PASSWORD);
PreparedStatement pstmt = conn.prepareStatement(insertSQL)) {
conn.setAutoCommit(false); // Disable auto-commit for batch processing
// Add multiple inserts to the batch
pstmt.setInt(1, 1);
pstmt.setString(2, "Product A");
pstmt.setString(3, "Category 1");
pstmt.setDouble(4, 10.99);
pstmt.setTimestamp(5, new java.sql.Timestamp(System.currentTimeMillis()));
pstmt.addBatch();
pstmt.setInt(1, 2);
pstmt.setString(2, "Product B");
pstmt.setString(3, "Category 2");
pstmt.setDouble(4, 12.99);
pstmt.setTimestamp(5, new java.sql.Timestamp(System.currentTimeMillis()));
pstmt.addBatch();
pstmt.setInt(1, 3);
pstmt.setString(2, "Product C");
pstmt.setString(3, "Category 3");
pstmt.setDouble(4, 15.99);
pstmt.setTimestamp(5, new java.sql.Timestamp(System.currentTimeMillis()));
pstmt.addBatch();
// Execute batch insert
int[] affectedRecords = pstmt.executeBatch();
conn.commit(); // Commit transaction
System.out.println("Inserted records: " + affectedRecords.length);
} catch (SQLException e) {
e.printStackTrace();
}
}
}
The master adds: "Batch inserts can dramatically improve performance, especially if you insert a lot of data sets. Remember to deactivate the auto-commit function and reactivate it after batch execution."
Now you have the opportunity to continue learning or undertake other activities:
- Learn more about Prepared Statements
- Deepen your knowledge of indexing
- Return to the SQL market
- Visit another region: index island, performance summit or connecting bridge
Please enter the number of your choice.
etc......
Creative suggestions for your prompts
Make your prompting even more versatile and exciting! This week we have prepared two creative inspirations for you that will take your interaction with AI to a new level:
Language style
Immerse yourself in the world of philosophy. Make your prompts profound and thought-provoking - perfect for exploring complex topics in a fascinating way.
Describe to me what a database is.

Describe to me philosophically what a database is.

Style: Fauvism
Unleash the vibrant energy of Fauvism and ask the AI for something expressive: "Create a picture of the "SQL Master" in the style of Fauvism" This creates works that impress with bold colors and emotional intensity and reinterpret reality in intense tones.
Create a picture of the "SQL master"

Create a picture of the "SQL master" in the style of Fauvism

Pro tip:
To ensure that your images are displayed in the long term, save them in a format such as PNG after downloading. This will prevent them from no longer being displayed after some time.
The Play Pattern game offers you a fun and inspiring way to discover complex topics and immerse yourself in exciting scenarios. Whether professionally or privately - it is an entertaining way to expand your knowledge and open up new perspectives.
The styles presented add creativity to your prompting and ensure results that are even more targeted and suitable for your applications.
For even more ideas and further patterns, take a look at our blog posts on the topic of AI. Try it out, experiment and let us know how you use the Game Play Pattern and the creative styles for yourself - we look forward to hearing about your experiences.
Further AI prompts:
What is a prompt and how does a pattern work?
A prompt is a simple task that you give the AI to get a specific answer. To make the answers of the artificial intelligence more consistent and targeted, we use so-called patterns. A pattern is a recurring formulation that helps the AI to respond in a structured and targeted manner. It's like a little recipe that helps you achieve the desired results.
https://www.vanderbilt.edu/generative-ai/prompt-patterns/ https://www.superside.com/blog/chatgpt-prompts



