A common task that I encounter at work is to write scripts against pre-existing databases. Sometimes I connect to Oracle, sometimes it can be MySql or even a sql server.
What I would like is a tool that reconstructs database tables and foreign keys and allows me to write OO-style scripts in a database. It can be in any language, but it is preferable to use python or ruby.
For example, this is my ideal ruby script: (assuming the manager and employee tables already exist with foreign keys)
DB = Database.connect(connect_string)
DB.managers.each do |manager|
puts manager.name
manager.employees.each do |employee|
puts employee.name
end
end
Does this type of library exist? If so, it will save me so much time!
- , , - . ActiveRecord, SQLAlchemy, Sequel DataMapper, , , .