Database relations for tags
Fix parent_id NULL for page listing