0

I recently completed a course Algorithms part I and hence learned a lot of data structures that are used to store data in appropriate ways.

I realize that today for maintaining data we use data bases rather than writing data structures. We cant change these data structures used by the data base(Or can we). So when we go for permanent storage do we always go for database use(wont that hit performance), or is their a way in which both of them are used in a combination?

asked Aug 6, 2014 at 8:49

2 Answers 2

2

Databases are themselves comprehensibly designed to perform efficiently in all possible conditions. These databases are used only to store compact and vast data. If one has simpler,lesser and minimal needs to store and save data like that of a small program,these smaller data-structures would work easily on a flat-file system.

Also,I feel you are trying to compare flat-file-storage which utilises data structures and which are directly visible to the user WHEREAS in the case of database you can't say about their implemented data-structures to save the file and perform the data-manipulation operations as they are not visible to the user!

But,databases themselves perform hashing,indexing and other data-structures to implement their data storage techniques. They are efficiently coded as per internal data-structures that we generally don't find externally data-structure from the front-view. BUT,THEY DO IMPLEMENT THEIR DATABASES ON THE SAME TECHNIQUE!

answered Aug 6, 2014 at 8:57
Sign up to request clarification or add additional context in comments.

4 Comments

does that mean that user made data structures are rarely used today? Can you tell me some applications where user created data structures are used?
hey, i didn't deny about it's existence at all! I just said that they are inherent in database implementation. YOu don't need to externally provide it. Next, all the algorithms which are used does employ the data-structures like Stack,Binary Trees,Hashing. I hope I am clear...
i dont deny it either, im just asking weather explicitly specified data structures are used widely anymore as you said that they are already inherent in database implementations?
You can surely find explicit use of data-structures in search engines,news feeds on social networking sites, and all the other fields where custom requirements are needed.From custom requirements, I mean where pre-built data-structures are not sufficient and we define them as per our need,like even some games store urgent-data in the form of logs and check configuration or status from that log file! That log-file is a custom data-structure implementation! I can guarantee now that you might have got the point. But,feel free to ask if the question still persists!
1

Data structures that you learnt ( I suppose), like List, Maps, Trees etc. are the core concepts of the modern Relational databases.

For example:

  1. B-tree is used in many databases. The B+-tree is used in many well known databases as well as common filesystems like NTFS.
  2. SQLite uses B+ tree
  3. SQL Server uses heap or B-tree

Majority of databases use a combination of these data structures, sometimes implementing a customized version. These are optimized for high performance.

For permanent storage, you can use a file system with manually implementing any data structure of your choice, but that would be like re-inventing the wheel

answered Aug 6, 2014 at 17:49

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.