Design of a Database-Driven Control System based on the Similarity