layered database