legacy-database

Mapping one to many collection with Foreign Key to Foreign key

I'm mapping a legacy database with nhibernate and having some problems with mapping a realation. The two classes look like this public class Questionnaire { public int Id {get; set;} public string FormCode {get; set;} public IList<Question> Questions {get; set;} } public class Question { public int Id{get; set;} pu...

What ORM would you choose for working with legacy databases ?

I am in the process of integrating a number of legacy systems. They each have different databases; and I will need to write data access code for most of them. The database schemas cannot be changed (I might be able to apply some indexes and such, but tables and their columns must retain the structure). Some of the databases has an OK de...

How to access data in old DOS RapidFile data files

I need to get access to some data that is stored in an old DOS format. Specifically using Ashton-Tate's RapidFile format. Does anyone know if there are ADO drivers or any other more "modern" data access technology that will enable me to read the data? ...

What does the term legacy database mean?

I read this term a lot. What exactly is a legacy database? I ask because I had thought it meant an old database like dbase or rdb, but I don't think I'm right. When looking at RoR or Django and "legacy database" integration, what does legacy database really mean? Is it different than a generic term "legacy database"? ...

Can I use nHibernate with a legacy-database with no referential-integrity?

If I have a legacy database with no referential-integrity or keys and it uses stored procedures for all external access is there any point in using nHibernate to persist entities (object-graphs)? Plus, the SP's not only contain CRUD operations but business logic as well... I'm starting to think sticking with a custom ado.net DAL would ...

Using RoR with a legacy table that uses E-A-V

I'm needing to connect to a legacy database and pull a subset of data from a table that uses the entity-attribute-value model to store a contact's information. The table looks like the following: subscriberid fieldid data 1 2 Jack 1 3 Sparrow 2 2 Dan 2 ...

MySQL schema to schema syncronization through triggers?

Quick note: I have 19 days to figure my client's problems out. Background: Client hired a contractor who boasted he could get a new App out the door in 3 months. Two months and some days later I'm brought in and the individual was let go; there is no complete code, no thought put into the schema, and an abomination for a UI. I hav...

Django & customising a legacy database

I'm currently working on a project to implement a Django interface to an existing calendar application. The calendar application has MySQL as the backend DB. In our custom application we would like to modify/extend the data in one of the tables used by the existing calendar application e.g. # Auto-generated by inspectdb - table used by...

sqlalchemy 0.6 legacy database access?

I feel like this should be simple, but i cant find a single example of it being done. As an example I have the following existing tables: CREATE TABLE `source` ( `source_id` tinyint(3) unsigned NOT NULL auto_increment, `name` varchar(40) default NULL, PRIMARY KEY (`source_id`), UNIQUE KEY `source_name` (`name`) ) ENGINE=InnoDB...

loop through mysql database records and change phone formats

Hi, I'm working on a legacy database table that has a phone no. field but the problem is that all the entries (over 4k) are in varying formats. I was wondering if there was a quick way to fix them by looping through the records using PHP and updating the records to a particular phone format ...

Django with a legacy database

Hi I need to build a django project on top of an existing database. I'll use inspectdb as explained in the django docs and then syncdb to create the django required tables. Is there a way to keep track of the django specific tables (admin permissions, content types...)? I want to be able to remove django completely in the future if nee...

NHibernate Legacy Database Mappings Impossible?

I'm hoping someone can help me with mapping a legacy database. The problem I'm describing here has plagued others, yet I was unable to find a real good solution around the web. DISCLAIMER: this is a legacy DB. I have no control over the composite keys. They suck and can't be changed no matter much you tell me they suck. I can't add ...

Problems using a legacy database with a new rails application

What are the usual problems / stumbling blocks / issues / drawbacks when using a legacy database with a new rails application? We have to decide between using an old database or writing migration scripts to bring data from old database to new database following rails conventions. What would you suggest? ...

Pre-done SQLs to be converted to Rails' style moduls

I am a Rails newbie and would really appreciate if someone converted these SQLs to complete modules for rails. I know its a lot to ask but I can't just use find_by_sql for all of them. Or can I? These are the SQLs (they run on MS-SQL): SELECT STANJA_NA_DAN_POSTAVKA.STA_ID, STP_DATE, STP_TIME, STA_OPIS, S...

How to modernize an enormous legacy database?

I have a question, just looking for suggestions here. So, my application is 'modernizing' a desktop application by converting it to the web, with an ICEFaces UI and server side written in Java. However, they are keeping around the same Oracle database, which at current count has about 700-900 tables and probably a billion total records...

Rails Issue with associations using primary_key+foreign_key options

I want to access a legacy database schema from Rails. I have one table NAGIOS_OBJECTS with a primary key OBJECT_ID and one table NAGIOS_HOST_CHECKS that refers to NAGIOS_OBJECTS with a column HOST_OBJECT_ID. I thus defined the relations as follows: class NagiosObject < ActiveRecord::Base has_one :nagios_host_check, :foreign_key => :ho...

Is it good to introduce nHibernate for a legacy database in an ongoing project?

I am working on a current ongoing project where, there are two instances of the database having different schemas for some of the tables and is being used for transfer from one to another. Database schema is not well defined like, No Primary key for some of the tables Primary key as a composite key Foreign keys in composite primary ke...

RIA paging with custom data layer

We're using a custom data access layer to read our domain objects (customers, orders, etc) from a database. This data access layer does not support paging or sorting. We want to publish parts of the data (for instance customers) to a Silverlight client, using WCF RIA Services. In the client, we want to display a data grid with paging. ...

NHibernate navigators mapped to the part of a composite key problem - legacy database usage

We have a legacy database that we cannot change. And we are trying to move to the NHibernate instead of old DataAccess layer which is a garbage and is too slow. it has tables like these: GPI table has (PU_ID, PAR_ID, Data, Data2) columns BLOCK table has (GA_ID, Data, PAR_ID) columns COMPANY table has (PU_ID, Data) columns I had create...

Using hibernate with existing database.

I want to use hibernate against an existing database. I need to mostly read data from the db and very occasionally modify a field. I want to be able to update a single field in the row, but i need to make sure that all the other fields are not touched. Does hibernate guarantee that a field will be written back the same as it was writt...