Learning SQL from Scratch

  • Hi,

    I have been programming in VBA for years and VB now for just over a year and I would like to venture into Database programming but I am a little confused as to where and how I should go about it.:w00t:

    For instance: where does or how does ADO.Net, Linq and VB piece together?

    Do I need all 3 or would one or two suffice?

    Can you do it all with SQL Server?

    If anyone could help clarify my 62 year old little grey cells to get me started on the right track - I would very much appreciated it and Thank you very much in advance!

  • VB - I assume you mean VB.NET? - Do you have Visual Studio (at least Version 2008 if you want to use LINQ) - if Not you can get an Express edition for free.

    Very Simply:

    ADO.NET - This is the .NET database access libraries, where you can create connections to the database, create commands add the T-SQL statements (or procedure) to the commands, execute them and return the results.

    LINQ - This is an alternative to ADO.NET - you drag and drop database tables onto a window in Visual Studio and it creates object classes so you can query the database in code. No need to write any T-SQL.

    You don't need both ADO.NET is simpler, LINQ takes a bit of getting your head around at first, but can be faster to code in the long run.

    Yes you can do both with SQL Server (Express edition is free).

    ADO.NET will work with any ODBC database - not sure about LINQtoSQL - I think its SQL Server only, but I may be wrong.

    As for learning T-SQL (for True SQL Programming) - this site probably has all you need. See the StairWay series

    http://www.sqlservercentral.com/stairway/

  • Hi Grasshopper,

    Thank you very much for the information.

    Yes I do mean VB.Net. I also used VB for Applications with Word & Excel during my business career but have now retired due to health issues.

    I have Visual Studio 2010 which I purchased sometime ago but until now, haven't had the time to use it.

    Hopefully, now I will be able to get my head around it by concentrating VB.Net with ADO.Net and SQL Server Express 2008.

    I haven't looked at the Web link you have kindly provided - but that will be my next point of call following posting this reply.

    Once again - many thanks for your kind assistance,

    Kind Regards

    Clive

  • It all comes down to want you want to do. You discussed a few things but never really said what you want to do. The best thing you can do is to download sql express, setup a test machine and start figuring stuff out. The stairways referenced above are a great place to start.

    Hang out on the forums on this site, visit other forums. You will learn a lot more if you have a task to work on.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • The Stairways series is a great place to start. One thing I've always found makes learning easier is to pick something like a problem you want to solve or an application you would like to use everyday. Then build that. I'm sure you've done that in programming. Just try to think of some kind of CRUD application and run with it.

  • I'm a huge fan of the book SQL Server 2008 Bible. Look in to that one if you'd like to learn more about programming in SQL Server.

    Someone else mentioned the stairway series on this site. Another good source.

    And of course, visit these forums. There are a lot of great people here offering help on a daily basis.

    Mark

  • What can I say but thank you - all for your kind responses. It's great to know that there are still like minded people out there in the world that are prepared to assist & help you if needed.

    I have order a copy of SQL Server 2008 Bible from Amazon and have visited the website http://www.sqlservercentral.com as suggested a couple of you.

    SSCertifiable rightly so pointed out that I talk about things but have never indicated what I was trying to do.

    To put the record straight - so to speak - before retiring I was a director of a small business and several years ago the company paid someone to create a program that would create & keep customer records, create Job sheets with a automatic numbering system and then go on to finalize everything with a invoice - with all data being stored in a Database.

    At the time I hadn't the time to attempt to do it myself but to keep my little grey cells going now I thought it might be an interesting little exercise to do it now I have too much time on my hands but I was, until Grasshopper pointed the way, a little confused regarding the use of VB.Net, Ado.Net, Linq etc and how it all fitted together.

    Once again many thanks for all your kind responses

  • Hi Clive,

    Just to muddy the waters, there is also ADO.NET Entity Data Modelling, which comes built into Visual Studio 2010. Its similar to LINQ - in that you select the tables up-front, and it creates object classes corresponding to your tables, but its easier to query than LINQ, more integrated, and less SQL like.

    There is even an Entity Data Model Wizard, so you can be up there creating data linked websites without having to know anything about the database.

    And by the way "Grasshopper", "SSCCertifiable", "Valued Member" etc are the status of the person, rather than their name - I'm not sure I agree with the choice of names for the statuses - but I suppose it more interesting than "Basic", "Standard", "Premium" or a star-system. (and I suspect SSCCertifiable alludes to psychiatric certifiable rather than being awarded a certificate)

    If you get stuck - post your questions here.

  • for me....learning sql from scratch is an amazing experience.. that's the stage you build your basics

    simple and friendly person.
    wellhead compression[/url]

  • Hi all,

    Once again thank you all very much for your kind responses to my question - I very much appreciated every last one.

    My apologies to one and all, especially if I offended anyone by calling them by their status rather than there names - perhaps I ought to go to Specsavers for my next pair of glasses!

    And now t.brown 89142 has, as he put, "muddied the waters", (thanks for that 😛 lol) my fingers are going to get red hot clicking on the keyboard day & night for a while and I think I had better purchase that new pair of glasses - just in case!

    Any suggestions as to where I find info on the ADO.NET Entity Data Modelling that comes with Visual Studio 2010 that I have?

    Many Thanks to all

    Clive (a very, very small Grasshopper)

  • Here's a very good article that includes Entiy Data Modelling, and goes on to do ASP.NET and Reporting, but the EDM part is first. You just need to install the Northwind database from Microsoft.

    http://weblogs.asp.net/rajbk/archive/2010/05/09/creating-an-asp-net-report-using-visual-studio-2010-part-1.aspx

  • Thank you for the link - I've had just been to the website and have booked marked it.

    With any luck with all the assistance I have been getting my database project (although, probably easy to most of the members) will be up and running in no time at all.

    And of course I'll be able to put a feather in my cap too!

Viewing 12 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic. Login to reply