
be used.
We store data in real life in various ways depending on what the data is being used for. People will use file boxes to save old bills or tax documents and shelves are used for books or dvd. Depending on what it is you are storing you have to choose the best way to store that information. Data Structures are simply the shelves and file boxes of a program in a computer.
There are three major types of data structures: primitive types, composite types and abstract data types.
The primitive type is very simple. Information is stored as a single element such as a number, character or a boolean (true or false). These primitive data types can only hold object at a time and if a new object is placed into the storage the previous object disappears forever.
The next type is the composite type. The composite type is simply multiple primitive types place in one object usually but always called a struct. The composite type lets the programmer add as many primitive types as the programmers want but just like in the primitive data structure it only holds a finite number of objects that were predetermined by the author. And just like in primitive data types if one of the objects is over written the previous data is lost forever.
The last is abstract data types. Abstract Data types use creative programming techniques to allow a flexible and possibly infinite number of primitive types to be stored. The easiest of these is the Array. An Array is just a list of objects numbered from 0 to the limit of the code. Each object can be over written but doesn't need to be as the programmer can simply keep adding more information on to the end.
There are tons of different types of data structures that can be used and picking the right one is just a matter of what you need to use the information for. A book or taxes it doesn't matter as long as you organize the correct way. I should probably clean my room.
Hi Andrew,
ReplyDeleteNice post. I liked the way you gave an example of motto of teenagers to introduce the concept of data structure. Also the example of shelves and file boxes for explaining how we store data in real life. I agree with you on the similarity you mentioned between file boxes and data structure in computers. It is also true that picking the right type of data structure can be really hard and heavily dependent on the purpose you want to use the data for.
Good post overall !!
Hi Andrew, good job!! Your post is well-structured. I like the analogy of your room to explain how correct use of data structure could help storing and finding a lot easier. You describe each type of data structures really well. I agree with you that there are a lot more complex mechanisms but one should understand how to use the basic three type. Overall, this is a good writing. Keep it up
ReplyDeleteHi Andrew,
ReplyDeleteI really like your post about data structures. Your comparison to a messy bedroom was spot on! I also liked how you wrote this post so that any reader could easily understand what a data structure is. I do not need to know a lot about computers to understand the point of your post. You stuck with the basic three types of data storage and that made for an easy and enjoyable read. Your description of the different types was informative and thorough.