Store resource type in SQL