Of course, but you learn to associate drugs in classes by their chemical or generic name, and that way you have some basic idea about a drug by its name even if you've never heard of it before. Yes, remembering is important, but knowing where to look things up is very important, too.
Pharmacy school is extremely tough b/c of all the memorization required. Kell is right about learning drug classes and associations, but pharmaceutical chemistry is just plain memorization. After you graduate you don't have to memorize hardly anything (except all your passwords).