Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

difference between database and data structure?

The major operations we do are insertion,deletion and searching in any kind of data structure,which can also be done using database queries then what is the use of data structure?
which makes data structure unique from database?

like image 227
Jegan Babu Avatar asked Dec 18 '25 13:12

Jegan Babu


1 Answers

Data structure shows how the objects in the problem is modeled and organized. For example,

  • Your shopping items are organized linearly into an array;
  • Your company's org chart is modeled in a tree;
  • Facebook connections are organized as a huge graph.

The problem which data structure solves is how to model the objects in real world logically so that we can solve the problem in a computational manner.

Database is about how the information is persisted. The data in data structure may be persisted into database if necessary and may not be.

like image 160
Dong Li Avatar answered Dec 21 '25 11:12

Dong Li



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!