public inbox for [email protected]  
help / color / mirror / Atom feed
From: Rob Sargent <[email protected]>
To: [email protected]
Subject: Re: Lookup tables
Date: Tue, 4 Feb 2025 10:05:42 -0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <CANzqJaC83XvJOzCH+3Au5LgMOCMGMNXdTDLU6_tPJmLjO5rGZg@mail.gmail.com>
References: <[email protected]>
	<[email protected]>
	<CANzqJaC83XvJOzCH+3Au5LgMOCMGMNXdTDLU6_tPJmLjO5rGZg@mail.gmail.com>




On 2/4/25 10:03, Ron Johnson wrote:
> On Tue, Feb 4, 2025 at 11:31 AM Michał Kłeczek <[email protected]> wrote:
> [snip]
>
>
>     The query to register a visit is:
>     insert into restaurant_visit
>     select $user, current_date, restaurant_id, $rating
>     from restaurant where name = $restaurant_name
>
>
>     It is now completely unclear what it means to change the name of
>     the restaurant for already registered visits.
>     Is it still the same restaurant with a different name or a
>     different restaurant?
>
>     Or let say someone swaps names of two restaurants.
>     That means a user that goes to the same restaurant every day would
>     register visits to two different restaurants!
>
>
> Valid concerns, which means that you add a new restaurant record when 
> the name changes.
>

And there goes your unique index on phone number :)


reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Lookup tables
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox