Drugs are classified into groups, but as a pharmacist you could know what is the class of certain drug as long as the drug has a very common suffix.
The most popular example is -statin , as long as the drug name has the suffix statin, it is immediately known as cholesterol lowering agent.
So, here is the most common suffixes and its related drug classes:
–caine : Local anesthetics
–cillin : Antibiotics
–dine : Antiulcer agents
–done : Opioid analgesics
–ide : Oral hypoglycemics
–iam : Antianxiety agents
–micin : Antibiotics
–mide : Diuretics
–mycin : Antibiotics
–nium : Neuromuscular blocking agents
–olol : Beta blockers
–oxacin : Antibiotics
–pam : Antianxiety agents
–pril : ACE inhibitors
–sone : Steroids
–statin : Cholesterol lowering drugs
–vir : Antiviral agents
–zide : Diuretics
–cycline : Antibiotics ( Tetracycline)
Remember , it is not a role but as I mentioned it might help you to recognize the drug class or its mechanism of action.