Sign in
Log inSign up

What is data structure and DBMS??

Devashish Rana's photo
Devashish Rana
·Jun 28, 2021·

2 min read

This is my first blog, so I thought of keeping it really really short. A simple way to visualize and differentiate between DBMS and data structures.

How is data stored in Disks??

image.png

Imagine disk as a concentric circle. Which is divided into multiple slices. The path between each concentric circle is known as a track. The slice of the circle is known as a segment. The data is stored in a block. The block is identified by track and segment. Example: Block 0, in the diagram, is identified by sector 0 and track 2.

The data is stored in the disk inside a block. Now, imagine it in terms of the database. The data in a relational database is stored in a table, as a row. Let's assume, a block size to be of 512 bytes and a row to be of size 128 bytes, considering this, a block can store 4 rows of the table.

This way of storing data in the disk efficiently comes under the DBMS (database management system).

So what is data structure then?

To do some operation on data stored on the disk, the data has to be brought into the main memory also known as RAM (random access memory). In the RAM, the data has to be stored in an efficient manner to do some operation on it. This area of storing and manipulating data in main memory comes under the data structures.

Thanks for reading...

I appreciate the suggestions and advice. Please provide suggestions and advice on writing blogs.

Hassle-free blogging platform that developers and teams love.
  • Docs by Hashnode
    New
  • Blogs
  • AI Markdown Editor
  • GraphQL APIs
  • Open source Starter-kit

© Hashnode 2024 — LinearBytes Inc.

Privacy PolicyTermsCode of Conduct