First of all, I told you that I have already read several similar questions with "technical" answers that look like C & P. What I need is a clear example. The normalization is 3NF.
In this project, in the administrative panel, you have to create cities and zones and each zone has to belong to a city. Also create hotels and assign them in the corresponding areas, and finally create aliases for each particular hotel, since people call the same hotel with different names. The hotels and hotels_alias tables are for filling an autocomplet input.
The calculation of the price is made according to the service (standard, private and VIP) depending on the area and according to the number of passengers and the season, I still do not believe the logic nor the tables to calculate the price per passenger and season, that's why they do not appear in the diagram below.
A good explanation seems to me this link
hotels_alias can not exist without the table hotels that in turn can not exist without the table zones and this in turn does not exist without cities. Since a city is divided into many areas, the hotels belong to these areas, areas that are part of a city, and the aliases of the hotels belong to a hotel and can not exist if there is no hotel.
So far it is clear that cities is a strong entity or parent and zones, hotels and hotels_alias are weak entities or children.
In the EER diagram you can see that it has a identifying relationship. The first question is is it correct that despite being weak entities or daughters have their own ID? and That this ID is PK and NN and AI? In some examples, these daughters or weak entities do not have their own ID, therefore, their PK is formed of two FK of the related tables as in an N: N relation (zones_has_servicees).
If in fact weak boards or daughters do not have to have their own ID because they should be able to identify themselves by their strong board or father, then how would they be able to update or delete an area, or a hotel or a hotel? alias?
DELETE FROM zones WHERE name = 'nombre a borrar'
Is the previous form correct? Would you have to create an index to the name column? What advantages, if any, would you have to do it with name instead of your own ID? Is it correct for a weak table or daughter to have its own ID and create a compound station with this ID and the ID of its parent table? Does this type of relationship have any function or is it only for engines like InnoDB and can it perform an ON DELETE CASCADE?
What happens if I have two zones with the same name? for example: Hotel Zone, which both the cities of Cancun and Tulum have that area. To make a DELETE serious ?:
DELETE FROM zones WHERE name = 'nombre a borrar' AND cities_id = ID
Understanding what is a parent entity and a daughter then why WordPress creates relationships like the one below where you can see that it uses a weak relationship with wp_postmeta and wp_posts. It is assumed that a wp_postmeta can not exist without a wp_posts, right? It does the same with comments and users.