Course Module: Data Course Topic: Data structures Comment: Data structures are organised collections of data items. For example, the text on this page is organised or structured into paragraphs, sentences and words. It is structured according to the rules of English so that it can communicate meaning to the reader. Computer-based data structures are used to facilitate the processing, as well as the storage and retrieval, of data. A common structure used by computers is tables of * most organisations have a table of important data, for example clients, customers, books, products, videos. A table consists of columns and rows. The columns describing what characteristics will be stored about each entity (the field headings) and the rows defining the characteristics of each entity. This table holds a collection of records (the rows).
In structuring a table a number of things must be * names - allows easy identification of data items
Field width - sets aside a set number of 'spaces' or digits this can also assist with validation, for example, you might set a postcode field to 4 this would ensure that no one entered more then 4 * type - the type of data to be stored in that field, for example, character, numeric, date. This also helps to ensure no incorrect data enters the system. If a field was set up as date, only 'real' date could be entered. The system would pick up unreal dates such as * key - ensures data integrity, no duplicate records, each record uniquely identified by a key, such as a membership number or license number.
If data structures are chosen that do not reflect the structure of the input, the meaning of the data can be obscured. For example, if this text were printed as one word per line it would be difficult to extract the meaning, although the data is identical. Each form of output has a particular data structure; a text document would be structured differently from a web page or a presentation file. A spreadsheet would be structured similarly to that of a table, but would be mainly concerned with providing the numeric information required rather then reporting on the collection of records as a database would. |