Assignment A Presentation
Assignment A Presentation
Advanced Database
Assignment A
Group: Huda Ibrahim & Denis Muriuki
ORACLE MULTILINGUAL ENGINE (MLE)
Is a third generation-language routine stored in a dynamic link Multilingual Engine is a feature of Oracle Database that
library (DLL), registered with PL/SQL, and called by you to do enables the use of modern programming languages like
special-purpose processing. JavaScript for server-side procedural logic
After writing the external procedures in a third-generation The logic gets executed where the data resides, this removes
programming language, use the appropriate compiler and unnecessary data transfer over the network and can
linker to build a DLL, making sure to export the external significantly improve performance of data-intensive operations
procedures.
Special security precautions are warranted when configuring a Storing and running business rules in the database ensures
listener to handle external procedures that all applications and users follow the rules. This makes it
much easier to meet security and compliance needs.
ORACLE (MLE) FEATURES AND
DISADVANTAGES
A JavaScript module is a unit of MLE's language code stored in the database as a schema object. This means you don’t
need to manage many application servers, each with their own copy of the application; the database can handle it for
you.
JavaScript code can now be invoked in SQL and PL/SQL via mle modules or inline dynamic code.
Its being implemented using package called “DBMS_MLE” same as “DBMS_SQL”.
The contents are specific to JavaScript and can be managed using Data Definition Language (DDL) commands
Adding JavaScript to Oracle Database lets developers use existing libraries within the database or even creating new
ones easily.
It also helps people who don't know PL/SQL to begin working with the database more easily.
Multilingual parameter: A new parameter called MLE_PROG_LANGUAGES allow administrators turn the Multilingual
Engine on, off or choose specific languages to use. It can be set to ALL, JAVASCRIPT, or OFF and can be adjusted at
different levels.
If the parameter is set to OFF at CDB level, it cannot be enabled at PDB or session level. The same logic applies for PDB
and session level
DEMO ( EXEC PROC AND
MLE MODULE)
Scenario of: Creating MLE module & External Procedure to increase
employee salary by 10% and check the difference between two methods
1. Create table emp
2. Insert data in emp table
3. Create mle module & externa proc to increase salary by 10%
ChatGpt QUERIES
EXTERNAL PROCEDURES
External procedures (DLLs) are modules written in a third-generation language (C) and called
from within PL/SQL or SQL. This gives the developers the advantages of using programming
languages within the database.
This is an old feature used in oracle to support creating functions and procedures using third
generation languages externally, which means the DLL created and complied outside oracle
server and then imported to the server using PL/SQL program unit.
C compiler and linker must be installed on your system to build DLLs.
To run an external procedure, you must call the PL/SQL program unit
MYSQL FEATURES & DEMO
MySQL introduced the Multilingual Engine (MLE) feature, it is included in MySQL Enterprise
Edition MySQL 9.0, and using this feature you can make and run MySQL programs using
JavaScript language.
You can call other stored programs while using a JavaScript stored program.
You can also run a JavaScript stored program from SQL stored programs like stored
procedures, stored functions, events, and triggers. JavaScript stored programs can also call
themselves again and again.
SQL SERVER
External procedures in SQL Server can be handled using the common language
runtime which is integrated within the database itself. One can write and run stored
procedures written in .NET languages such as C# and VB.NET.
This is better than using Transact-SQL which cannot run on a client’s computer
since it is processor intensive and placing it on your database server will be
detrimental. Common language runtime (CLR) allows one to write extended stored
procedures that implement the richness of .NET libraries and its languages
DEMO ( SQL SERVER)
We write a C# code that has a public class called ClassFile1 that returns a
SQLString and calls a function FormatDateTime and entails two parameters
SQLDateTime and datetoFormat which returns datetoformat.value and not the SQL
time.