As it is an antibiotic, it is the proper choice. Then, when the infection subsides, you can have the dentist check you out to diagnose and treat the cause.
Cephalexin is an oral antibiotic rinse that is presumably prescribed by your dentist. A tooth abscess is an open sore on your tooth that likely has pus coming from it; a sure sign of infection. Bacteria live in the abcess and lead to additional tooth decay and deterioration. The best way to inhibit the bacteria growth is cephalexin.
Cephalexin is an antibiotic and can treat the infection with the absess however it may not cure the problem. You may feel better as you are taking cephalexin however, once the infection is cleared up the tooth will probably have to have a root canal or be extracted. Follow up with your dentist when you are done with the medication.
No it is not. You need to be on an antibotic like amoxicillin for at least 7 days for the absess. Also ibprofin or a pain medicine to help with the pain and swelling.