17 votes

Looking for free or cheap places to learn some SQL and XML

Im looking for places online to explore SQL and XML as a beginner without spending a lot of money and without a lot of performance pressure. Can you help?

16 comments

  1. [5]
    drannex
    Link
    This is the only answer you need: Codecademy, I have helped teach so many people (and myself!) through that service. Seriously, their SQL class (and HTML/Python/etc) are some of the best you could...

    This is the only answer you need: Codecademy, I have helped teach so many people (and myself!) through that service.

    Seriously, their SQL class (and HTML/Python/etc) are some of the best you could ever pay for, and it's free.

    For XML, not really needed these days, but if you know HTML, then you know XML, and if you don't know HTML, then check out the HTML track on that site and you'll know it!

    10 votes
    1. Lapbunny
      Link Parent
      Seconded, I learned a good number of basic language knowledge off their courses back when. Very interactive and simple. Additionally, I'll say that SQL is probably the most "like English" language...

      Seconded, I learned a good number of basic language knowledge off their courses back when. Very interactive and simple.

      Additionally, I'll say that SQL is probably the most "like English" language I've learned - you can string together sentences, they roll off the tongue, but the important stuff with databases is far from syntax. Understanding what you're trying to return or what you DO return, knowing what you should or shouldn't do in a database or what structures conventionally look like in regards to things like normal forms, good database structure, optimization, etc are all just as important as knowing SQL itself. It's less constrained by the syntax in general, and it's because it's not doing the same kind of stuff as typical programming. If the course doesn't have that, make sure to follow up with some deeper database knowledge if it's relevant to your career.

      5 votes
    2. HeroesJourneyMadness
      Link Parent
      Third-ed(?) CodeAcademy is great. I should probably bone up on some skills there too. Right now I'm working through an AWS course - all in one 13-hour long youtube video. (not on CodeAcademy.)

      Third-ed(?) CodeAcademy is great. I should probably bone up on some skills there too. Right now I'm working through an AWS course - all in one 13-hour long youtube video. (not on CodeAcademy.)

      2 votes
    3. [2]
      imperator
      Link Parent
      XML is still widely used for file transmissions. SAP is all XML, almost all the banking standards are XML or will be as of 2025

      XML is still widely used for file transmissions.

      SAP is all XML, almost all the banking standards are XML or will be as of 2025

      2 votes
      1. drannex
        Link Parent
        For most modern applications they've finally moved on to better configuration languages, and that's coming from me - someone who actually enjoys working directly with XML more than JSON. But, yes,...

        For most modern applications they've finally moved on to better configuration languages, and that's coming from me - someone who actually enjoys working directly with XML more than JSON.

        But, yes, you're right there is a lot of weird legacy applications that rely on it, one of which is the entire banking industry, but they are always slow.

        2 votes
  2. [3]
    Reapy
    Link
    I'd like to add on that with something like XML as people have mentioned that while it is very trivial to understand the format, I have found it not very trivial to actually interact with XML. The...

    I'd like to add on that with something like XML as people have mentioned that while it is very trivial to understand the format, I have found it not very trivial to actually interact with XML. The different formats for data like XML, JSON, YAML are just really rules for parsing a text file. In the end you are almost going to be more concerned with how the programming language you are using will be reading them in.

    Granted, I haven't had to interact with XML in a few years so may be dated in saying this, but found it always a bigger job than I wanted it to be to do things with an XML file. So I could easily create one for a small example, but the actual act of parsing it into a data structure and doing any basic CRUD operations on it always took a little longer than it would seem at first glance.

    More recently, I tend to see JSON or YAML in place of where I used to see XML, and it seems to me a lot of json libraries have been easier to work with, but generally I've only used JSON to quickly serialize/deserialize things rather than reading in larger sets of data with it. I do overall feel that XML is on the way out and it may be worth focusing on JSON and/or YAML over it.

    SQL can be a pretty big topic on its own and you would really benefit from something more structured than only tutorials and project learning. You can get the initial stuff out of the way by tutorialing though, it helps the formal class have context if you are a bit aware of what is going on ahead of time.

    4 votes
    1. sneakyRedPanda
      Link Parent
      Just to add to this, I think one of the biggest differences between JSON and XML is the fact that XML is inherently a little more expressive, or at least it is in some cases easier to express some...

      Just to add to this, I think one of the biggest differences between JSON and XML is the fact that XML is inherently a little more expressive, or at least it is in some cases easier to express some piece of data when you can leverage XML element attributes.

      You are definitely free to represent whatever data you want to in either format, but with XML the added flexibility means that it’s harder to represent the structure in any given programming language. JSON is easy to represent in languages that have a hash or hash table or dictionary type, because they’re effectively the same thing. XML isn’t that simple.

      in the vast majority of cases I don’t find the extra flexibility and expressiveness of XML to be particularly helpful. The increased difficulty of parsing and construction of XML in any given programming language is a non trivial hurdle.

      Now that I’ve written a couple paragraphs and have successfully held my tongue for the most part, I’d like to say that I genuinely despise XML.

      4 votes
    2. imperator
      Link Parent
      Depends, corporate file transmissions and financial (SWIFT for bank statements and settlement instructions) MOVING to XML from legacy systems lol

      Depends, corporate file transmissions and financial (SWIFT for bank statements and settlement instructions) MOVING to XML from legacy systems lol

      1 vote
  3. PetitPrince
    Link
    Once you've got a basic grasp of SQL, you can play The SQL Murder Mystery.

    Once you've got a basic grasp of SQL, you can play The SQL Murder Mystery.

    4 votes
  4. Eji1700
    Link
    https://www.sqlzoo.net/wiki/SQL_Tutorial is another good resource. Very easy to get into and has a very natural progression.

    https://www.sqlzoo.net/wiki/SQL_Tutorial is another good resource. Very easy to get into and has a very natural progression.

    3 votes
  5. ShroudedScribe
    Link
    In addition to the great resources everyone else has shared, if you're looking for somewhere to practice or test (beyond something like codecademy interactive exercises), you can install a free...

    In addition to the great resources everyone else has shared, if you're looking for somewhere to practice or test (beyond something like codecademy interactive exercises), you can install a free version of Microsoft SQL on your local computer - it's the developer version on their downloads page.

    Then install SQL Server Management Studio (SSMS) on your local computer as well, and you can connect the developer server and create databases, tables, views, stored procedures, etc exactly as you would in an enterprise (Windows) environment.

    If you want some test data, Microsoft has a set they call AdventureWorks.

    And keep in mind all of this information is assuming your (current or future) employer is using MS SQL. There are some variations between MS SQL, MySQL, and Oracle's implementation, but focusing on learning one will get you far enough to work with any of them (perhaps with a translation cheat sheet by your side).

    2 votes
  6. Weldawadyathink
    Link
    I can only really learn by doing something, so my advice is to start doing it. You quite possibly have SQLite already installed on your computer. If not, go and download it. Find a sample dataset...

    I can only really learn by doing something, so my advice is to start doing it. You quite possibly have SQLite already installed on your computer. If not, go and download it. Find a sample dataset and start doing something. When you can’t figure out how to do a query, look it up and learn.

    I haven’t done anything with xml though.

    1 vote
  7. Akir
    Link
    XML is just a very basic markup language. If you know HTML, you basically already know XML. Most use cases don’t actually require you to even know much about it because there are tools that will...

    XML is just a very basic markup language. If you know HTML, you basically already know XML. Most use cases don’t actually require you to even know much about it because there are tools that will write it for you. That being said, XML by itself is useless; it really only matters in the context in which it is used, so if there is something motivating you to learn about it it might be a better idea to dive into that rather than XML itself.

    SQL is harder, but not nearly as hard as many would have you believe. I would honestly recommend just searching your local library for a book about it because the thing that people tend to stumble on is that they don’t understand the ideas that inform it. You might be surprised to see you already know most of it, with the hardest stuff being the terms used to describe them. Personally, the thing I find hardest to remember in the off times I have to write an SQL query is the correct way to pass strings (it’s just different enough from everything else that I forget every time) and the way it orders operations.

    One thing to be aware of is that there is essentially no real standard for SQL. There is a “base”, but every database has its own rules, caveats, and extensions. It’s better if you choose a book that covers a specific database, but to make note when it mentions that a feature is specific to it. Might I recommend Postgres? Though if you intend to learn for professional reasons it might be better to learn MS SQL or Oracle.

    1 vote
  8. saturnV
    Link
    https://sqlbolt.com/ is a nice free way of learning simple SQL

    https://sqlbolt.com/ is a nice free way of learning simple SQL

    1 vote
  9. [2]
    first-must-burn
    Link
    I'd say other commentd are mostly right about XML just being like HTML. Basic XML is perhaps deceptively straightforward –– just nested arbitrary tags. Places where it gets weird are: schema –...

    I'd say other commentd are mostly right about XML just being like HTML. Basic XML is perhaps deceptively straightforward –– just nested arbitrary tags. Places where it gets weird are:

    • schema – rules about structure allowed in an XML file
    • namespaces – related to schema and allowing multiple schema with possibly colliding tag names to coexist
    • parsing – stream parsing, which us event based and potentially works on very large files vs DOM parsing there you have the whole data set in memory like you would with HTML
    • whitespace handling – For example, parsing an XML file and then rewriting it may not produce exactly the same file, and it may destroy information depending on the data. Different parsing libraries may have special data structures to preserve leading and trailing whitespace.
    • CDATA structure for encoding binary data

    Not that you necessarily need all this to do XML, but if you're looking to learn, there be the dragons.

    On the SQL side, a graphical tool like DBeaver is very useful for building database schema, and even testing queries and seeing the results. I learned a lot by building up schema and seeing all the bits it added (like encoding, null/not null, etc) when you dump the schema to SQL.

    I'd say a good exercise might be to try to find a pretty complicated existing XML dataset to work with, develop a database schema for it, and parse it out of XML and get it into the database with SQL.

    1. teaearlgraycold
      Link Parent
      For SQL I'd recommend using SQLite and something really simple like SQLiteBrowser. DBeaver is a bit slow and will trip you up unnecessarily.

      For SQL I'd recommend using SQLite and something really simple like SQLiteBrowser. DBeaver is a bit slow and will trip you up unnecessarily.

      1 vote