LINQ vs SQL

ice91785

Senior member
Oct 22, 2006
651
0
0
So I have been kind of wanting to learn more about LINQ and SQL for a while...I have a general knowledge but! not enough...

LINQ and SQL are used to query data sources obviously...how do these guys compare&contrast. For LINQ, What does language-integrated mean (or why is it even important)? What are the main types of data sources that each supports (databases are the only that I know of)? I know generally what a query is, but what are some other examples of query operations (obviously querying a database for a phone number or something may be important to some but not others).

I don't know, just some random thoughts for the day

EDIT: fixed ur to YOUR in summary
 

nakedfrog

No Lifer
Apr 3, 2001
59,243
13,847
136
First thought: "ur" is annoying, you're not texting, type the extra two letters.
Second thought: I've only used SQL (T-SQL and MySQL, and whatever they call the bastard offspring of SQL that's in MS Access)
Main operations are SELECT, UPDATE, and DELETE
Third thought: Wrong forum
 

BoomerD

No Lifer
Feb 26, 2006
64,215
12,530
136
WTF? You mean we don't have a specialized "Database Query Language" forum here?

How ghetto of us.

(/me barely knows wtf a "database query language" even is)
 

shiner

Lifer
Jul 18, 2000
17,112
1
0
Originally posted by: nakedfrog
First thought: "ur" is annoying, you're not texting, type the extra two letters.
Second thought: I've only used SQL (T-SQL and MySQL, and whatever they call the bastard offspring of SQL that's in MS Access)
Main operations are SELECT, UPDATE, and DELETE
Third thought: Wrong forum

Look out!!! The frog is cranky!!!
 

PepePeru

Diamond Member
Jul 21, 2005
3,846
0
0
I used my red hot LINQ to perform an SQL Injection attack last night.
 

Goosemaster

Lifer
Apr 10, 2001
48,775
3
81
Your phrashing makes it sound WAY too much like a hw question to ellicit serious responses dude.
 

ice91785

Senior member
Oct 22, 2006
651
0
0
School is over for this guy (me) -- no homework here; genuine THIRST for knowledge also it was a repost and for this I am sorry
 

torpid

Lifer
Sep 14, 2003
11,631
11
76
SQL = nearly universal language for querying a relational DB. Anyone who considers themselves a programmer should know this
LINQ = cool new query technology built into new versions of .net. Unless you are working in .Net this will have limited use for you to know, but it is nonetheless a cool feature that implements a lot of the advanced stuff one might learn in compiler classes and similar. Can query against basically any type of data that has a linq provider for it. Enumerables, xml, sql server, etc.
 

Goosemaster

Lifer
Apr 10, 2001
48,775
3
81
Originally posted by: ice91785
School is over for this guy (me) -- no homework here; genuine THIRST for knowledge also it was a repost and for this I am sorry

I'm still learning t-sql but it seems that linq is geared more towards adding another layer of abstraction on top of what sql can give you.
 

ice91785

Senior member
Oct 22, 2006
651
0
0
The only LINQ i have really dabbled with is a touch with some C# (in VS 2008) programs that i've been doing -- I then found out that its apparently a pretty big thing! A lot of SQL is better, no I think LINQ is better...etc. Obviously used a little differently though which is what spurned me to post
 
Oct 27, 2007
17,009
1
0
LINQ and SQL aren't really directly comparable. LINQ was developed by MS for use in .NET languages and as far as I know (could be wrong) it only exists in the .NET framework. SQL is a whole language unto itself, designed specifically for querying databases. It works well for this purpose.

Now, the cool thing about LINQ (which I'm totally in love with) is that you can query any object or collection that implements the IQueryable<T> interface. This includes all of the .NET BCL collections, XML data types, JSON data, all database types, ADO.NET objects and much more. You can also write your own collections that implement IQueryable<T>.

LINQ has a similar syntax to SQL, except that the FROM clause goes first and the SELECT clause at the end. This is so that intellisense will work in VS. LINQ allows you to create anonymous types too, which is farking awesome.
 
Oct 27, 2007
17,009
1
0
Originally posted by: Goosemaster
Originally posted by: ice91785
School is over for this guy (me) -- no homework here; genuine THIRST for knowledge also it was a repost and for this I am sorry

I'm still learning t-sql but it seems that linq is geared more towards adding another layer of abstraction on top of what sql can give you.

Not really, it's at a pretty similar level of abstraction as SQL, it's just far more powerful and, importantly, language integrated.
 

Goosemaster

Lifer
Apr 10, 2001
48,775
3
81
Originally posted by: GodlessAstronomer
Originally posted by: Goosemaster
Originally posted by: ice91785
School is over for this guy (me) -- no homework here; genuine THIRST for knowledge also it was a repost and for this I am sorry

I'm still learning t-sql but it seems that linq is geared more towards adding another layer of abstraction on top of what sql can give you.

Not really, it's at a pretty similar level of abstraction as SQL, it's just far more powerful and, importantly, language integrated.

Good to know. (not there yet myself but will be eventually)
One of my projects will involve ADO.net iirc
 
Oct 27, 2007
17,009
1
0
Originally posted by: Goosemaster
Originally posted by: GodlessAstronomer
Originally posted by: Goosemaster
Originally posted by: ice91785
School is over for this guy (me) -- no homework here; genuine THIRST for knowledge also it was a repost and for this I am sorry

I'm still learning t-sql but it seems that linq is geared more towards adding another layer of abstraction on top of what sql can give you.

Not really, it's at a pretty similar level of abstraction as SQL, it's just far more powerful and, importantly, language integrated.

Good to know. (not there yet myself but will be eventually)
One of my projects will involve ADO.net iirc

I haven't done it myself, but I'm fairly sure ADO.net integrates well with LINQ.

Originally posted by: ice91785
Godless -- good post, but a lot was over my head

I have to go to uni now, but I'll come back this afternoon and explain it more carefully if you like.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |