select p.pretty_name as package_name, t.pretty_name as type_name
from pb_packages p, pb_types t
where p.pkg_id = :pkg_id
and t.type_id = :type_id
select pretty_name
from pb_attributes
where attribute_id = :attribute_id
delete from pb_attributes
where attribute_id = :attribute_id