I am completely confused about these two devices! as far as I know, oscilloscope and electrocardiograph, both, show the heat waves(P, QRS, T) so what is the difference between their job?
I would say that electrocardiograph is a specific case of oscilloscope. The main difference, perhaps is that "oscilloscope" is a device for visualization on a display ("scope" from greek "look out"), whereas "electrocardiograph" is primarily used to record ("-graph" from greek "to write").
Oscilloscope is design to visualize an electrical signal, that changes in time (generally speaking). Nature of that signal is not important, it can be radio signal, electrical signal from some device (Arduino), or sensor (thermometer). You can detect earthquakes if you have particular sensor for vibration.
It is just that these devices should output signals of particular frequency, usually general laboratory oscilloscopes are designed to work with signals up to few MHz. If you attach sensor that "feels" muscle contraction, you will have a tool for electromyography.
Electrocardiograph, by definition, is a device that visualizes electrical signals acquired via electrocardiography. It is just that usually when people and doctors perform electrocardiography, they use specialized devices, not general-purpose oscilloscope. For example, cardiac signals are usually well below 0.5-1KHz, you can save a lot of money and complexity by not having to worry about higher frequencies in your device.