Database Access in YourCo

The YourCo Web site contains many examples of database access. You can find examples that query, insert, update, and delete data. All of the YourCo data are loaded into relational tables in the SAMPLE database. And, all of the servlets that access this data were created with the WebSphere Studio database wizard.

You can look up employees in the YourCo White Pages directory, even if you have not logged in yet. But, you must log in as a YourCo employee to go to the rest of the database examples:

  1. From the Home page, click Employee Center.
  2. Log in as a valid YourCo employee.
  3. From the Employee Center page, go to:

White pages: You can search for YourCo employees (query) by their last name, by their department, or by their position.

  • (locations are relative to <was_root>/hosts/default_host)
  • Look for the Java and SQL files used to query the EMPLOYEE table in WSsamplesIDB_app/servlets/WebSphereSamples/YourCo/Search.
  • Look for the input and result pages in WSsamplesIDB_app/web/YourCo/Search.

Help Wanted: You can find open job positions (query) at YourCo. If you are a manager, your can post a new position (insert), change the criteria of a posted job (update), or cancel one when you fill it (delete).

  • (locations are relative to <was_root>/hosts/default_host)
  • Look for the Java and SQL files used to query the JOBS database in WSsamplesIDB_app/servlets/WebSphereSamples/YourCo/Jobs.
  • Look for the input and result pages in WSsamplesIDB_app/web/YourCo/Jobs.