insert into dotlrn_classes (class_key) values (:class_group_type_key) select node_id from dotlrn_classes where class_key=:class_name insert into dotlrn_class_instances (class_instance_id, class_key) values (:community_id, :short_name)