JDBC Tutorial - Crash Course

Sdílet
Vložit
  • čas přidán 27. 07. 2024
  • Ever looked for a comprehensive intro to JDBC that is fun and entertaining at the same time? Then have a look at this brand-new episode of "Marco Codes": JDBC Tutorial [Crash Course].
    In this video, you'll learn how to use JDBC, i.e. the basic API that every Java program uses to access databases. Understand what JDBC drivers are and where to get them. How to use an embedded H2 database, in addition to the usual suspects like MySQL or Postgres. Fire off SQL select, insert, update and delete statements from Java. And finally learn about connection pools and the overall Java database framework/library landscape. By the end of the tutorial, there won't be many questions left when it comes to accessing databases with Java.
    ► References
    jb.gg/4xdxq5
    ► Table Of Contents
    00:00 Intro
    00:16 Project Overview
    01:05 H2 Database Setup
    02:01 JDBC Driver List
    02:41 DriverManager
    03:37 JDBC Urls - Overview
    04:16 H2 JDBC Url - Options
    07:02 H2 - Schema/Data Initialization
    10:10 SQL - SELECT FROM
    10:52 SQL Injection
    13:52 SQL - INSERT INTO
    15:16 SQL - UPDATE
    16:11 SQL - DELETE
    17:32 DataSource
    18:37 Connection Pools
    19:22 HikariCP
    22:56 Library Landscape
    ► FOLLOW ME
    www.marcobehler.com
    / marcobehler

