What is the relationship of ckeypool and ckeystore? In the source, there are ckeypool and skeystore. I wonder what is the relationship of them and why need both.
CKeyStore is a class for storing keys. It provides the functions for storing and retrieving keys.

CKeyPool is a class for a key that is in the keypool. It is specifically a database object for storing a public key and its location inside of the keypool.

CKeyStore and CKeyPool are two different things and are largely unrelated.

The keypool is the set of keys that are unused. It is separate from CKeyStore and has an entirely different purpose. CKeyPool objects are specific to a CWallet which is a subclass of CKeyStore.