Столовая is declined like an adjective because it's an adjective which became a noun. It was столовая комната first.