The word “democracy,” in its broadest sense, refers to any state in which sovereignty ultimately rests in the citizenry. The most common forms are direct democracy, in which governmental decisions are voted on by the citizenry as a whole, and representative democracy, in which the citizenry elects a subset of itself to make governmental decisions.
The word “republic,” in its broadest sense, refers to any non-monarchical state. The more common usage, however, refers to a non-monarchical government in which governmental decisions are made by a representative body. This representative body need not be elected by the people, and so it need not be a democracy.
Once we understand these two definitions, we can see that it is possible to be both a democracy and a republic. A democratic republic is a form of representative democracy in which the head of state is elected by the citizenry, thereby satisfying the definitions of both a democracy and a republic. The United States is one example of a democratic republic. (It is also a federation, a presidential system, and a constitutional state. None of these terms are mutually exclusive.)
The names “Democratic Party” and “Republican Party” do not reflect any deep disagreements over the democratic and republican elements of the United States’ system of government. In fact, when the Democratic Party was founded in the 1790s, it’s members first called themselves “Republicans” and then later “Democratic-Republicans.”
One reason for this is that there was no official recognition of political parties back then, and so there was no need for an official name. This had changed by 1854, when the Republican Party was founded. By then, parties were expected to have formal names, so they called themselves the “Republican Party,” and its members were called “Republicans. This did not cause confusion because by that time the Democratic-Republicans had taken to calling themselves “Democrats.”
Two important things to remember, then, are that (1) “Democrat,” “democrat,” “Republican,” and “republican” refer to four different things, and (2) political parties are just teams that represent ever changing constituencies and ideologies. The Republican Party used to be the more liberal party in the US, and the Democratic Party used to be the more conservative party. The Democratic Party used to be the more anti-government party in the US, and the Republican Party used to be the more pro-government party.
In general, a party’s distant past is irrelevant to its present, and its present may very well be irrelevant to its distant future. If I may indulge in a moment of opinion, then, this is why I find it a bit absurd to get caught up in the political fortunes of parties (as opposed to policies or ideas). It’s also one of the many reasons I neither endorse nor affiliate myself with any political party.