German sentence structure

German sentence structure is the structure in which the German language adheres to. German is an OV (Object-Verb) language. Additionally, German, like all Germanic languages except English, uses V2 word order, though only in independent clauses. In dependent clauses, the finite verb is placed last.

Independent clauses

Declarative sentences

Declarative sentences use V2 (verb in the second position) word order: the finite verb is preceded by one and only one constituent (unlike in English, this need not be the subject); in Germanic tradition, the position occupied by this constituent is referred to as the Vorfeld 'prefield'. Coordinating conjunctions like und 'and' or aber 'but' precede both the prefield and the finite verb, and so do topicalised elements (similarly to the 'that' in English 'That I don't know'). The prefield is often used to convey emphasis.

Non-finite verbs as well as separable particles are placed at the end of the sentence:

In the midfield (the part of the clause between the position of the finite verb and that of the clause-final verb cluster), German word order is highly variable.

Conventional German syntax presents information within a sentence in the following order:
 Wichtigstes (what is the most important thing within the all the elements following the finite verb?)
The word "da" when taking the meaning of "then suddenly" must take the first place. A "dann", then, does so often, but not necessarily; otherwise, the subject of the sentence may take first place.
If the verb is the most important, the unconjugated (normally second) part of the separable verb is placed here, but still separated from the conjugated (normally first) part. If the verb is not separable or periphrastical, the infinitive is used.
 Was (what? the conjugated verb)
In this case, a form of "tun" is inserted for the conjugated verb, as in Arbeiten tun wir. "Working, that's what we do."
 Wer ('who?' the subject)
 Wem ('to/for whom' – dative object)
 Wann ('when' – time)
 Warum ('why' – reason)
 Wie ('how' – manner)
 Wo ('where  – place)
 Wen ('whom' – accusative object)
 Wohin/Woher ('to/from where')
 Verb, nochmal (first part of the separable verb)

Wir gehen am Freitag miteinander ins Kino. Literally, 

'We go on Friday together to the movies.'

Wegen ihres Jahrestages bereiten wir unseren Eltern einen Ausflug nach München vor. Literally, 

'Because of their anniversary plan we our parents a trip to Munich.'

In conversational past tense, comparisons can be put after both parts of the verb. So:Er ist größer gewesen als ich. / Er war größer als ich. OREr ist größer als ich gewesen

'He was greater than me.'

German often structures a sentence according to increasing importance of the phrase towards the conversation. So:

Wir gehen am Donnerstag ins Kino. 

'We're going to the movies on Thursday.' 

BUT

An welchem Tag gehen wir ins Kino?

'(On) What day are we going to the movies?'

Am Donnerstag gehen wir ins Kino. 

OR 

Wir gehen am Donnerstag ins Kino.

'On Thursday we're going to the movies.' OR 'We're going on Thursday to the movies.'

In ditransitive sentences, pronouns usually go between the verb and all other elements of the sentence:

Florian gibt mir morgen das Buch. 

"Florian is giving me tomorrow the book."

BUT

Florian gibt es mir morgen. 

"Florian is giving it to me tomorrow."

Inversion

An inversion is used to emphasize an adverbial phrase, a predicative, an object, or an inner verbal phrase in a sentence. The subject phrase, at the beginning of an indicative unstressed sentence, is moved directly behind the conjugated verb, and the component to be emphasized is moved to the beginning of the sentence. The conjugated verb is always the second sentence element in indicative statements.

"Ich fliege schnell." – "I fly fast." – unstressed
"Schnell fliege ich." – "I fly fast." – stressed 'fast' (i.e., "Fast is how I fly.")

"Du bist wunderschön." – "You are lovely." – unstressed
"Wunderschön bist du." – "You are lovely." – stressed 'lovely' (i.e., "Lovely is what you are.")

"Ich bin gelaufen." – "I ran." – unstressed
"Gelaufen bin ich!" –  "I ran!" – stressed 'ran' (i.e., "Run is what I did!")

Interrogative sentences
Questions are generally divided into yes–no questions and wh-questions.

Specific questions are similar to inverted statements. They begin with a question word, which is followed by the conjugated verb, followed by the subject (if there is one), and then the rest of the sentence.
 Was machst du jetzt? ("What are you doing now?")
 Wer geht ins Kino? ("Who is going to the cinema?" – In this sentence, the interrogative pronoun wer serves as the subject)

Yes–no questions
In yes–no questions, V1 (verb-first) word order is used: the finite verb occupies the first position in the sentence; here, there is no prefield.

However, conjunctions and topicalised elements still precede the finite verb:

Wh questions
Wh questions work in much the same way as they do in English. Like English, German also has Wh-movement:

Commands
For commands, the imperative mood is used. Like questions, commands use V1 word order:

In contemporary German, the imperative singular ending -e is usually omitted. The second-person-singular pronouns du 'you (sg)' and ihr 'you (pl)' are always omitted, except in highly formal or literary language:

Like in English, nouns or non-finite verb forms can sometimes be used to give commands:

Dependent clauses
Subordinate clauses use Vfinal word order.

'That' clauses
Using dass 'that':

Clauses headed by a subordinator

Relative clauses
There are two varieties of relative clauses. The more common one is based on the definite article der, die, das, but with distinctive forms in the genitive (dessen, deren) and in the dative plural (denen). Historically, this is related to the English that. The second, which is typically used in more literary contexts and used for emphasis, is the relative use of welcher, welche, welches, comparable with English which. As in most Germanic languages, including Old English, both of these varieties inflect according to gender, case and number. They take their gender and number from the noun which they modify, but the case from their function in their own clause.

Das Haus, in dem ich wohne, ist sehr alt.
The house in which I live is very old.

The relative pronoun dem is neuter singular to agree with Haus, but dative because it follows a preposition in its own clause. On the same basis, it would be possible to substitute the pronoun welchem.

However, German uses the uninflecting was ('what') as a relative pronoun when the antecedent is alles, etwas or nichts ('everything', 'something', 'nothing'.).

Alles, was Jack macht, gelingt ihm.
Everything that Jack does is a success.

In German, all relative clauses are marked with commas.

Alternatively, particularly in formal registers, participles (both active and passive) can be used to embed relative clauses in adjectival phrases:

Die von ihm in jenem Stil gemalten Bilder sind sehr begehrt.
'The pictures he painted in that style are highly sought after.'

Die Regierung möchte diese im letzten Jahr eher langsam wachsende Industrie weiter fördern.
'The government would like to further promote this industry, which has grown rather slowly over the last year.'

Unlike English, which only permits relatively small participle phrases in adjectival positions (typically just the participle and adverbs), and disallows the use of direct objects for active participles, German sentences of this sort can embed clauses of arbitrary complexity.

Subordinate clauses
A subordinate clause (Nebensatz) is always incorporated in a main clause (or another subordinate clause). Any part of the main clause can be replaced by it, but some conjugated verb must remain. However, subclauses are generally moved to the end of the sentence if it can be done without inconvenience and they do not take the first place because of importance. As for word order, it differs in two things from the main clause:

 In general, it begins with a special word, a 'subordinating conjunction' or a relative pronoun, setting it into relation with the main sentence.
 The verb is, without separation, sent to the place where the first part of a separable verb would be in a main clause, i.e. at the end of the sentence.
Ich nehme den früheren Flug, damit ich heute noch ankomme. 
'I'll take the earlier flight so that I arrive even today.'

Question words (in the following example, 'wohin') have the same effect as subordinating conjunctions within a sentence:

Wohin ist er gelaufen? Niemand wusste, wohin er gelaufen ist. 

'Where did he run (to)? No one knew where he ran  (to).'

Unlike in English, a subordinate or dependent clause is always separated from the independent clause (Hauptsatz) by a comma.

Exceptions:

 Final clauses can be replaced by an "um-zu"-infinitive, if the subject is identical. In practice, um behaves as conjunction, and the infinitive, with a zu, as conjugated verb, and the subject falls away.
Wir haben genug Geld, um diese CD zu kaufen. = Wir haben genug Geld, damit wir diese CD kaufen. "We have enough money to/that we buy this CD."
 In conditional phrases, the conjunction wenn may be left out in the main clause and the verb put into its place. In this case, so replaces dann in the subordinate clause.
Hast du genügend Geld, so (no "dann" in this case) kannst du diese CD kaufen. = Wenn du genügend Geld hast, dann kannst du diese CD kaufen. "If you have enough money, then you can buy this CD."
 Indirect speech may behave as subclause in relation to the main clause, but the conjunction (which would be "dass") may be left out and then its word-order is as in main clauses.
Er sagte, er sei mit der Arbeit fertig. = Er sagte, dass er mit der Arbeit fertig sei. = "He said (that) he had finished his work."
 Denn, by custom translated into English as for, is in practice an equivalent to weil 'because', but it requires a main-clause word-order and may even take a semicolon instead of a comma.
Er kommt nicht zur Arbeit, denn er ist krank. (He doesn't come to work, for he's ill.) = Er kommt nicht zur Arbeit, weil er krank ist. = "He doesn't come to work because he's ill."
 In some dialects weil has the role which denn has in Standard German. However this doesn't mean they generally neglect the subclause word order, since other conjunctions meaning the same, i. e. da "as" or even a "deswegen weil" (literally: because of that because) take ordinary subclauses there.
 In subordinate clauses that make use of two or more infinitives consecutively (a phenomenon known as Doppelinfinitiv ("double infinitive") with two infinitives), the conjugated verb (generally haben, werden, or a modal verb), comes before (or between) the two (or more) infinitives. Perfect constructions of this type can usually be avoided altogether by using the simple past:
Er wollte wissen, ob du es hast tun können / tun hast können. = Er wollte wissen, ob du es tun konntest.
'He wanted to know if you've been able to (could) do it.'
Ich weiß, dass ich es werde tun müssen / tun werde müssen.
'I know I'm going to have to do it.'
Sie hofft, dass sie uns es kann tun helfen / tun kann helfen.
'She hopes she can help us do it.'

Subordinate sentence structure
Just as in English, a subordinate clause may be used at the beginning or end of a complete expression, so long as it is paired with at least one independent clause. For instance, just as one could say either:

I will go with you, if I can. or If I can, I will go with you.

so one can also say in German:

Ich komme mit, wenn ich kann. or Wenn ich kann, komme ich mit.

In German when the independent clause comes after a subordinate clause, the conjugated verb comes before the subject. This arises from the rule that always places the conjugated verb in a sentence in the second position, even if that puts it ahead of the sentence's subject.

Clauses with dass
Subordinate clauses beginning with dass [thus, so, that] enable the speaker to use statements like nominal phrases or pronouns. These sentences are singular, neuter and either nominative or accusative. For example:

Dass Spinnen keine Insekten sind, ist allgemein bekannt. 
'It's well known that spiders are not insects.'

Ich weiß, dass Spinnen keine Insekten sind. – Ich weiß das. 
'I know that spiders are not insects – I know that.'

Indirect questions with ob
Whereas the word dass indicates that the statement is a fact, ob starts an indirect yes/no question.

Ich weiß nicht, ob ich fliegen soll. ("I don't know whether I should fly.")

Specific indirect question

Relative clauses 
The outer nominal phrase the relative clause relates to can be any nominal phrase in any case. The clause begins with a form of the relative pronoun derived from and largely identical to the definite pronoun (der/die/das), or the interrogative pronoun (welchem/welcher/welches), the remaining words are put after it. Using the interrogative pronoun without a specific reason is considered typical for legalese language.

Der Mann, der/welcher seiner Frau den Hund schenkt (nominative subject) ('The man who gives his wife the dog')
Der Hund, den/welchen der Mann seiner Frau schenkt (accusative object) ('The dog which the man gives his wife')
Die Frau, der/welcher der Mann den Hund schenkt (dative object) ('The woman to whom the man gives the dog')
Der Mann, der/welcher ich bin (predicative noun) ('The man I am')

The outer nominal phrase can also be the possessor of a noun inside. The genitive case of a relative pronoun matching the outer nominal phrase in gender and number is used:

Der Mann, dessen Auto auf der Straße parkt ('The man whose car is parked on the street')
Die Person, deren Auto ich kaufe ('The person whose car I am buying')
Das Auto, dessen Fahrer ich helfe ('The car whose driver I am helping')
Die Kinder, deren Lehrer ich kenne ('The children whose teacher I know')

Prepositions/postpositions are attached to these phrases in the relative clause if necessary:

Das Haus, in dem ich lebe ('The house I live in')
Die Person, derentwegen ich hier bin ('The person I am here because of')
Das Haus, durch dessen Tür ich gegangen bin ('The house whose door I came in by')

If the relative pronoun is identical to the definite article several identical forms may follow each other:

Der, der der Frau, der ich schon Honig gegeben hatte, Honig gab, muss mehr Honig kaufen ('The man who gave honey to the woman I had already given honey to, has to buy more honey')

Such constructions are generally avoided by using forms of welch- as relative pronouns:
Der, welcher der Frau, welcher ...
or rather
Derjenige, welcher der Frau, der ich ...

Otherwise, welcher is rarely used (never in the genitive), and without a difference in meaning. If the relative pronoun refers to a thing as yet unknown or a whole sentence and not a part of it, was is used instead, always equivalent here to an English "which":
Der Chef stellte einen Arbeiter ein, was diesen sehr gefreut hat. ('The manager hired a worker, which the latter was very happy about.')

From sentences such as this which is altogether correct, being a locational adverb: 
In dem Geschäft, wo ( or in dem) man auch Brot kaufen kann, kaufe ich Bier. ('In this shop where you also can buy bread I am buying beer.')
Colloquial usage extends this to other quasi-locational prepositional expressions:
Die Zeit, wo (= in der) wir Rom besucht haben, war sehr schön. ('The time lit. where we visited Rome was really fine.' Regular "in der", literally "in which", would translate to a "when" in English.)
In slang, this extends to all relative clauses:
Der Mann, wo bei Siemens arbeitet, hat an der Technischen Universität studiert. ('The man where works at Siemens's has graduated from the Technical University.')
This form is never used in Bavaria. Southern Germans have constructed a double form "der wo, die wo, das wo" which, however, is almost necessary in Bavarian dialect. "Wo" may here be replaced by "was", which occur mostly in the feminine gender.

Adverbial clauses
An adverbial clause begins with a conjunction, defining its relation to the verb or nominal phrase described.

Als ich auf dem Meer segelte ("When/As I was sailing on the sea")

Some examples of conjunctions: als, während, nachdem, weil.

References 

Word order
Sentence Structure