Difference between database and data structure?

The main operations that we perform are inserting, deleting and searching in any data structure, which can also be performed using database queries, and then what is the use of a data structure?
What makes a data structure unique from a database?

+7
source share
7 answers

A data structure is the storage of data or the processing of data in RAM or temporary memory. where Database is a concept or tool that stores and processes data in a permanent memory location (hard disk)

The data structure is not permanent storage. He is alive until the program is alive. But we can use a different data structure to add data to the database.

we use a database to store a data structure containing process data at the end of any process.

+5
source

The data structure shows how objects in the task are modeled and organized. For example,

  • Your shopping items are organized linearly into an array;
  • Your corporate company chart is modeled in a tree;
  • Facebook connections are organized like a huge schedule.

The problem solved by the data structure is how to logically model objects in the real world so that we can solve the problem in a computational way.

, . , , .

+3

(, , , , ..)

. , , . SQL , -. , .

, , "Platypus". , "DuckbillsInTheWild" "DuckbillsInCaptivity" ..

:

Name            Data Type
-------------------------
ID              int
Name            VarChar
Weight          Float
PoisonToeLength Float
+1

, . . ( ).

,

" A data structure is a specialized format for organizing and storing data. Any data structure is designed to organize data to suit a specific purpose so that it can be used according to needs, stored normally on RAM" -wikipedia

"A database is an organized collection of data. It is the collection of database objects stored normally on hard disk." -wikipedia

, , , , , . Ram ( AKA), ( AKA). !!!!

- , , . . , , , , , , .. . .

btree/btree + index Btree. -, , - . , . .

0

- , - . - , - .

0

, . - , .

, . , ( ). . , -, . , , .

, - ( ).

0

, - , , , , .. , , . , , , .. . , , . , - - , - .

0

Source: https://habr.com/ru/post/1616822/


All Articles