Book Image

Oracle ADF Faces Cookbook

By : Amr Gawish, Amr Ismail Gawish
Book Image

Oracle ADF Faces Cookbook

By: Amr Gawish, Amr Ismail Gawish

Overview of this book

Table of Contents (18 chapters)
Oracle ADF Faces Cookbook
About the Author
About the Reviewers

Exploring different options to install the database

Almost all enterprise applications have a backend data layer that contains one or more Database Management Systems (DBMS), and since ADF is an enterprise-enabled framework, ADF is no exception to this rule.

ADF can work with any database as long as there is a Java Data Base Connectivity (JDBC) driver.

Users are encouraged to install a database if they want to follow all the recipes to the letter through all chapters of this book.

Getting ready

ADF works best with the Oracle Database, but as mentioned before it can work with any other DBMS, such as MySQL, PostgreSQL, or MSSQL. For the purpose of this book, you should install the Oracle Database, which comes in two flavors: Oracle Database Standard edition and Oracle Database XE (Express Edition).


There is also an Oracle Database Enterprise edition, which has all the Standard Edition features plus management packs for highly critical performance such as for databases that are used in banks, which is outside the scope of this book.

Oracle XE is a version of Oracle Database that is easy to use and install; however, it only supports Windows 32-bit and Linux 64-bit versions. You can head over to and install it if your operating system is one of the supported operating systems. If it isn't, you should install the Oracle Database Standard Edition from

How to do it…

Depending on your operating system, you can know what kind of options you have:

  • Mac users: You have only one option, and that is to have a virtual machine with Linux or Windows that hosts the database. Oracle provides multiple prebuilt Virtual Machines that you can install from

  • Linux users: Most of the Linux operating systems are 64-bit; if that is your case, then you are free to install either Oracle Database 12c or Oracle XE 11g. Other than that, you have to install Oracle Database 12c, or you can have a Virtual Machine with the database inside.

  • Windows users: You can install Oracle XE 11g if your operating system is either 32-bit or 64-bit—you can use the database in its 32-bit mode; however, if you want to run the database on a 64-bit architecture, you can install Oracle Database 12c or you can have a Virtual Machine with the database inside.

How it works…

Installing the database will provide you with the data that your application will need to display, edit, add, and delete; one example database schema that is installed by default and that we will use in this book is the HR schema.

If you installed Oracle Database Standard edition, you should create at least one instance for you to work with.

There's more…

Make sure after installing your database that you can connect to it properly, and while the HR schema will be be installed with your database, it'll be locked by default.

In order to unlock the HR schema, log in with your system or sys user and execute the following command:


This command will alter the HR schema and set the password to PASSWORD. You are free to change the password by changing the PASSWORD keyword in the previous command to whatever you like.