Column vs Row Oriented Databases Explained

Sdílet
Vložit
  • čas přidán 10. 06. 2024
  • In this video, I explain the differences between Column vs Row Oriented Database Storage how efficient each method is, and their pros & cons. We will also see how different queries perform against both types of databases.
    0:00 Intro
    2:50 Row-Oriented Database
    15:30 Column-Oriented Database
    26:30 Pros & Cons
    Download slides here
    payhip.com/b/JVHIM
    🎙️Listen to the Backend Engineering Podcast
    husseinnasser.com/podcast
    🏭 Backend Engineering Videos
    • Backend Engineering (B...
    💾 Database Engineering Videos
    • Database Engineering
    🏰 Load Balancing and Proxies Videos
    • Proxies
    🏛️ Software Archtiecture Videos
    • Software Architecture
    📩 Messaging Systems
    • Message Queues & PubSu...
    Become a Member
    / @hnasr
    Support me on PayPal
    bit.ly/33ENps4
    Stay Awesome,
    Hussein
  • Věda a technologie

Komentáře • 122

  • @DannyPhantumm
    @DannyPhantumm Před 2 lety +49

    Clearly, you're a naturally gifted teacher. Great content.

  • @kharlcutie4242
    @kharlcutie4242 Před 3 měsíci +2

    Love the way you teach. I almost didn't want the video to end.

  • @SrivatsanVenkatesan
    @SrivatsanVenkatesan Před rokem +1

    I understand this is one of your older videos, but wanted to mention that your content is first class! Thank you!

  • @PrashantZombade
    @PrashantZombade Před rokem +2

    Most interesting way of teaching I have ever found, learning can't be more fun than this!

  • @adrianasensio4298
    @adrianasensio4298 Před 3 lety +9

    The content of this channel is superb.

  • @richboiii17
    @richboiii17 Před 8 měsíci +2

    Incredible video. I was to solidify my understanding of the concept of columnar databases vs row based and this video not only made it easy to understand, but enjoyable too!

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

    One of the best explanations I had seen. Thanks man

  • @murugesanrm
    @murugesanrm Před 2 lety

    Thank you very much for making this video with a real-time example. Much appreciated

  • @williamfelippedeschamps7050

    Great video, well explained, fun and infomative. I loved that, thanks dude!

  • @hnasr
    @hnasr  Před 3 lety +22

    #savetheducks

  • @HopeMlebe
    @HopeMlebe Před rokem +1

    Visually clear, funny and interesting explanations, you are greatly talented.

  • @videosforthegoodlife2253

    Great video man. I like a mix of column (for logging, source of truth) and table based RDBMS and also documented oriented (which could be either row or column) for quick trashy dirty data that makes you blush when you look at it too long.
    But I've seen columns used for quick trashy data - where sums or map reduce is the highest priority and it blows everything else away. I am digging ScyllaDB lately.

  • @ap207
    @ap207 Před 4 měsíci

    Absolutely amazing video. Thank you

  • @nishantgarg7497
    @nishantgarg7497 Před 3 lety +4

    Really awesome content. A really good source for me who is looking to improve the backend concepts. Really thank you for such good content. Just subscribed for updates

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

      Glad it was helpful! and welcome to the community

  • @harshitagrawal8556
    @harshitagrawal8556 Před 2 lety

    Thank you so much for explaining this concept so beautifully and in such a great depth...I am a fan of your teaching.....

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

    Youre very entertaining to watch, listen, and learn from

    • @hnasr
      @hnasr  Před 3 lety

      ❤️❤️❤️

  • @haoyuanhuang5098
    @haoyuanhuang5098 Před 2 lety +4

    Gives concrete examples of when column database operations are faster or slower than a row database. Thank you!

  • @OmarBela12
    @OmarBela12 Před 3 lety +1

    this dude is good, the channel is underrated

  • @muustafaaahmed9782
    @muustafaaahmed9782 Před rokem

    I really loved your method in describing this topic .

  • @michaelgeorge6765
    @michaelgeorge6765 Před 2 lety

    Thank you Hussien. really simple, good and funny.

  • @RooftopDuvet
    @RooftopDuvet Před rokem +1

    Great work here! So many explanations of this are too high level, and miss the key differentiator: i.e. the way in which the data is accessed. You did a great job and did it at your own pace. Hope you find success with this style.

  • @antonsizou9075
    @antonsizou9075 Před 3 lety +1

    Thanks. Good info. Never know how column dbs work

  • @muhammadfarhanmughal6101

    Your Accent and voiceovers make it more attractive to learn.

  • @sujojohn2948
    @sujojohn2948 Před 2 lety

    Thank you so much for this explanation!!

  • @prateekraj1084
    @prateekraj1084 Před 3 lety

    awesome explanation for both row and column oriented db's

  • @virendrabhati6685
    @virendrabhati6685 Před 3 lety +1

    Great information in so simple way..... It's clear the concept in best of best way 👍. I loves your all videos....

    • @hnasr
      @hnasr  Před 3 lety

      Thanks Virendra 🙏

  • @spyros5528
    @spyros5528 Před 10 měsíci

    Great video and explanation, thank you.

  • @luckyboy1986
    @luckyboy1986 Před 3 lety

    Thank you! That's very clear !

  • @srb1855
    @srb1855 Před 2 lety

    this was excellent it cleared up the fud👍 thanx!

  • @gabriellegall8278
    @gabriellegall8278 Před 3 lety

    Thank you so much ! it was so clear

  • @azureabhik
    @azureabhik Před rokem

    Amazing visualisation of concept keeping the technicalities agnostic along with equally simplified narration.
    The quality of your material and narration is inversely proportional to the jokes :)

  • @andreabondanini2509
    @andreabondanini2509 Před 9 měsíci

    Amazing content!

  • @vanigs8726
    @vanigs8726 Před rokem

    ur awesome man .great explanation

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

    Thanks bro, very useful

  • @adityasethi9794
    @adityasethi9794 Před 3 lety

    This just shows how much he loves what he does.

  • @MohammedOmarBalousha
    @MohammedOmarBalousha Před 12 dny

    Great explanation

  • @madanmohanpachouly6135

    Nicely explained

  • @OfferoC
    @OfferoC Před 3 lety +1

    nice explanation thank you

  • @abderrahmanemabroukmerabet9274

    Really good video bro, I like what you do

  • @praveenX
    @praveenX Před 10 měsíci

    Funny and effective, loved it 👍

  • @tirthpatel8364
    @tirthpatel8364 Před 2 lety

    Great explanation.

  • @prem912490022
    @prem912490022 Před 3 lety +1

    Waiting for your udemy course. Great stuff as usual.

  • @yxw9104
    @yxw9104 Před 2 lety

    Thank you so much!

  • @pesetskyps
    @pesetskyps Před 2 lety

    very clear. bravo!

  • @swarajgupta3087
    @swarajgupta3087 Před rokem +2

    You opened my eyes :D

  • @RandomShowerThoughts
    @RandomShowerThoughts Před rokem

    another banger of a video

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

    13:35 Aggregates read more than you need. Only if you don't have indexes on the columns you query and if your core business is querying that data then you will have that indexed anyway. Also: if the amount of reads becomes a problem the first thing you do is de-normalize that value into a separate table.
    This is where database monitorring becomes essential, a nice topic for a ten-part series that will blow your viewers minds :-)
    I'd change the pro's and con's to "what kind of applications benefit from this." because every point you mention has some serious vaceats, related issues and known workarounds.

    • @hnasr
      @hnasr  Před 3 lety

      Correct that is why didn’t include indexes in the mix. Thanks for the feedback as usual

  • @mohammedkandelhassan
    @mohammedkandelhassan Před 3 lety

    Great Video!

  • @ameyapatil1139
    @ameyapatil1139 Před 3 lety +8

    "Lets confused everybody by new names" : hahahaha well said ! great video thanks

  • @darrenz5557
    @darrenz5557 Před 3 lety

    hi! can you do a vid with indexes? the visuals are so helpful!

  • @darthmelbius
    @darthmelbius Před 2 lety

    8:56 I'm assuming that in your example the query will continue beyond the record (and block) it found as there is no index or keys? So it will scan all "blocks" even if it finds only one match?

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

    @Hussein I love your database videos. Could you create a video on how to Alter large tables which has millions or maybe billions of records without a downtime in Postgres.

  • @umapathybabu8397
    @umapathybabu8397 Před 3 lety

    nice demonstration

  • @ganeshbb1
    @ganeshbb1 Před 2 lety

    Thank you..

  • @Nicoblabla
    @Nicoblabla Před 3 lety

    great video!

  • @chunheguo9230
    @chunheguo9230 Před 3 lety +1

    Great vid. I am working with both data structure types :) Using the postgres as a row base to prepare it for a transformation into columnar for gpus to process :)

    • @hnasr
      @hnasr  Před 3 lety +1

      Nice! Your going HTAP

    • @chunheguo9230
      @chunheguo9230 Před 3 lety

      @@hnasr No, not going hybrid transactional, as the columnar data is being used as runtime in memory data until a bulk update changes it.

    • @minscj
      @minscj Před 3 lety

      @@chunheguo9230 hi please could you give me more details how i can do the same? please reply

    • @chunheguo9230
      @chunheguo9230 Před 3 lety

      @@minscj Hi, the solution we went is proprietery, so I can't really go into details. I can however suggest that you take a look at the concept of apache arrow. www.dremio.com/announcements/introducing-apache-arrow/ has a nice diagram. We went very low level and didn't use many of the existing open-source abstraction layers. It all came down to understanding how the GPU's processing cycle works and the alignment of the columnar data to said cycle.

  • @therealdrag0
    @therealdrag0 Před 2 lety

    This column store sounds similar to inverted indexes that search engines (eg elastic search) use. Are there key differences there?

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

    Could you please teach us how to do columnar partition in Postgres? It's easy to find lessons on horizontal partitioning, but I can't find writings on how to do vertical. Thank you!

    • @MercedeX7
      @MercedeX7 Před rokem

      it's called horizontal partitioning. read about it on net

  • @KaranRaina95
    @KaranRaina95 Před 2 lety

    Hey Hussein, wouldn't it be fair to say that to get the advantages of column db in row db, we end up making indexes in row db?

  • @oah8465
    @oah8465 Před 3 lety +1

    Dude that was sweet. Any chance of doing a video on file systems and mapping them to DB OPERATIONS

    • @rujhanarora7892
      @rujhanarora7892 Před 2 lety

      yup, I wonder if I increase the text value in a column or add a new column, how does it map to disk i/o

  • @dylanngo4454
    @dylanngo4454 Před 5 měsíci

    Thank bro 🎉

  • @Firatayrilik
    @Firatayrilik Před 2 lety

    Perfect!

  • @md.imrulhasan8757
    @md.imrulhasan8757 Před 2 lety

    Sir.... Here you said when searching for first_name it automatically load the final block.... it escape first block of first_name..... How can it find it? Is it because the the row_number is indexed in the db table?
    if not then why not find the final block using ssn?

  • @aminebenkhouya7295
    @aminebenkhouya7295 Před 3 lety +1

    u r the best

  • @rajbansal3663
    @rajbansal3663 Před rokem

    Cassandra (NoSQL) uses LSM Tree which makes it a better choice for heavy writes in comparison to SQL databases, any thoughts on this?

  • @saadowain3511
    @saadowain3511 Před 3 lety

    Hussain
    Can you please make a short video of different kinds if DBs who are the providers.. what are the ideal uses.

  • @user-tc8tp9xn8p
    @user-tc8tp9xn8p Před rokem

    Awesomeeeeee

  • @muhammaddavatgar4973
    @muhammaddavatgar4973 Před 2 lety

    love you sir

  • @eric7758
    @eric7758 Před 3 lety

    Great Video Hussein.. when are you doing webrtc?

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

      I am working on the slides, once thats done Ill work on the demos so maybe a week or two

    • @eric7758
      @eric7758 Před 3 lety

      @@hnasr Thanks

  • @sexypradeepkumar
    @sexypradeepkumar Před 2 lety

    Which databases stores both rowbased and column based structures?

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

    Great video. QQ: For columnar DB, if DB stores all the metadata about which block has 1006, won't it also store metadata about social security number 666? So we would need only 2 jumps instead of 3 jumps right?

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

      1006 is the row id(internal to the database). The db only knows in which blocks do these intern ids exist. It doesn't store any such metadata for the other columns

  • @gyhuj1235
    @gyhuj1235 Před 2 lety

    Why can't we just do SELECT Salary from emp? will that be efficient or will it result in the entire row read and then it will be filtered? The table can be indexed for ssn or name.

  • @natem889
    @natem889 Před 3 lety

    How do you work on 1 or less column table?? 🤔

  • @Juasbhu
    @Juasbhu Před 2 lety

    Question, column oriented is the same with family column Db?

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

      Yes same name. Columnar and column store are other names.

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

    Hussein, thanks for the videos. Today imma try & figure out how to download a CZcams video with vanilla NodeJs if I don’t figure imma ask you guys for help

  • @instantshinramen
    @instantshinramen Před 2 lety

    "The devil!"
    "Save the ducks guys save the ducks"
    Now I understand databases.

  • @benevans1377
    @benevans1377 Před 3 lety

    Hey bit of an off topic question why did you change your name from igeometry?

    • @hnasr
      @hnasr  Před 3 lety

      Moving from GIS to personal brand so I get to cover multiple topics mainly.

  • @pdeezz
    @pdeezz Před 2 lety

    You’re hilarious 😂 and offer a great explanation. Thanks!
    #savetheducks

  • @ianokay
    @ianokay Před 6 měsíci

    We generally want all the columns, that's what a record or document is

  • @yanfung7299
    @yanfung7299 Před rokem

    If let's say in a row oriented db, from your explanation the commas does not exist but just for displaying, how will the engine knows where to start to look for first name etc?

    •  Před 10 měsíci

      For instance, PostgreSQL stores these sequences of values in tuple storage, one for each column in the table. The values are serialised and packed together to form the tuple. When querying data from a table, PostgreSQL uses the stored column names in the system catalogs to interpret the tuples' content correctly. The column names are used by the query planner and executor to map the data values from the tuple storage to their respective columns based on their positions in the tuple.

  • @vinitsunita
    @vinitsunita Před rokem

    Lesson learnt from the video, Save the ducks :p

  • @ramadhan6273
    @ramadhan6273 Před 3 lety

    Hussein I wanna know how you had that level of curiosity machallah? is it something gained by training?

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

      It is pure curiosity and asking why and having the humility to learn takes time.

  • @peterisawesomeplease
    @peterisawesomeplease Před 3 lety +1

    Good video but a couple small things. I think the video was slower than it needed to be. Like too many tangent and repetition. We can pause and go back and forth so no need to artificially slow it down. Also i think for this topic leaving out indexes does not make sense. Almost no one is going to choose to use a column oriented db before trying indexes.

  • @icbm7
    @icbm7 Před 3 lety

    🦆🦆🦆🦆 Great video!

  • @carlitoz450
    @carlitoz450 Před 3 lety

    interetsting video, shouldn't data in column oriented db be stored sorted ?

    • @hnasr
      @hnasr  Před 3 lety

      Not necessary, the table data aren't stored sorted usually otherwise writing becomes difficult. Indexes on the other hand are sorted

  • @Juasbhu
    @Juasbhu Před 2 lety

    Hahahahha you're so funny. Good video. Thanks

  • @sudharshantr8757
    @sudharshantr8757 Před 2 lety

    at 21:58 1006 was found directly using some "tricks".. Then why can't we use the same tricks to find 666:1006 in the first try?

  • @jasont6421
    @jasont6421 Před 2 lety

    Lmao, what's the reference to every time you write to a disk that a duck dies? 😹

  • @shubhamjaiswal7608
    @shubhamjaiswal7608 Před rokem

    Nasser, great video. But one observation, clearly you were High while making this video.🤣

  • @stormcorexz
    @stormcorexz Před 2 lety

    I think I can not imagin how locking are working on column oriented database, it is a nightmare unless it has it's own deifferent techniques

  • @hectorge753
    @hectorge753 Před 3 lety

    Six Six Six, the devil... SUBSCRIBED

  • @07rohitpd
    @07rohitpd Před 2 lety

    "...they have all this meta-data, mumbo-jumbo"
    -Hussein

  • @07rohitpd
    @07rohitpd Před 2 lety

    "SAVE THE DUCK", guys, "SAVE THE DUCK".

  • @therealdrag0
    @therealdrag0 Před 2 lety

    Clarification: “column stores” and “wide column stores” are quite different! I watched this expecting to learn about BigTable/Cassandra. But they have key differences so this video doesn’t apply to them. TIL

    • @hnasr
      @hnasr  Před 2 lety

      Correct wide column is different. Group of columns into a column family. Best of both words

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

    save the ducks guys!

  • @sbylk99
    @sbylk99 Před 3 lety

    omg, why only you can explain complicated problems in easy words!
    Tutorials always say "NoSql is good for fast write, scalable, not suitable for complicated query",
    but no one explain clearly as you! Column based NoSql is just for simple data write and AGGREGATE query. One example is number of likes of a video.
    Just define a simple table, (video_id, user_like_id), then sum(user_like_id), this scenario is the best for NoSQl.
    Or sensor data, not complicated(can tolerate write slow), but lots of aggregate query, like min(), max(), average().

  • @GerardBeaubrun
    @GerardBeaubrun Před 2 lety

    666 thank you for the laughter my friend

  • @julianzhai6321
    @julianzhai6321 Před rokem

    Awe man but ducks are delicious

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

    "Lets confused everybody by new names", make them look like a fool who can not understand things, thus makes us more "professional" and "experts"!

  • @kumailn7662
    @kumailn7662 Před 2 lety

    hussein kindly be straight forward on the videos, you to much talkative i like that but i more information centric information seeker. if you provide to the point would be appreciated alot, second don't mixed or drag the words while talking.