User:Ootz0rz/csc300 wiki article draft

In the field of Computer Science, a grid file is a multidimensional array, normally held on disk, and used as an index into a database of information. Consider a census database searchable by location. A data record represents a single household, and records are grouped into 'buckets', where all the records in a bucket relate to the same city, and to streets in that city whose names begin with the same letter. A grid file could be used to index this structure, where records came in 'groups' of 26, each of them relating to street names in a city, starting with one of the letters of the alphabet. Such an arrangement can be thought of as an array, table, or grid, with two dimensions. One might consider 'city' to be the y-axis, and 'first letter of street' to be the 'x-axis'. The records in such a structure are known as 'cells'. The cells will contain pointers to the appropriate bucket in the database where the data records are actually stored. An extra cell, or 'record header' will be necessary to store the city name, but the other cells grouped with it need only contain the pointer to their appropriate bucket, since the first cell is for streets beginning with 'B' the second with 'A' and so on. If our database has ambitions of world domination, we might add another field 'continent'. Records in the same bucket would now relate to house-holds on streets starting with the same letter, in the same city, and on the same continent. The cells in the grid file would now consist of the 'city' header, and five groups of twenty six cells relating to streets starting with A-Z on each of the continents (six if we have friends in Antarctica), and could be thought of as a 3 dimensional array. It might be objected that the same thing can be achieved with a one dimensional list of records, where the key is made by combining the city name and first letter of the street name. However, this is a grid file, the only difference being that the key is now held in each cell, and so space is wasted.