Logical Data Models and Languages > Relational Data Model > Abstract data types
The relational model is extended by spatial data types (SDTs) at the level of atomic data types
(such as integer, string). Spatial data types are abstract funcional view
of spatial objects; that is, a set of operations is defined on objects
of a given type. The implementation of these operations are hired from
users who can use them through a list of operations of a ADT. For example:
- relation states (state_code: INTEGER; sname: STRING; area: REGION)
- relation county (county_code: INTEGER; ctname: STRING; area: REGION; pop: INTEGER; state_code: INTEGER)
- relation cities (cname: STRING; center: POINT; ext: REGION; county_code: INTEGER; pop: INTEGER)
- relation rivers (rname: STRING; route: LINE)
Using a data definition language, examples of the creation of tables are:
Create Table State (
state_code integer,
sname varchar(30),
area region,
Primary Key (state_code))
| Create Table County (
county_code integer,
ctname varchar(30),
pop integer,
area region,
state_code integer,
Primary Key (county_code),
Foreign Key (state_code),
Reference State)
|