structure PersonDB = struct

    type PersonRecord = {
	Name : string,
	Age : int,
	Address : string
    }

    type StaffEmployee = { Personal: PersonRecord,
	HourlyWage: int,
	EmploymentStatus : int
    }

    type Programmer = { Personal: PersonRecord,
	Salary: int,
	Step: int
    }

    type Manager = { Personal: PersonRecord,
	Salary: int,
	Step: int,
	Supervisees: int
    }

    abstype 'x Database = 
	EmptyDB |
	Body of 'x list
    with
	fun AddPerson(EmptyDB, p) = Body([p]) |
	    AddPerson(Body(b), p) = Body(b @ [p])
    end

end