20 Years of SQL Advice in 11 Minutes

Поделиться
HTML-код
  • Опубликовано: 27 ноя 2024

Комментарии • 45

  • @DatabaseStar
    @DatabaseStar  День назад

    Want to easily remember the SQL commands for your database? Get my free SQL Cheat Sheets here: www.databasestar.com/get-sql-cheat-sheets/?

  • @anotherme4638
    @anotherme4638 4 месяца назад +15

    "Tip 18 : Before you run Update or Delete statement run it as Select statement first"
    ooh man, I learned this tip the hard way.
    Again, This is an amazing videos, thanks a lot for sharing these tips

    • @DatabaseStar
      @DatabaseStar  4 месяца назад +2

      Thanks a lot!

    • @MrMudbill
      @MrMudbill Месяц назад

      Screwing up a production database is the graduation ceremony 😅

  • @hasnaouiacademy7899
    @hasnaouiacademy7899 4 месяца назад +2

    Your channel literally changed my life, I am backend I learned sql and database but I found your channel amazing
    Thanks a million 😊

    • @DatabaseStar
      @DatabaseStar  4 месяца назад +1

      Wow thanks for the kind words. I’m glad you like the channel 😊

  • @personalaccount1515
    @personalaccount1515 День назад +1

    Thx dude, this is video is pure gold!

  • @michaellebediev6715
    @michaellebediev6715 10 дней назад +1

    Great job, bro! Thanks!!

  • @tcurdt
    @tcurdt Месяц назад +1

    dbml is pretty great for documentation purposes. I much prefer it over some random ERD editor.
    Tip 17 really depends on what it is. For some things there is really no point.
    Tip 19 also really depends. When done correctly, denormalization can help a lot with query performance and resource optimization. But this is mainly very big DBs and high load situations.

  • @maxyudin
    @maxyudin 4 месяца назад

    Watching your channel, I realize how many mistakes I made in my old web projects. If I encounter SQL again, I will be many times smarter. Thank you so much!
    P. S. Only a handful of subscribers for such a useful channel. That's not right.

    • @DatabaseStar
      @DatabaseStar  4 месяца назад

      You're welcome! I also wish I knew a lot of these things early in my career.

  • @imadabab
    @imadabab 4 месяца назад +1

    Nice tips. Thanks for sharing. I have subscribed.

  • @glennmorrow2755
    @glennmorrow2755 2 месяца назад +2

    Isn't a CTE though just some sugar syntax for a temp table - which you can also name what you want. Maybe under the hood it has some more efficiencies but I think a temp table may offer some slight additional freedoms also (you can do all sorts of work on it before calling it in a later join, and even have that work interspersed with other work first also. I think CTEs look cleaner and keep the code tidy but I tend to use temp tables and just go wild (Lol).

    • @DatabaseStar
      @DatabaseStar  2 месяца назад +1

      It's like syntactic sugar for a subquery, rather than a temp table. It's similar to a temp table however there is no database object created. As you mentioned, a temp table has some additional freedoms and you can do more work with them before the main query.

  • @deeppatel4002
    @deeppatel4002 4 месяца назад +1

    THANKS FOR THIS RELLY HELPFUL

  • @neila880
    @neila880 4 месяца назад

    Excellent tips. Thank you!

  • @proatgaimz
    @proatgaimz 4 месяца назад

    Great advice, thanks Ben!

  • @TheCodeConnoisseur
    @TheCodeConnoisseur 4 месяца назад +1

    Fantastic Advice!

  • @Emiliopful
    @Emiliopful 4 месяца назад

    Thanks for the tips!

  • @patrickkahng2274
    @patrickkahng2274 4 месяца назад

    Excellent. Thank you.

  • @hyperborean72
    @hyperborean72 Месяц назад

    I especially loved tips ## 17, 18

  • @MrMudbill
    @MrMudbill Месяц назад

    I'm not the primary back-end dev at my job, but my colleague who has been there for over a decade still writes his SQL statements manually in the terminal every time, especially in production, and I get mini heart attacks every time I see him write DELETE or UPDATE. I don't want to pretend like I know more than him, but I don't think that's a good idea. I have pointed out to him more than once a typo he's close to making.

    • @DatabaseStar
      @DatabaseStar  Месяц назад

      Wow that’s risky! Not surprising though, we can all get stuck in our ways sometimes.
      Thanks for sharing!

  • @dn9416
    @dn9416 4 месяца назад

    Thanks Ben

  • @siya.abc123
    @siya.abc123 4 месяца назад

    Tip number 18, I learned the hard way 5 years ago 😢

    • @DatabaseStar
      @DatabaseStar  4 месяца назад +1

      Oh yeah this tip can definitely be learned the hard way (I've done it too)

  • @yatambarolijie-ud8ed
    @yatambarolijie-ud8ed 4 месяца назад

    THANK YOU BIRO FROM ETHIOPIA ADDIS ABABA

  • @jungervin8765
    @jungervin8765 2 месяца назад +1

    I don't agree with 'Don't be afraid of joins', it is a performance hit both for CPU and IO. You should avoid them if it makes sense, and use them if they are neccesary. It depends on the project, the budget, the type of sql software. For example if you are using sqlite single node performance can be important.

    • @DatabaseStar
      @DatabaseStar  2 месяца назад +2

      Good point. I feel it's more important to design your database so it's an effective design, such as not repeating data and making maintenance easy. If you need to improve performance, there are things you can do to write queries to avoid joins (materialised views, temp tables, and so on).

  • @patrickkahng2274
    @patrickkahng2274 4 месяца назад

    Excellent. Thank you.