Today, Oracle announces the general availability of Oracle Database 23ai Free container images for Arm-based Apple MacBook computers (including the latest M4 chip). This announcement rounds out our suite of free, developer-friendly offerings of Oracle Database 23ai joining previously available versions for Linux and Windows.
Mac developers can now build apps locally using Oracle Database 23ai’s AI Vector Search capabilities, solve object-relational mismatch with JSON Relational Duality Views, —and do all this while having a FaceTime call with their friends, recording and rendering videos in iMovie, or practicing their guitar skills in GarageBand.
Oracle Database 23ai Free available on the most popular operating systems
Regardless of your choice of laptop or desktop OS – Windows, Linux, and now macOS you can download Oracle Database 23ai Free container images and automatically spin up your own instance. Once installed, you can use your customized local development environment and the tools of your choice to build applications that take advantage of the AI capabilities in Oracle Database 23ai.
Meeting Mac developers where they are
MacBooks have been a popular platform choice by developers for years, with a Stack Overflow survey ranking macOS as the #2 operating system used by developers. Windows is #1.
Due to the increasing demand to alleviate developers from relying on emulation software, Oracle ported its latest AI-infused offering Oracle Database 23ai Free to the Arm architecture and created Arm-based container images that can run natively on MacBooks. With these images, Mac developers can spin up Oracle Database 23ai Free inside a container on their M-chip-based MacBooks in just a few seconds and leverage the full power of Oracle Database 23ai Free to build cutting-edge software with the world’s leading database technology.
Oracle Database 23ai Free container images for Arm-based Apple MacBook computers not only bridge the gap for Mac developers but also deliver a brand new state of mind.
Get started with Oracle Database 23ai Free today
To get started (using Docker here as an example), simply use the following command, replacing “<your-password>” with the password you want to use for the Oracle Database SYS and SYSTEM users:
docker run --name oracle-free -p 1521:1521 -e ORACLE_PWD=<your-password> container-registry.oracle.com/database/free:latest-lite
For example: ouser@ouser-mac ~ % docker run --name oracle-free -p 1521:1521 -e ORACLE_PWD=OracleIsAwesome container-registry.oracle.com/database/free:latest-lite
Expanding oracle data
/home/oracle
Starting Oracle Net Listener.
Oracle Net Listener started.
Starting Oracle Database instance FREE.
Oracle Database instance FREE started.
Pluggable Database FREEPDB1 opened.
SQL*Plus: Release 23.0.0.0.0 - Production on Thu Nov 7 20:33:37 2024
Version 23.5.0.24.07
Copyright (c) 1982, 2024, Oracle. All rights reserved.
Connected to:
Oracle Database 23ai Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
Version 23.5.0.24.07
SQL>
User altered.
SQL>
User altered.
SQL>
Session altered.
SQL>
User altered.
SQL> Disconnected from Oracle Database 23ai Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
Version 23.5.0.24.07
#########################
DATABASE IS READY TO USE!
#########################
Once your container log shows “DATABASE IS READY TO USE!”, you can connect with your favorite tool or programming language directly from your Apple MacBook computer, for example, with Oracle SQLcl:
ouser@ouser-mac ~ % sql system/OracleIsAwesome@localhost:1521/freepdb1
🔄 Checking SQLcl version...
✅ SQLcl is current.
🚀 Launching SQLcl...
SQLcl: Release 24.3 Production on Thu Nov 07 12:34:52 2024
Copyright (c) 1982, 2024, Oracle. All rights reserved.
Last Successful login time: Thu Nov 07 2024 12:34:53 -08:00
Connected to:
Oracle Database 23ai Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
Version 23.5.0.24.07
SQL 🚀 > SELECT 'Hello Mac World!';
'HELLOMACWORLD!'
___________________
Hello Mac World!
SQL 🚀 >
Code Snippets
Sample Java code from an Oracle Database Vector Search example in the Oracle Database GitHub repository –
static String pipelineSearchQuery(Connection connection, float[] embedding)
throws SQLException {
try (
PreparedStatement query = connection.prepareStatement(
"""
SELECT text
FROM example
ORDER BY VECTOR_DISTANCE(embedding, ?, COSINE)
FETCH APPROX FIRST 1 ROW ONLY
"""
)) {
// Bind an embedding as VECTOR data
query.setObject(1, embedding, OracleType.VECTOR);
// Execute a pipelined SQL query
Flow.Publisher<OracleResultSet> queryPublisher =
query.unwrap(OraclePreparedStatement.class)
.executeQueryAsyncOracle();
// Block for Publisher completion
ResultSet resultSet = join(queryPublisher);
// Return the similarity search result
resultSet.next();
return resultSet.getString(1);
}
}
Sample Python code from an example showing how to take advantage of the JSON Relational Duality Views capability in Oracle Database 23ai –
with connection.cursor() as cursor:
# Insert a new book and author into the Duality View and show the resulting
# new records in the relational tables
data = dict(
_id=101,
book_title="Cooking at Home",
author=dict(author_id=201, author_name="Dave Smith"),
)
inssql = "insert into BookDV values (:1)"
if connection.thin or client_version >= 21:
# Take advantage of direct binding
cursor.setinputsizes(oracledb.DB_TYPE_JSON)
cursor.execute(inssql, [data])
else:
# Insert the data as a JSON string
cursor.execute(inssql, [json.dumps(data)])
print("Authors in the relational table:")
for row in cursor.execute(
"select * from SampleJRDVAuthorTab order by AuthorId"
):
print(row)
print("\nBooks in the relational table:")
for row in cursor.execute(
"select * from SampleJRDVBookTab order by BookId"
):
print(row)
Learn more about Oracle Database 23ai
Gerald Venzl is the Lead Product Manager of Developer Initiatives, Oracle Database technologies. During his career, Gerald has worked as a Developer, DBA, Performance Engineer, Software Architect, Consultant, Enterprise Architect and Distinguished Product Manager before his current role. He is still active as a developer in his free time and on open-source projects. This allowed Gerald to live several different lives in the IT sector, providing him with a solid understanding of the concerns in these respective areas while gaining a holistic view overall. Gerald focuses on advocating how to build systems that offer flexibility yet still meet the users' needs. He is also a member of the ISO SQL Standard committee and a CNCF Ambassador.
Next Post