Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 LINQ - what do you THINK?

Author  Topic 

evilDBA
Posting Yak Master

155 Posts

Posted - 2007-11-02 : 05:38:13
Well, just played a little bit with that new thing from Microsoft. Genius! Microsoft presented that step backwards as a step forward.

Say good bye to the 3-tier architecture, now any programmer, after 1 week training, will be able to put SELECT * into the source code. No more stored procedures and logic on a server. No more ugly WHERE clauses. Just SELECT * and pass all records in a loop :)

When I looked at the queries, generated by LINQ in SQL profiler, I noticed that they are generated automatically using the same pattern. It is obvious, of course, but now it would be really difficult to trace a problematic query back to the C# code. All updates to table X will look like as identical twins!

On the other side, it is not so bad. We will have soon a lot of projects, failing when they go to the production and face the real volumes of data. And a long queue of companies, crying and asking to save them. Perfect “job security”. Please, use LINQ! Port all your code to LINQ immediately (Laughing demonically like Dr. Evil)

Hm… a second thought, but what could we suggest to these companies, having performance problems with LINQ 3rd party applications, when there is no source code? Now we could at least modify some stored procedures, and with LINQ looks like the only recommendation could be “contact a developer of that application or buy more a powerful server”.

Kristen
Test

22859 Posts

Posted - 2007-11-02 : 08:58:41
"but what could we suggest to these companies, having performance problems with LINQ 3rd party applications"

Mr Big Company, you need to change "SELECT * FROM MyTable" in this query to "SELECT * FROM View1234". Tomorrow I will work on the fix to provide a "SELECT * FROM View1235" solution to the other problem you told me about ....
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-11-02 : 09:31:02
it's not all that bad.
linq should also support stored procedures by the release date.

and note that ling isn't meant for very high performance database apps.
it's a general SQL-like collection querying language that will be also very helpfull in paralell processing (PLINQ)

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-11-02 : 09:33:32
"note that ling isn't meant for very high performance database apps."

The problem is the ones that start out that way - either innocently or due to stupidity in the choice-of-tools - and then have a need for "very high performance"

And then you have to do battle with "But it only took to days to make the application, which is why we only budgeted $1,000 - how can it possibly take $100,000 to fix it ..."

Kristen
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2007-11-02 : 10:14:49
I've seen worse...MUCH Worse http://www.allisonclaire.com/articles/genexus.htm

(note that this article hasn't had its' final edit yet)

this thing makes almost every mistake you can make for building databases
Go to Top of Page

evilDBA
Posting Yak Master

155 Posts

Posted - 2007-11-02 : 11:25:06
quote:

For example, taking the identity value of the 1st insert and using it in the next. Because Genexus won’t create a stored procedure, it will (1) insert into the first table (2) select max(id) from that table and store the value in a variable client-side then (3) insert the next record.



Wow! hard to believe... Is that system used in some banks? :) Need to withdraw funds from there immediately :)
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2007-11-02 : 13:59:09
i think my favorite part is “We trained with Microsoft and they didn’t convince us that there is any advantage to using stored procedures.”
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-11-02 : 14:10:42
lets be realistic here.. LINQ's primary use isn't database access.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-11-02 : 14:58:35
"LINQ's primary use isn't database access"

So no one is going to use it for major, mission critical, database apps. referencing billions of rows?

That's a relief then
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-11-02 : 15:08:31
"For bit columns, Genexus will create a Numeric(10) for us. It will add a rule to the C# code to disallow values other than 1 or 0 to be entered via the front end but will not enforce it at the database tier"

Fantastic! That is so useful ...
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-11-02 : 15:29:11
I don't know what product they use to generate this crap, but we've got a system that uses Numeric(19,0) for all integer data. I think I found 50 of these and only a handful need to be bigint. Most of them can be converted to int and some of them can be smallint or even tinyint. It's absurd!

This is for a Java application. They've told me the name of the product they use to create this SQL crap, but I can't remember what it is.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

evilDBA
Posting Yak Master

155 Posts

Posted - 2007-11-03 : 08:02:07
(after reading some threads)
Regarding data types, looks like there is a new nightmare coming: "varchar(max) everywhere"
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-11-04 : 02:16:09
Disasterous naming IMHO. Why TEXT couldn't have been "upgraded" to whatever internal-ness varchar(max) is I don't know.

At least it would have been easier for people to understand that varchar and text were "different" and that even though you COULD use TEXT anywhere that VARCHAR was used, there were performance reasons why not.

"You shouldn't use VARCHAR(MAX) everywhere because it isn't the same as VARCHAR(nnn)" is just going to get me some blank looks.

Kristen
Go to Top of Page

bogus
Starting Member

41 Posts

Posted - 2007-11-08 : 19:23:01
Remember this - computers are stupid. They are only as smart as those that tell them to do something.

Considering that complex efficiencies require specific knowledge, it shocks me that LINQ cannot be more intelligent, simply because it has all the data needed to be efficient! How tragic...

as for the GeNexus thing... I have yet to meet a code generator I like. Anyone here remember AppGen from dBASE III+?
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2007-11-08 : 20:35:55
arrgghh, yes i remember it. i am still trying to forget dbase altogether. thanks for bringing it up

agree, never seen a "good" code generator.
Go to Top of Page

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2007-11-08 : 21:59:33
quote:
Originally posted by russell


agree, never seen a "good" code generator.



i like to think i am a good code generator.

even if i'm not there are a lot that visit this forum.




elsasoft.org
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-11-09 : 01:35:04
I recommend K-Bot or P-Bot ...
Go to Top of Page

KenW
Constraint Violating Yak Guru

391 Posts

Posted - 2007-11-16 : 15:54:29
quote:
Originally posted by spirit1

lets be realistic here.. LINQ's primary use isn't database access.



Let's be realistic here. Neither was MS Access.
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-11-16 : 15:59:31
quote:
Originally posted by KenW


Let's be realistic here. Neither was MS Access.



hmm... that would be debateable

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com
Go to Top of Page
   

- Advertisement -