In this thesis, we describe a simulator of residential power consumption, as the first step towards a comprehensive demand-side simulator in the context of smart grid. The si mulator uses a commercialRelational Database Management System (RDBMS) as its simulation engine, and is thus capable of supporting much larger simulated systems than other existing simulators which are mostly based on a multi-agent simulation paradigm. The RDBMS-based design also leads to much improved performance while requiring less resources than comparable MAS-based system. Moreover, simulator records all the events which exceed a certain threshold and in response controls demand and assures the stability of the system, based on the future and past events. furthermore, simulator can help utility companies to obtain initial data that can lead to the development of more complex solutions to monitor and control energy consumption, and thus identify target operating points for the generation and distribution systems, with the ultimate goal of balancing the demand and supply, and of improving energy efficiency at the utility level.