Friday, February 1, 2013

Data Structures in Computer Science

Data Structures in Computer Science. Data Structures in Computer Science is a way to store, organize, and manage data stored in computer storage media so that data can be used appropriately and efficiently. In programming techniques, data structure is a data layout that contains columns of data, both visible by users and are only used within the programming purposes that are not visible to the user. Each row in the column collection called the record or records. The width of the column to the data can be changed and type varies depending on their usage requirements. There is a width change dynamically according to the input from the user, there is also a fixed column width. With dynamic characteristics, a data structure or layout of the data can be applied to database processing, such as the purposes of financial data or for word processing (word processor) that has columns can be changed dynamically.

Example data layout can be seen in the spread sheet files such as spreadsheets, base data on the database, word processing, the images are compressed, and the compression of files with a particular technique in the use of layout data. Listing data layout generally include records, arrays, list, stacks, queues, and trees that will be explained in the next section.

Data Types and Data Structures Operations

Basically, the layout of the data is an organizational scheme that is applied to the data so that the data can be interpreted. That way, specific operations can be performed on that data. The layout of the data can also be referred to as a way of storing data in a computer or a representation that can be used efficiently. Meanwhile, data is a representation of the real world facts that can be broadly classified into two categories, namely as follows.
  • Simple data types such as integer, real, and bolean.
  • Simple data types such as multiple sting.
In the use of data layout, there is called the array, the organization of a homogeneous data set and the size or the maximum number of elements have been known since the beginning. These arrays are generally stored in the computer's memory simultaneously with the declaration: int A [5];, which means a variable is a collection of data by the number 5that type integer numbers. Operation of the array elements is done by accessing data directly. Value of each element positions can be taken and stored without passing another position. Thus, the operation also known two types of data, as follows.
  • Operating on a single element or position of the array, the storage element value to a particular position in the array and taking the value of the elements of a given position in the array.
  • Operation of the array as a whole.
In use, the array is suitable for random data access. Various elements can be referred to any of the array directly without passing through other elements. If you are in a location elements, neighbors will be very easy to trace, both elements of the predecessor and successor elements. The elements of the array with the values ​​should be maintained entirely independent, so the use of data storage will be very efficient. Meanwhile, array system also has shortcomings in terms of flexibility are low because the array has limitations below.
  • The array must be of type homogeneous so that you will not be able to have a character array elements, number, or other element types.
  • Programming languages ​​in general are difficult to implement a static array to be resized at execution time. Addition and subtraction are done continuously will make a static representation can lead to inefficient use of memory, wasted a lot of computation time, and can not be static representation possible.
Types of Data Structures

Here are the types of structure or layout of data in programming.
  • Integer, long, namely the type of data for a round figure. The data are integers, variables can be declared with this data type.
  • Byte, the data type for binary data or hex. This data type can store a value between 0 and 255.
  • Single, double, ie data types for numbers and decimal fractions.
  • Currency, the data type for currency rate. This data type is only capable of storing data up to 4 decimal places.
  • String, the data type to text. This data type can store data in the form of a sentence, not a numeric data.
  • Bolean, ie data type logic (true / false).
  • Date, ie the date or time data type.
  • Object, which is the data type for an object.
  • Variant, the Variant data type.
The use of appropriate data layout in programming can produce algorithym a clear and precise so that the program would be simpler and more efficient overall.

Types of Simple Data Structures

Here are some types of structures or simple data layout used in the programming.

1. Array (Array)

Array is a statistical structure that is used to store a set of homogeneous elements of that type. Each element can be accessed directly via its index. Array index is a data type that is used to declare the order of, for example integrer or character. The number of array elements must be specified before the program is executed. Type of array elements can be either simple data, structured, and the other array types.

2. Record (Note)

This type is also called ADT or a set of basic operations that can be translated into the type defined in a programming language is concerned.

Types of Compound Data Structure


Here are some of the structure or layout of data compound commonly used in programming.

1. Linear Stack (Stacks)

The stack is known for its top element, rule insertion and removal of certain elements. Therefore, the top is the only address where the operation.

2. Queue

The line is a linear list recognized as the first element and the last element. Rule insertion and removal of elements is always done at the first element of each element can be accessed via the info.

3. List

List is a list in the form of a set of linear homogeneous type element that has a certain order with each element consists of two parts.

4. Nonlinear Binary Tree (Binary Tree)

The binary tree is a finite set can be empty or consists of a node called the root and two other sets a binary tree (right and left). Binary Tree is a type of structure or layout of data is very important and frequently used in various kinds of applications. Binary trees have the same characteristics, ie most nodes have only two children or no children at all.

5. Graf

Graf is a type of data structure or layout of the most common compound that can be easily found. This structure allows for the definition of infinite connectivity between data entities. Data entities will have a direct relationship and unlimited. For example, the topology information and distance between cities in Java.
Usability Data Structures

In essence, this structure is used to improve the efficiency of memory usage when running a computer program. Use the proper structure at the programming takes place can make algorithms easier thus making the program more efficient and simple.

Improved efficiency is the main objective of the application data structures in programming. That way, the reservation process unnecessary memory can be minimized and this will also ensure ease of understanding the algorithm so that problems such as matrix multiplication, matrix visualization, and the table will be more easily understood and resolved.

No comments:

Post a Comment

Thanks for comment here, admin.