Re: Want to write your SQL statements and even stored procedures in pure C#?



"Frans Bouma [C# MVP]" <perseus.usenetNOSPAM@xxxxxxxxx> wrote in
news:xn0e3jba0nyipg000@xxxxxxxxxxxxxxxxxx:
> In sync with the database? Just like that? I don't think so. :)

Yes it is. I think you are not understanding exactly whats going on. I'll be writing more articles soon.
But this "system" is in use in several Fortune 500's, some of which are processing millions of
transactions a day. But what Ive exposed in the article is just a peak at the DAL layer.

> Either
> you have to update class mappings based on a changed schema, or you

They arent class mappings per se - its an object WRAPPER of the DB tables. When you embed
SQL in your app and you change the DB you cannot find mismatches until run time. With this
system, it regenerates the interfaces and all conflicts are found at comile time and then easily
resolved from there.

> have to migrate the schema based on class changes. I can tell you,
> that's far from 'automatic'.

Because you are not seeing the whole picture. Until I finish the other articles, remember that what
you have seen so far is just a peek at the DAL, nothing more. So your assumptions of how its used
in a bigger picture sceanrio are invalid because you are assuming in your system that its a 1:1
replacement for whatever you use now.

> Although I support dyn. sql of course, the problem I have with
> your reasoning is that you claim your solution is truly database

Its fully DB independent. We have systems running on the older version which run on Oracle,
SQL server, DB2, and Firebird. In fact the demo runs on Firedbird and SQL server, and they are
fairly different databases. Firebird is closer to Oracle.

> independent, though at the same time require things in the schema
> (like a horrible sequence table in sqlserver... )

First of all, if you read the article you would note that this is optional and not a requirement.
Second of all - sequences are not horrible, identity fields are the item that is poor. Identity
fields cause bottlenecks in transaction and multitable inserts, etc by forcing record inserts
prematurely. Identity/autoincs are widely regarded as a not very good practice.

Given the choice of implementing autoinc/id fields in other DB's that use sequences, or implenting
sequences in the others, its obvious which choice to use.


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Blog: http://blogs.atozed.com/kudzu
.



Relevant Pages

  • SQL-DMO and VB.Net
    ... articles is created. ... for there to be a database on MSDE that you can use as one ... snapshot and merge agents. ... >The primary database is on the SQL Server. ...
    (microsoft.public.sqlserver.replication)
  • Re: Article Storage: Files vs. Database
    ... loading articles from a database does not appear to be as efficient as simply displaying files. ... Jonathan Wood ... Some advantages of storing them in the database are ease of some operations, and the option of using SQL Server 2005 text index to implement search. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Huge Replication Scenario
    ... As to the latencies, that’s exactly the bottleneck in performance, which ... SQL Server installations. ... articles needed for our system? ... What concerns us is our huge database, ...
    (microsoft.public.sqlserver.replication)
  • Re: Article Storage: Files vs. Database
    ... some third party solution like dtSearch or open source (just google "serarch ... SQL Server 2005's full-text indexing yet? ... With file-based articles, ... indexed by the database, or to store the article text in the database. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Moving database to another server
    ... Disaster Recovery Articles for Microsoft SQL Server ... Moving SQL Server databases to a new location with Detach/Attach ... Using the WITH MOVE Option with the RESTORE Statement ... Mapsids.exe Helps Map SIDs Between User and Master Databases When Database Is Moved ...
    (microsoft.public.sqlserver.setup)

Loading