Dino
Thu Oct 06 13:45:15 CDT 2005
...
...
...
???
On Thu, 06 Oct 2005 06:30:11 -0700, "Frans Bouma [C# MVP]"
<perseus.usenetNOSPAM@xs4all.nl> wrote:
>Sahil Malik [MVP] wrote:
>
>> > naa. You can also use a tool which provides a database generic layer
>> > for you which is usable with a lot of different databases ;) (like
>> > an O/R mapper)
>>
>> Does your O/R Mapper generate db specific queries without having to
>> do any special treatment for different databases? If so "WOW". It is
>> quite a hard goal to acheive though - just that you've done all the
>> hardwork.
>
> Yes. And in the upcoming 1.0.2005.1, you can even define type
>converters, so Oracle NUMBER(1,0) (or any other type, just write a few
>lines of code) for example can be mapped onto bool, transparently, so
>you can have a single code base targeting a set of entities, which have
>for example some boolean fields, and on Sqlserver they're mapped onto
>bitfields, and on Oracle they're mapped onto NUMBER(1,0). (you can map
>any.NET type onto any db type )
>
> :P. This even works cross entity actions, so fetch an entity from
>sqlserver, use it and save it into oracle or vice versa (or other db).
>
> It's not that hard really: an O/R mapper knows the meta-data, and the
>object state. So with a per-db SQL engine, you can generate any SQL
>targeting any db, as long as you have an SQL engine for that database.
>:)
>
> Unless you want to use stored procedures of course ;) :P
>
> FB
>
>>
>> - Sahil Malik [MVP]
>> ADO.NET 2.0 book -
>>
http://codebetter.com/blogs/sahil.malik/archive/2005/05/13/63199.aspx
>> ----------------------------------------------------------------------
>> ------
>>
>>
>>
>> "Frans Bouma [C# MVP]" <perseus.usenetNOSPAM@xs4all.nl> wrote in
>> message news:xn0e863et4yhpm002@news.microsoft.com...
>> > Sahil Malik [MVP] wrote:
>> >
>> >> Thats a hard goal to acheive.
>> > >
>> >> You can try using something similar to the Dbproviderfactory model
>> in >> .NET 2.0 - but even then you are stuck with 70% of database
>> specific >> code - i.e. PLSQL vs. TSQL.
>> > >
>> >> You have to segregate everything into an as thin data layer as
>> >> possible and then write different datalayers for different .NEt
>> data >> providers - thats about the only way.
>> >
>> > naa. You can also use a tool which provides a database generic layer
>> > for you which is usable with a lot of different databases ;) (like
>> > an O/R mapper)
>> >
>> > FB
>> >
>> > >
>> > >
>> > >
>> >> "Dino Buljubasic" <dino@noplacelikehome.com> wrote in message
>> >> news:vt6jj1prrfmc25b4unq38nt93pc8lh5ioo@4ax.com...
>> >> > Hi,
>> >> >
>> >> > How can I make my application work with SQL Server, Oracle,
>> MySql, >> > etc?
>> >> >
>> >> > dino