drop view if exists cottage; create view cottage as select * from obj_draft_header inner join obj_draft_cottage using (obj_id, obj_rev);