I thought the difference between these two was the subjects. People and animals can have something, while there is something
somewhere. However, I read the following sentences:

The house has 4 bedrooms.
August has 31 days.

I got confused: Are these exceptions? I think I would use "There are 4 bedrooms in the house." or "There are 31 days in August."
These are all fine. Have is not limited to people:

The house has 4 bedrooms.
August has 31 days.
My computer had a virus.
My chair has a broken leg.
The book has a red cover.


PS: Perhaps you are confusing the verb 'have' with the guideline about possessives:

My wife's leg is broken.
The leg of my chair is broken.
Students: We have free audio pronunciation exercises.

I understand your confusion perfectly. Those aren't exceptions, but they rather give the phrase a different meaning.

I am teaching English in China, and my students often get confused since both "there is/are" and "have" are the same word in Chinese (有), so I recently had to taught a lesson on that. The main difference is the meaning or the sense you want to give to that phrase.

When you use "have", you indicate posession, belonging. That's why most times we think we can use it for people or animals (since they have the abikity of posessing things).

"There is" indicates existance. Existance can be contained in places (the most common one), things, or even concepts.

When to use each? In the many cases in which we can use it indiferently (that is we can use any of both and they both make sense), it depends to the meaning we want to give to our sentence, and the emphasis we place on the subject as being an actor as well as the action.

Hope it helps!

I would recommend that both are correct and can be used. The difference is where you want the focus of your sentence to be.

"The building has 5 rooms." This is acceptable if the emphasis is on the building and what it possesses.
"There 5 rooms in the building." This is also acceptable, but you are choosing to emphasize the rooms and not the building. Obviously rooms can't possess a building so you wouldn't say, "The 5 rooms have a building."

If you are selling a building and want to talk about the building itself, you'd say something like:
"The building has 5 rooms and the roof was recently replaced." This puts focus on the attributes of the building.
"There are 5 rooms in this building so you can have an office for the president, HR, Account, R&D, and sales." Here the focus is on the benefits of the room.

The problem with "have" comes when you try to translate directly from the first language. Languages like Chinese, Spanish, and Portuguese can start sentences with "Have..." without a subject before it. This is incorrect in English. Statements with "have" need a subject.

Have a drink on the desk. X

The desk has a drink on it. OK

There is a drink on the desk. OK

Site Hint: Check out our list of pronunciation videos.