ICANDO Site Safety

ICANDO Site Safety

481 DATABASE DESIGN FOR THE ADD FEATURE USE CASE The operation of drawing tools like the site safety system usually involves reading all the details into memory on startup, maintaining the in-memory version, and saving the modified versions back on exit. This is much the same way most word-processing systems work. It is unlikely that two people will be editing a site at the same time, and therefore all the issues about locking and so forth are ignored.

For a tool like this, saving data in files is often the option chosen. However, we shall assume that there is a relational database for storage. So far, there are two entity objects, facility, and site, that need to be stored. The site is straightforward, except for the list of facilities. The database trick on this is to put a key on the site (shield) and to place that key in the facility record so that all the facilities for a site can be found by searching the facility table for all records with a particular site. The facility record is a bit more complicated. Firstly there is the notion of a coordi fate, and we can simply manage that by putting the coordinate attributes in the facility record. The shape presents more of a dilemma, and there will need to be a separate shape table or set of tables to deal with this, on a value (this is left as an exercise). Thus we have schemas:

site(shield, name, address) facility(facility. x, y, type, shield, shaped)

We will most probably need extra tables for each of the particular types of facility, keeping specific information about that type of facility

Share