Monday, May 27, 2019

Sample Data Sets in APEX

Sample data sets are something that I use very often. Either I'm trying out some new features, working on a presentation, preparing a workshop,...

For me still the favorite data set is the King with a salary of 5000...or in other words the SCOTT schema with a famous DEPT and EMP tables. If you have never heard about the SCOTT schema, then it must be that you are really really young :). In that case you can read more about SCOTT schema here. And if you don't know who Scott is, then check this link.

If we want to have this sample data set in our custom schema then we need a script that will create the tables along with the data. One of the places where we can get the script is for an example on Github.

But if we are working with APEX all we need are a few clicks and we are good to go. Once logged into APEX we have to select in the drop down menu :  Workshop > Utilities > Sample DataSets

Once this page, all we have to do is click on "Install" next to EMP / DEPT and that is it. 

And that would be it, if this wouldn't be APEX. As you might already noticed there are multiple data sets available. In addition to DEPT / EMP we can also install Project Data, HR Data and Task Spreadsheet data sets. And if you look closer there is one more really nice thing about this DEPT / EMP data set. You can install the data in different languages...and that is 10 different languages! 

And things don't end here. After we are done with the installation of data set, we can simply create an application. 

Not sure if you are surprised, but not just the data, also the application it self will be generated in a selected language. 

If you wonder if we can have multiple languages in the same data set, that is not ( yet ) possible. At the moment only a single language can be loaded into the sample database objects. If you select a different language the currently loaded data will be replaced.