"Do you have a book?"
Translation:Hast du ein Buch?
[ Pronoun: I D E W I S -. Ich Du Er/Sie/Es Wir Ihr Sie/sie ]
[ Verb end pattern en-e-st-t-en-t-en · mnemonic ~ eNest_Ten_Ten ]
| V Inf · · | Ich · · | Du · · | Er · | Wir · · · | Ihr · · | Sie · · · | I D E W I S
| Haben | Habe | Hast | Hat | Haben | Habt | Haben | n-e-st-t-en-t-en
I understand your confusion. "Haben Sie ein Buch?" is a correct question using the formal (polite) form "you"; note the capital S. It is difficult when in your language "I" is written with a capital letter, to learn a language with three types of "you" one of which is a form of courtesy with a capital letter. And that the word used for that courtesy form also "she" or "they" could mean! So pay attention to the capital letters and the conjugation of the verb. Yes, you can. Good luck.
They all mean "have", it just depends on who you are referring to (I, he/she, them/ we, etc) Depending on that, it conjugates. The "Basics 2" Article speaks more about verb conjugation and gives you a table to remember. Ich(I) : habe Du(You): hast He/She/It: Habt Wir(We): Haben There's more cases the article talks about but that's the gist.
The verb must correspond with the person. You mixed the singular you with the form for the plural you. And all nouns have a capital: ein Buch.
ich habe = I have
du hast = you have (singular)
er/sie/es hat = he/she/it has
wir haben = we have
ihr habt = you have (plural)
sie haben = they have
Sie haben = you have (formal, polite)
I thought the verb always goes in position 2?
That's true for statements and for WH questions (ones with a question word such as "how?" or "where?").
But yes-no questions and commands have the verb in position 1:
- Hast du ein Buch? = Do you have a book?
- Sing nicht so laut! = Don't sing so loud!
You might notice that the same is true for English: the verb "do" comes right at the beginning here in the yes-no question and the command.