Abstract-Automated service composition fulfills complex tasks by combining different existing web services together. Unfortunately, optimizing service composition is still a challenging area that needs to be addressed. In this article, we propose a novel relational database approach for automated service composition. All possible service combinations are generated beforehand and stored in a relational database. When a user request comes, our system composes SQL queries to search in the database and return the best Quality of Service (QoS) solutions. We test the performance of the proposed system with a web service challenge data set. Our experimental results demonstrate that this system can always find top-K valid solutions to satisfy user's functional and non-functional requirements.