I\'m learning about microservices and I\'m gonna build a project with a microservices architecture.
The thing is, one of my team mates want to use one database for a
In general a microservice should be responsible for it's own data. That's a perfect world scenario.
In practice some of the services may be highly related to each other. E.g. CustomerShippingDetails and CustomerShoppingCheckout services may both access the same data - customer address. How would you then solve a problem of providing customer address to the customer checkout service. If the checkout service queries the shopping details directly then you break loose coupling between services. Other option is to introduce a shared database.
There will always have to be some kind of compromise on the architecture. What is sacreficed is an architectural decision that highly depends on the big picture (the design of the whole system).
Not having too many details about your system I would go with a mixed approach. That is, having a shared database for services that take care of similar business logic. So CustomerShippingDetails and CustomerShoppingCheckout can share a database. But a StoreItemsDetails would have a separate database.
You can find more about shared database pattern for microservices at Microservice Architecture.