Oracle Database is a product with a distinguished past and a bright future. It boasts innovative, state-of-the-art features as well as a history that predates many modern technologies. Applications have come and gone, but the data of organizations has lived on in Oracle databases that have migrated through various versions. This has resulted in a technical challenge, due to the large number of legacy schemas that exist today. Many organizations are faced with the challenge of making this data more widely available to their user base.
Ruby on Rails (or simply “Rails”) is an exciting new framework that developers, DBAs, and system administrators can use to quickly develop Web applications. The framework is open source and rapidly gaining in popularity. It allows you to prototype and develop Web applications with database integration in a fraction of the time possible with other frameworks.
Most of the Rails examples and tutorials available today involve the creation of a new database schema with tables and columns that adhere to structures and naming conventions that the framework expects. These tutorials also assume a rather simple object-relational mapping that is not feasible when working with legacy schemas. However, both the framework and Oracle Database offer features that can be leveraged to allow the creation of Web applications that are integrated with legacy schemas.
This article describes the techniques for creating a Web front end to the Oracle demonstration schema HR. The code available for download with this article includes a complete Ruby on Rails Web Application that was developed on the HR schema running on Oracle Database 10g Express Edition (XE).
The downloaded application works on Windows or Linux. Linux users should convert all backslashes to forward slashes when performing commands described in this article.
Continue reading “HR Schema on Rails” »