Apart from the 'der Apfel' mistake pointed out by others, there is a fundamental difference between the two on their usage: die/der/das are used for relative clauses and dass is used for nominal clauses. That is, don't focus on the fact that that
corresponds to two different words in German, but the fact that what they are.
Crudely, relative clauses act as adjectives and nominal clauses act as nouns. Since, we agree both are fundamentally different, let us proceed to see how they work:
Relative Clause
- The man is drinking water.
- Water contains salt.
- (Combined) The man is drinking water that/which contains salt.
- (Modified to serve our example) The man is drinking salty water.
Here, the italicized portion in third sentence is the relative clause. Now that we have seen one in the wild, we'll define it: it is a clause that further qualifies a noun in the other sentence. There should be something in common between the two sentences (here, water
) so that we have something to be qualified in the main clause by the relative clause.
I have introduced the 4th sentence to show how the relative clause was possible to be moulded into an actual adjective with no meaning lost. Also, notice that which
was equally possible to be used here (who
in case of human objects).
Nominal Clause
- Water contains salt.
- I hate it.
- (Combined) I hate that water contains salt.
- (Expanded) I hate the fact that water contains salt.
- (Equivalent grammatically) I hate apples.
Here, the dass-clause acts as a (complex) noun in the sentence. Think of this clause as a bubble that wraps an idea and then you play with this bubble in the sentence.
There is another usage of 'that' in English that I am not sure corresponds with a nominal clause and is always translated with 'dass', so I am putting it here:
He is so happy/sad/sleepy that he is jumping right now.
So, in short, check if the 'that' in English sentence is a relative pronoun (changeable with which/who). If not, it is dass
(which/who are not allowed here).