InterSystems IRIS® data platform provides a multi-model architecture that allows you to use the data model that best fits each task in your application — relational, object, or even direct/native access — all accessible through the language of your choice.
Multi-model features available in InterSystems IRIS include:
Watch the short video above, then launch the online sandbox below. You can try the exercise below using one of the languages listed.
Make sure you have an instance of InterSystems IRIS and a multi-language IDE ready to go. Sandbox settings will appear below after you log in and launch a sandbox.
With Java, you can interact with InterSystems IRIS relationally (with JDBC), using objects (with XEP or Hibernate), or natively (with the Native API). For this exercise, use the lab launcher to run the code. In the steps below, you will create a set of airport data as objects, retrieve that data via SQL, and then natively access custom data structures to store route information.
cd /home/project git clone -b try-iris http://github.com/intersystems/quickstarts-multimodel-java
Demo.Airport.java
, Demo.Location.java
, and multimodelQS.java
.multimodelQS.java
file and on line 31 change the value of IP
to Please launch the sandbox before continuing! and on line 32, change the value of port
to Please launch the sandbox before continuing!.multimodelQS.java
to execute the populateAirports()
and getAirports()
methods.cd /home/project/quickstarts-multimodel-java/src javac -cp ".:../lib/intersystems-jdbc-3.2.0.jar:../lib/intersystems-xep-3.2.0.jar" multimodelQS.java java -cp ".:../lib/intersystems-xep-3.2.0.jar:../lib/intersystems-jdbc-3.2.0.jar" multimodelQS
populateAirports()
— populates five objects and saves them to the database, while the second method — getAirports()
— runs an SQL query and returns all airports, printing them to the screen. Using InterSystems IRIS, you can interact with data using either objects or SQL based on the task, optimizing both developer time and application performance.In the case where you need to answer a question you did not expect when you built the database, refactoring a relational-only database could be expensive and complicated. With InterSystems IRIS, you may choose to natively store data in a custom data structure, allowing you to modify the structure to fit your specific data and easily handle new data that was not part of your initial schema or class design.
storeAirfare()
and checkAirfare()
— have been created to store route information to InterSystems IRIS and print if a particular route exists.// storeAirfare(irisNative); // checkAirfare(irisNative);
multimodelQS.java
again.Printed to ^airport global. The distance in miles between BOS and AUS is: 1698. The following routes exist for this path: -AA150: 450 USD -AA290: 550 USD
Other routes may be null.
With .NET, you can interact with InterSystems IRIS relationally (with ADO.NET or ODBC), using objects (with XEP or Entity Framework), or natively (with the Native API). In the steps below, you will create a set of airport data as objects, retrieve that data via SQL, and then natively access custom data structures to store route information.
cd /home/project git clone -b try-iris http://github.com/intersystems/quickstarts-multimodel-dotnet
Demo.Airport.cs
, Demo.Location.cs
, and MultiModelQS.cs
.MultiModelQS.cs
file and on line 20 change the value of ip
to Please launch the sandbox before continuing! and on line 21, change the value of port
to Please launch the sandbox before continuing!.MultiModelQS.cs
to execute the populateAirports()
and getAirports()
methods.cd /home/project/quickstarts-multimodel-dotnet dotnet run
populateAirports()
— populates five objects and saves them to the database, while the second method — getAirports()
— runs an SQL query and returns all airports, printing them to the screen. Using InterSystems IRIS, you can interact with data using either objects or SQL based on the task, optimizing both developer time and application performance.In the case where you need to answer a question you did not expect when you built the database, refactoring a relational-only database could be expensive and complicated. With InterSystems IRIS, you may choose to natively store data in a custom data structure, allowing you to modify the structure to fit your specific data and easily handle new data that was not part of your initial schema or class design.
storeAirfare()
and checkAirfare()
— have been created to store route information to InterSystems IRIS and print if a particular route exists.// storeAirfare(irisNative); // checkAirfare(irisNative);
MultimodelQS.cs
again.Printed to ^airport global. The distance in miles between BOS and AUS is: 1698. The following routes exist for this path: -AA150: 450 USD -AA290: 550 USD
Other routes may be null.
With Python, you can interact with InterSystems IRIS relationally (with PyODBC) or natively (with the Native API). In the steps below, you will create a set of airport data and retrieve that data via SQL, and then natively access custom data structures to store route information.
cd /home/project git clone -b try-iris http://github.com/intersystems/quickstarts-multimodel-python
multimodelQS.py
.multimodelQS.py
file and on line 37 change the value of IP
to Please launch the sandbox before continuing! and on line 38, change the value of port
to Please launch the sandbox before continuing!.cd /home/project/quickstarts-multimodel-python pip install nativeAPI_wheel/irisnative-1.0.0-cp34-abi3-linux_x86_64.whl sudo odbcinst -i -d -f pyodbc_wheel/odbcinst.ini
python multimodelQS.py
, which executes the populate_airports()
and get_airports()
methods.populate_airports()
— populates five objects and saves them to the database, while the second method — get_airports()
— runs an SQL query and returns all airports, printing them to the screen.In the case where you need to answer a question you did not expect when you built the database, refactoring a relational-only database could be expensive and complicated. With InterSystems IRIS, you may choose to natively store data in a custom data structure, allowing you to modify the structure to fit your specific data and easily handle new data that was not part of your initial schema or class design.
store_airfare()
and check_airfare()
— have been created to store route information to InterSystems IRIS and print if a particular route exists.# store_airfare(irisNative, "^airport"); # check_airfare(irisNative, "^airport");
multimodelQS.py
again.Printed to ^airport global. The distance in miles between BOS and AUS is: 1698. The following routes exist for this path: -AA150: 450 USD -AA290: 550 USD
Other routes may be null.
With InterSystems ObjectScript, you can interact with InterSystems IRIS relationally, using objects, or natively. In the steps below, you will create a set of airport data as objects, retrieve that data via SQL, and then natively access custom data structures to store route information.
cd /home/project/shared git clone -b try-iris http://github.com/intersystems/quickstarts-multimodel-objectscript
/home/project/shared/quickstarts-multimodel-objectscript/Airport.xml
as the file to import.do ##class(Demo.Airport).PopulateAirports() do ##class(Demo.Airport).DisplayAirports()
PopulateAirports()
— populates five objects and saves them to the database, while the second method — DisplayAirports()
— runs an SQL query and returns all airports, printing them to the screen.In the case where you need to answer a question you did not expect when you built the database, refactoring a relational-only database could be expensive and complicated. With InterSystems IRIS, you may choose to natively store data in a custom data structure, allowing you to modify the structure to fit your specific data and easily handle new data that was not part of your initial schema or class design.
StoreAirfare()
and CheckAirfare()
— have been created to store route information to InterSystems IRIS and print if a particular route exists. Run these methods to see this work:do ##class(Demo.Airport).StoreAirfare() do ##class(Demo.Airport).CheckAirfare("BOS", "AUS")
The output should say:
Printed to ^airport global. The distance in miles between BOS and AUS is: 1698. The following routes exist for this path: -AA150: 450 USD -AA290: 550 USD
Other routes may be null.
To give you the best possible experience, this site uses cookies and by continuing to use the site you agree that we can save them on your device.