select 1 from attachments_folder_map
where package_id = :package_id
select folder_id from attachments_folder_map
where package_id = :package_id
insert into attachments_folder_map
(package_id, folder_id)
values
(:package_id, :folder_id)
delete from attachments_folder_map where
package_id = :package_id and
folder_id = :folder_id