Databases Reference
In-Depth Information
For example, if the system had to use the representation shown in
Figure 2.7 to check whether the move of the black queen to column 1, row 5
is valid, the information processor should check, among other things, that
the representation square in column 2 and row 6 does not have any icon over
it. Neither representation square nor icon is a relevant concept in the
domain. It is much better that the information processor may ask questions
like Is the board square of column 6 and row 2 free? where both board
square and free are defined in the conceptual schema. For similar reasons,
which will be explained, the information processor cannot use an internal
representation.
What is most natural for the information processor is to use a represen-
tation based on the conceptual schema, which is the information base. How-
ever, the information base is virtual, because it does not exist physically
within the system. When the information processor asks itself questions like
Is the board square in column 6 and row 2 free? it behaves as if the infor-
mation base really existed. In reality the question will be sent to the internal
processor, which will answer it using the physical DB.
The representation of the state that the system has to maintain internally
must allow, among other things, an efficient execution. That means the design
of the internal representation must take into account technical factors. We call
internal schema the representation form of the state of the domain used inter-
nally by the system, and internal DB the state representation in that schema.
The internal DB is the only one that has a physical existence. The internal
schema also includes the set of operations that can be invoked on the DB.
An internal schema for the system example that would be almost optimal
from the point of view of the amount of space used (although not from other
technical points of view) could be a file with the following record structure:
PieceType, Color, Row, Column
where PieceType could use one character (with a K for king, Q for queen,
R for rook, etc.), Color one bit (0: white, 1: black), and Row and Column
a single byte (number 1
8). Internal schemas, like the external ones, are
defined with respect to the conceptual schema. In the example, the corre-
spondence might be:
¼
The file has a record for each piece that is on the board.
·
The first field indicates the piece type, the second its color, the third
the row number of the board square where the piece is located, and
the fourth the column number.
·
Search WWH ::




Custom Search