No, the distinction between democracy and republic was well established before Madison. It appears in James Harrington's works. It also appears in works of Montesquieu, Rousseau, Tocqueville, and even Aristotle. I could find the precise quotes of their works to support my point, but I'm not at home. If you're into this kind of stuff, I recommend Bernard Manin's The Principles of Representative Government. Sounds boring but it's actually a great book.