Database and skeleton functions