title: Identifying and Non-Identifying relationship
body: <p>First of all, I have read several similar questions with "technical" answers that look like C &amp; P. What I need is a clear example. The normalization is 3NF.</p>
  
  <p>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 zone, and finally create aliases for each particular hotel, as people know the same hotel under different names. The tables hotels and hotels_alias are to fill an autocomplet input.</p>
  
  <p>The price calculation is done according to the service (standard, private and VIP) depending on the zone and according to the number of passengers and the season, I still do not create the logic or tables to calculate the price per passenger and season. That is why they are not in the diagram below.</p>
  
  <p>A good explanation I found is
  <a href="https://stackoverflow.com/questions/762937/whats-the-difference-between-identifying-and-non-identifying-relationships">What&#39;s the difference between identifying and non-identifying relationships?</a></p>
  
  <p>However I have some doubts.</p>
  
  <p><a href="https://i.stack.imgur.com/TnqQ8.png" rel="nofollow noreferrer">Example 1</a></p>
  
  <p>hotels_alias can not exist without the table hotels that in turn can not exist without the zones table and this in turn does not exist without cities. Since a city is divided into many zones, hotels belong to these zones, zones that are part of a city, and hotel aliases belong to a hotel and can not exist if there is no hotel.</p>
  
  <p>So far it is clear that cities are a strong or parent entity and zones, hotels and hotels_alias are child entities.</p>
  
  <p>In the EER diagram you can see that it has an identifying relationship. The first question is: Is it correct that despite being child entities have their own ID? and that this ID is PK and NN and AI? In some examples, these child entities do not have their own ID, hence their PK is formed by two FKs from the related tables as in an N: N (zones_has_servicees) relationship.</p>
  
  <p>If in fact child tables do not have to have their own ID because they must be able to identify themselves by their parent table, then how would you be able to update or delete an area, or a hotel or a hotel alias?</p>
  
  <pre><code>DELETE FROM zones WHERE name = 'name'
  </code></pre>
  
  <p>Is this correct? Should I create an index to the name column? What advantages, if any, would do with name colum instead of its own ID? Is it okay for a child table to have its own ID and create a composite PK 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 ? to perform an ON DELETE CASCADE action?</p>
  
  <p>What happens if I have two zones with the same name? for example: Hotel Zone, that both cities of Cancun and Tulum have that area. To make a DELETE would be ?:</p>
  
  <pre><code>DELETE FROM zones WHERE name = 'name' AND cities_id = ID
  </code></pre>
  
  <p>Understanding what a parent and a child entity is 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.</p>
  
  <p><a href="https://i.stack.imgur.com/doy9N.png" rel="nofollow noreferrer">WP EER</a></p>