Wednesday, October 28, 2009

Table

A table, T, is an abstract data storage structure that contains table entries that are either empty or are pairs of the form (K, I), where K is a key and I is some data or information associated with the key K.

In a table, there is no order on the elements. A table with no order, showing
a list of students with idenfication number, name and phone is given below.
given below.




Figure 1: A Simple Table

The identity number is “key”, and name, phone etc are “information” associated with the key.
A common table operation is table searching, which is an activity in which, given a search key, K, we attempt to find the table entry (K, I) in T containing the key K. Then we may wish to retrieve or update its information, I, or we may wish to delete the entire table entry (K, I). We may also wish to insert a new table entry (K, I). We can enumerate entries in table T, e.g. to print contents of the table.

Table can be represented by various data structures like C struct, arrays and linked lists.

No comments:

Post a Comment