An ideology is a set of ideas that constitute one 's goals, expectations, and actions. An ideology is a comprehensive vision, a way of looking at things as in several philosophical tendencies, or a set of ideas proposed by the dominant class of a society to all members of this society. Ideologies are systems of abstract thought applied to public matters and thus make this concept central to politics. Implicitly every political or economic tendency entails an ideology whether or not it is propounded as an explicit system of thought.1
So ideology is a system of conceptualized views and ides, expressing the interests of different social classes, groups and societies, to evaluate relationships between people and reality, as well as authorized on a community form of domination and power (conservative ideology) or settle their transformation (radical, revolutionary ideology). It`s not a science, but it includes scientific knowledge of social and politic life, as well as assessing it.
Good example of bad ideology was Nazi in Germany, when Hitler wanted to “clean” the Aryan race from “sub-human” – Jews, Gypsies, homosexuals and handicapped people who were at the bottom of racial hierarchy by Nazi studies.
Now let`s move on discourse. What is that? Discourse is the term that describes written and spoken communications; the "language in the language," a certain vocabulary, semantics, pragmatics and syntax, manifesting itself in actual communicative acts, speeches and texts.
“Discourse constitutes the social. Three dimensions of the social are distinguished – knowledge, social relations, and social identity – and these correspond respectively to three major functions of language … Discourse is shaped by relations of power, and invested ideologies.” (Fairclough 1992:8).2
References: 1. http://en.wikipedia.org/wiki/Ideology 2. “Introduction: Perspectives on Disclosure Analysis” by A. Jaworski and N. Coupland. The Discourse Reader. 1-38 3. http://en.wikipedia.org/wiki/Discourse 4. Article written by A. Leverkuhn, edited by Andrew Jones on http://www.wisegeek.com/what-is-the-relationship-between-discourse-and-ideology.htm 5.”Ideology and discourse analysis” by TEUN A. VAN DIJK, Journal of Political Ideologies (June 2006), 11(2), 115-140