structure PersonDB = struct

    datatype PersonRecord = {
	EmptyPerson
	Name of string |
	Age of int |
	Address of string


    datatype StaffEmployee = Personal of PersonRecord,
	HourlyWage of int |
	EmploymentStatus of int

    datatype Programmer = Personal of PersonRecord |
	Salary of int |
	Step of int

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

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