Komentáře • 46

  • @marcobehler1395
    @marcobehler1395 Před 2 lety +5

    ► Timestamps
    00:00 Intro
    00:16 Project Overview
    01:05 H2 Database Setup
    02:01 JDBC Driver List
    02:41 DriverManager
    03:37 JDBC Urls - Overview
    04:16 H2 JDBC Url - Options
    07:02 H2 - Schema/Data Initialization
    10:10 SQL - SELECT FROM
    10:52 SQL Injection
    13:52 SQL - INSERT INTO
    15:16 SQL - UPDATE
    16:11 SQL - DELETE
    17:32 DataSource
    18:37 Connection Pools
    19:22 HikariCP
    22:56 Library Landscape

  • @milanstojkovic2630
    @milanstojkovic2630 Před 2 lety +10

    Every tutorial is soooo good. Please, continue with such a good and educative content

  • @MirekKrenc
    @MirekKrenc Před 2 lety +3

    I really appreciate your effort to make the tutorials so easy to follow and to understand. I like your style of teaching a lot here in yt and also from your paid tutorials. Keep it up!

  • @thomaswaljor6692
    @thomaswaljor6692 Před 2 lety +1

    I like your clear explanations and the structure and order of the available topics in each video. It was a joy to watch your videos :)

  • @nicudomenti5235
    @nicudomenti5235 Před rokem

    Thank you very much ! You saved a lot of time not only for me but for anyone who would like to learn about JDBC in future !

  • @user-nf1dg2rn4v
    @user-nf1dg2rn4v Před 6 měsíci +1

    Every tutorial is very good. Please, continue with such a good and educative content.
    You explain everything so simple.
    Thanks Marco

  • @2vs1
    @2vs1 Před 2 lety

    I like how you explain these things Marco. Brilliant! Keep up the good work!

  • @sebon11
    @sebon11 Před rokem

    Dude, your exaplanations are AMAZING & very cool & great, you deserve waaay more views. Thanks for the video!

  • @mistguides
    @mistguides Před rokem

    Thank you for all the effort! Subscribed as a gratitude.

  • @mkhadka123
    @mkhadka123 Před rokem

    clear and to the point, great video thanks marco :)

  • @WolfBoy2700
    @WolfBoy2700 Před rokem +1

    This was great, thank you!

  • @nellyamirkhanian5617
    @nellyamirkhanian5617 Před 7 měsíci

    Awesome tutorial. Thank you!

  • @enfieldli9296
    @enfieldli9296 Před 2 lety +1

    Keep up the good stuff!

  • @iamsnglrty
    @iamsnglrty Před rokem

    I just watched this video just now and it was both informative and entertaining. Thank you for making learning enjoyable! 👏👏👏

  • @bingtingwu8620
    @bingtingwu8620 Před 8 měsíci

    Thanks for the nice videos!

  • @xSferQx
    @xSferQx Před 2 lety +1

    I fought so long with H2 becuase maven dependency by default had test scope and I didn't notice it. I was so lucky i watched your maven tutorial before :D

    • @mkhadka123
      @mkhadka123 Před rokem +1

      Was that th reason for the error , ?? Coz when I got rid of the test in maven dependency, it WORKED!

  • @MaximPerepelitsyn
    @MaximPerepelitsyn Před rokem

    Thanks a lot Marco for your work, and for sharing your knowledge with peasant devs such as myself (:

    • @MarcoCodes
      @MarcoCodes  Před rokem +1

      No such thing as peasant devs, you're just at a different point in the never-ending learning journey :)

  • @abdqadr
    @abdqadr Před 2 lety

    Thank you for always

  • @viniciusbarbosa1901
    @viniciusbarbosa1901 Před 2 měsíci

    It's so cool to understand how it works under the hood

  • @A09550
    @A09550 Před rokem +1

    Lol, you said "Sayonara" at the end

  • @immortal-spirit-13
    @immortal-spirit-13 Před rokem

    thanks for video. it amazing 🙂

  • @muhammadsalah3981
    @muhammadsalah3981 Před rokem +1

    Amazing tutorial, thanks 👏

  • @goldgold4943
    @goldgold4943 Před 2 lety

    Hi,
    Pls make a video on
    1)shortcuts used for pro devs,
    2) productivity tools used in linux terminal
    3) cool linux tools that pros use,
    4) best tools to view logs in linux terminal
    5) debugging tricks in linux...
    6) without remote debug any way to change java code in jar...
    7) maven build speedup tricks
    8)any way to monitor live java program internals??
    9) best ways to quickly understand new code base
    10)tool to add logs automatically to record all variables in java program.
    11) must have eclipse plugins
    12)most commonly seen java program errors.
    13) u r fav debuggin tips
    You blogs changed my life man.. I was searching for such kind of simple straight forward explanation for a long time... Please do seo on it.. Every new java developer must read it... You are like a God to me for teaching java... Thanks man.. God bless you...

    • @MarcoCodes
      @MarcoCodes  Před 2 lety +1

      That will keep me busy for a long while :) Thanks for the ideas!

    • @goldgold4943
      @goldgold4943 Před 2 lety

      @@MarcoCodes thanks for the quick replies... You are awesome. 👑

  • @ciprianmunteanu6928
    @ciprianmunteanu6928 Před 2 lety +3

    At 21:08, is the problem that, due to Hikari opening multiple connections to the database, the SQL script is also run multiple times ? Also, great video!

  • @mauritianallstar
    @mauritianallstar Před 2 lety

    Great tutorial, what live templates are you using in intellij? Useful one I saw was to create variable without using alt+enter

    • @MarcoCodes
      @MarcoCodes  Před 2 lety

      Actually, you can see all the keyboard shortcuts I'm using at the bottom of the screen, whenever I use them. :)

  • @SineQuaNon1
    @SineQuaNon1 Před rokem

    At 15.25, how did you do the replace insert to update? That was too fast, I couldn't catch it.

    • @MarcoCodes
      @MarcoCodes  Před rokem +1

      I think it was Ctrl+r to open the replace window, and alt+r to do the changes, if I remember correctly.

    • @SineQuaNon1
      @SineQuaNon1 Před rokem

      @@MarcoCodes yes, thanks.

  • @ikbo
    @ikbo Před rokem +1

    Is there an asynchronous version of jdbc?

    • @MarcoCodes
      @MarcoCodes  Před rokem +1

      In short, no, but there are "alternatives". See: r2dbc.io/

  • @yash1152
    @yash1152 Před 8 měsíci

    2:46 how's intellij showing those instructions at the bottom? "Choose Lookup Item via Enter"

    • @MarcoCodes
      @MarcoCodes  Před 8 měsíci +1

      For that there is a plugin called "Presentation Assistant".

    • @yash1152
      @yash1152 Před 8 měsíci

      @@MarcoCodes ohkay. thanks for sharing :)

  • @fumano2679
    @fumano2679 Před 8 měsíci

    Aber warum weiser IDE Hintergrund? Ich checke wegen Weisem T-Shirt und weiser Wand aber meine armen Augen :(

    • @MarcoCodes
      @MarcoCodes  Před 8 měsíci

      Weil beim schwarzen Hintergrund die ähnlichen Kommentare kamen: wie kann man nur schwarz machen, man kann das nicht lesen :)

  • @wirito
    @wirito Před 2 lety +2

    Not entirely happy with how you simplify things :(
    It is ok to work with mongodb, postgreSQL, MySQL or any other database. Just because they need to be installed doesn’t mean people aren’t gonna do it. No one works with an in memory database in the real world. I understand that you’re teaching us and you want to make it simple but please don’t keep it at a bare minimum.
    Hopefully you’ll take it into consideration.

    • @MarcoCodes
      @MarcoCodes  Před 2 lety +2

      @wirito : Of course it is ok. That's why, in the references document, you'll find the links for the JDBC drivers for all the other databases + url strings. JDBC-wise, everything else is exactly the same for all other databases.
      I can't provide installation tutorials for all databases in one video, though those might follow at some point.