Database and Arrays
Essay by people • June 27, 2011 • Study Guide • 857 Words (4 Pages) • 1,945 Views
Explain the relationship between databases and complete data structures and how they are
used.
"A database consists of an organized collection of data for one or more multiple uses" ((n.d.).
Retrieved from http://en.wikipedia.org/wiki/Database). Basically, databases consist of containers
that store and collect data used for an application. The data can then be retrieved, updated, added
to or deleted by program users. "A data structure is a particular way of storing and organizing
data in a computer so that it can be used efficiently" ((n.d.). Retrieved from
http://en.wikipedia.org/wiki/Data_structure). Data structures are used in almost every software
program, are essential to efficient algorithms, and make the management of huge amounts of
data possible.
A database then is for all intensive purposed useless without the data structure within the
software program that is accessing the database. Data structures fetch and store data within the
computers memory so the data can be used by the program. The data, once stored within the
computers memory, is be specified by an address -- a bit string that can be itself stored in
memory and manipulated by the program. To implement a data structure within a program, a set
procedures must be written that create and manipulate instances of that structure. Many high
level programming languages have special syntax for certain data structures, and most
programming languages have some kind of library that allows data structure implementations to
be reused in different programs.
Explain the design and application of arrays and how an array simplifies complex data
structures and program development. Support your answer with a hypothetical real-world
example.
An array is a data structure made up of a number of variables that all have the same data type
(Robertson, 2007). The use of arrays allow programmers to organize homogenous data (data
with of the same type and length) in to a single data structure. "Arrays are among the oldest and
most important data structures, and are used by almost every program and are used to implement
many other data structures, such as lists and strings" ((n.d.). Retrieved from "Array data structure
- Wikipedia, the free encyclopedia." Wikipedia, the free encyclopedia. N.p., n.d. Web. 21 June
2010.) Array data structures are based on computing the addresses of data items with arithmetic
operations. Because an array is an internal data structure it is only needed for the life of the
program. Arrays are a convenient mechanism within a program to store and manipulate a set of
similar data.
An array simplifies complex data structures and program development by loading a set of
initial values in to the elements of an array, processing the elements of an array, searching an
array for a particular element, and writing the contents of an array to a report (Robertson, 2007).
Anytime a program keeps looping back to retrieve the same variables an array can be used to
store those variables ((n.d.). Retrieved from
http://msdn.microsoft.com/en-us/library/aa140074(office.10).aspx). The use of an array will reduce the amount of code needed for the program and will also create a more efficient program as
...
...