Latest Posts

Oracle expands MySQL with support for JavaScript

Written by James Adams

MySQL Support for JavaScript

Oracle's MySQL recently incorporated JavaScript-stored programs for developers to write functions directly in the database.

Oracle has expanded the capabilities of its MySQL database by introducing support for JavaScript-stored programs. This update, announced in December 2023, allows developers to write JavaScript functions and procedures directly within the MySQL database server.

According to Oracle, several factors make JavaScript a compelling choice for MySQL developers. These include its straightforward syntax, compatibility with modern language features, and access to a vast library of reusable code modules.

The company envisions that the integration of JavaScript will position MySQL as a preferred database for JavaScript developers.

Exploring JavaScript on MySQL

MySQL, a widely used open-source relational database management system (RDBMS), employs Structured Query Language (SQL) for web applications across various platforms. Renowned for reliability and scalability, it's integral to the LAMP stack and favoured by major tech players like Meta and Netflix.

The recent additions of JavaScript-stored programs within MySQL will be powered by GraalVM, a high-performance runtime environment. This powerhouse combines a JDK, diverse language support (JavaScript, R, Python, Ruby, Java), and both just-in-time (JIT) and ahead-of-time (AOT) compilation capabilities. It also offers a secure, managed virtual machine and top-notch tooling.

This release supports JavaScript syntax based on the ECMAScript 2021 standard stored procedures and functions. It also offers compatibility with a diverse range of MySQL data types, including various integer and floating-point formats, along with CHAR and VARCHAR types.

According to Oracle, JavaScript's integration into MySQL offers the highest standards of security, isolation, and data protection. This is achieved through reliance on Oracle's industry-proven GraalVM security framework.

Key features include:

  • VM sandboxing: Effectively safeguards against malicious code potentially compromising other MySQL server modules.
  • Strict isolation: Every stored program is executed within its secure context.

JavaScript-stored programs seamlessly build on MySQL's existing privilege model. This means only authorised users can create these programs, with further restrictions on who can access and execute them. This layered approach allows for tailored permissions, enabling users to define programs that can be used by others without compromising security.

Developers eager to explore MySQL-JavaScript can access a preview version in MySQL Enterprise Edition, available for download through the Oracle Technology Network (OTN). The functionality is also included in MySQL's Heatwave cloud service, accessible across Oracle Cloud Infrastructure (OCI), AWS, and Microsoft Azure.

Upskill your career with SQL

SQL based database management in programming is an in-demand skill. It empowers users to navigate and manipulate relational databases, aiding companies in managing structures, creating targeted queries, and transforming raw data into meaningful visualisations. Its prominence as a part of the programming landscape makes it a valuable part of a developers arsenal for a rewarding career.

In the UK, SQL developers can earn £46,942 annually on average. However, top earners can bag up to £60,000 annually. Beyond base pay, expect additional cash compensation ranging from £1,173 to £4,812, with an average of £2,375. This makes SQL expertise a rewarding career choice in the UK's data-driven landscape.

While it's not mandatory to be well-versed in other programming languages for SQL proficiency, having a basic understanding of programming concepts is beneficial, especially if you are looking to exploit the use of JavaScript whilst using a SQL based language, whether this be SQL, MySQL or PostgreSQL.

Throughout our Software Development course, students will focus on HTML/CSS, JavaScript. React, Next.js and PostgreSQL. If you are looking for a bootcamp that offers PostgreSQL as part of the syllabus, and a solid introduction to SQL based databases, look no further. Learning JavaScript and PostgreSQL, especially for web development, can be crucial, as it remains a popular and accessible language worldwide. Both serve as a foundational language and in combination introduces beginners to both front-end and back-end development, making it an ideal entry point for coding novices.

About the Author

James has 8 years with Fortune 200 US firm ITW, experience of managing projects in China, USA, and throughout Europe. James has worked with companies such as Tesco, Vauxhall, ITW, Serco, McDonalds. James has experience in supporting start-up and scale up companies such as Readingmate, Gorilla Juice and Harvest London. James completed his MBA at the University of East Anglia in 2018.

Similar Posts: