Nationalism/Patriotism is a sense of collective identity/ strong feeling with the nation. This is more of an emotional binding and not political one.
With the concept of democracy the people develops a sense to rule by themselves hence further strengthening a sense of binding with their nation.