Parse and store link scopes in db.