move link type definition to db package