data-mapping

What data mapping tool is good for mid size projects

I need a data(and metadata) mapping tool for mapping one database metadata to other. Are there any cheap tools available for that purpose? ...

What metadata repository tools are used in industry?

For logical data model mapping, do we have some tools in the market. Any open source or relatively cheap tool? ...

Should a Domain Object Contain Its Mapper?

Given a domain object (say, for example, Person), should that object contain its Data Mapper (Person_Mapper)? For example, I could have an inactivate action work in these two different ways: $mapper = new Person_Mapper(); $person = $mapper->load(1); $person->active = false; $mapper->save($person); Or like this: $mapper = new Perso...

What's the difference between DAO and Data Mapper

Is there a difference between the DAO pattern and the Data Mapper pattern? Is DAO just one of doing Data Mapper? ...

Combining multiple inheritance mappers

In PeAA, Fowler describes the three different patterns to use when mapping an inheritance hierarchy to a DB. Single table inheritance Class table inheritance Concrete table inheritance I understand the three patterns as described. It is also mentioned that these patterns can be combined for different levels of a hierarchy, for examp...

Can I map an EnumSet to a series of boolean columns automatically using Hibernate Annotations?

I have an EnumSet that I thought it would be good to map into a series of boolean columns. This will make it easy to inspect using SQL tools and also resilient to changes to the available enum values. However, I don't really want to hand-write all the getters and setters for this. Does anyone have a clever solution using some kind of ...

What is the difference between NHibernate and iBATIS.NET?

I am looking for some up to date information comparing NHibernate and iBATIS.NET. I found some information searching Google, but a good bit of it applies either to the Java versions of these products or is dated. Some specific things I am interested in: Which is better if you control both the data model and the application? iBATIS is...

Linq To SQL : Modeling Associations

I have three tables Projects, Users and ProjectMembers. The ProjectMembers table is a mapping table and has only two columns ProjectId and UserId. In my object model i have two classes Project and User. The Project class has a property IEnumerable<User> Members I am using an external xml map file for mapping linq to sql associations. I...

Mapping class properties to generic columns in table .NET

I have have a SQL Server table which has generic names like Text1, Text2.. etc. The table was designed like this because the same structure is used for different projects. I have a class in .NET which has properties. Say a Customer class has a property called FirstName. How can I do the mapping from FirstName to Text1 just once (centra...

Is referencing and calling methods via strings in PHP a bad idea?

I've always worry about calling methods by referencing them via strings. Basically in my current scenario, I use static data mapper methods to create and return an array of data model objects (eg. SomeDataMapper::getAll(1234)). Models follow the Active Record design pattern. In some cases, there could be hundreds of records returned, an...

[Coding Exercise] What are some ways to map & normalize related data?

Let's say you need to funnel random, related data given to you into more succinct categories. Example - You're given the following data. NOTE - There could be any number of other related, columnar data: Customer Product Category ========== ========= ================================= Customer A Product A ...

How to map collections in Dozer

I'd like to do something like: ArrayList<CustomObject> objects = new ArrayList<CustomObject>(); ... DozerBeanMapper MAPPER = new DozerBeanMapper(); ... ArrayList<NewObject> newObjects = MAPPER.map(objects, ...); Assuming: <mapping> <class-a>com.me.CustomObject</class-a> <class-b>com.me.NewObject</class-b> <field> <...

Given an input and desired output, figure out the needed transformation.

I want a program that does what I said in the title. I realize that this is a pretty vague problem. I also realize that figuring out how to transform any input into any output is nearly impossible, but it seems like handling some simple cases should be feasible. To provide a concrete example (in Python): >>> def find_transform(star...

XML-RPC object mapping

Recently I was working on web services proxy. I got 2 web services proxy. UI will call Proxy A to let say create a record. then what Proxy A will do is to call Proxy B to do the actual task which create the record (For some reason must go through Proxy A) now the problem is When UI call Proxy A, Proxy A will pass the objectA to Proxy B c...

Jquery: Mapping XML Nodes to HTML ID elements

Hi there, never easy to encapsulate what to say in the title... but here we go... I realise I am probably seeing straight past the obvious, and possibly built in function of JQuery. What I am trying to do is: Have an XML file (locally or via server) contain nodes which happen to have their node names i.e. as ID names of say a textb...

Entity framework: Access / modify the Command Tree or otherwise provide custom mapping C# functions

Hello, I'm investigating a method of providing transparent bi-temporal versioning of entities with Entity framework 3.5 or 4.0. What I want to do: When an entity is saved, the former entity has to be copied into a separate table, for example, if the entity is Customer, it will be saved in Customer_AUD. Upon retrieval, based on date/ver...

What practical (and lightweight) techniques are there for semantic/data matching?

I have an application that lets users publish unstructured keywords. Simultaneously, other users can publish items that must be matched to one or more specified keywords. There is no restriction on the keywords either set of users may use, so simply hoping for a collision is likely to mean very few matches, when the reality is users migh...

export table/view names with column names from sql server 2005 database

Hi, data mapping exercise approaches (3000+ tables) and I can get table names out (thanks to previous Stack Overflow answer) but is there easy way to get all table & view names and their associated columns, ideally with foreign and primary keys noted? Newbie here so answers need to be be very simple please! Many thanks, Jules. ...

Tools for mapping time series data

Hello, I'm looking for suggestions/examples of tools or APIs that enable the mapping of large amounts of time series data into an intensity map. The data includes dimensions for country, series, and year. Here's an example http://spreadsheets.google.com/ccc?key=t9ZwziZAgy768ZTXDEg8Maw&amp;authkey=CPn0pdoH&amp;hl=en_GB&amp;ui=1 ...

Combining delete-orphan with a where condition

Hibernate mapping question where the behavior is ambiguous and/or dangerous. I have a one-to-many relationship that has a cascade-delete-orphan condition AND a where condition to limit the items in the collection. Mapping here - <hibernate-mapping> <class name="User" table="user" > <!-- properties and id ... --> <set table="em...