# Uniqueness of rows

**URL:** <https://community.glideapps.com/t/uniqueness-of-rows/70544>\
**Category:** Ask for Help\
**Created:** [February 6, 2024, 6:20am UTC](https://community.glideapps.com/t/uniqueness-of-rows/70544 "2024-02-06T06:20:26Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![dilek](https://avatars.discourse-cdn.com/v4/letter/d/ecae2f/32.png) [@dilek](https://community.glideapps.com/u/dilek)\
**Post date:** [February 6, 2024, 6:20am UTC](https://community.glideapps.com/t/uniqueness-of-rows/70544/1 "2024-02-06T06:20:26Z")

</div>

Hi  
I’m trying to develop a booking system but I couldn’t find a way to make my records unique. I mean if there is reservation for a specific date and a specific room, no other reservations would be accepted. I couldn’t find a way from Docs or from past Community posts. Can anyone help ?

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [February 6, 2024, 8:13am UTC](https://community.glideapps.com/t/uniqueness-of-rows/70544/2 "2024-02-06T08:13:08Z")

</div>

> [@mortar\_board Advanced Booking App Tutorial (Step-By-Step)](https://community.glideapps.com/t/advanced-booking-app-tutorial-step-by-step/66386):
>
> [[🎓 Glide Tutorial - Advanced Booking App (Full Course & Cheat Sheet)] ](https://www.youtube.com/watch?v=EBuTMEa_aFQ) What’s up Gliders! Thought I’d share my latest free tutorial for those that might be interested. popcorn 𝗔𝗯𝗼𝘂𝘁 𝗧𝗵𝗶𝘀 𝗧𝘂𝘁𝗼𝗿𝗶𝗮𝗹 popcorn This tutorial is an in-depth, step-by-step, tutorial that shows you how to build an advanced booking app from scratch in Glide. nerd_face 𝗦𝘁𝗮𝘆 𝗙𝗼𝗰𝘂𝘀𝗲𝗱 nerd_face Sprinkled throughout this tutorial are countless insider tips, strategies, code snippets and techniques that w…

---

<div class="post-metadata">

**Author:** ![slscustom.ru](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/slscustom.ru/32/77336_2.png) [@slscustom.ru](https://community.glideapps.com/u/slscustom.ru)\
**Post date:** [February 6, 2024, 10:40am UTC](https://community.glideapps.com/t/uniqueness-of-rows/70544/3 "2024-02-06T10:40:58Z")

</div>

Hi, Darren\_Murphy!  
Have you also think it is possible to prevent overbooking with client side calculation(as for now in Glide)? I have read this manual several times and i don’t understand how it possible. Off course possibility of overbooking is very small, but in atcually it possible(overbooking) .

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [February 6, 2024, 11:58am UTC](https://community.glideapps.com/t/uniqueness-of-rows/70544/4 "2024-02-06T11:58:08Z")

</div>

Yes, you’re right. Because the operations are not atomic, there is always a small chance that collisions can happen and you wind up with duplicates.

A while back, David suggested using something like Upstash with Redis to handle this. I’ve not had a need to try it yet, but I’ve been keeping it in the back of my mind should that need arise.

> [@new Please Test: Make.com Integration](https://community.glideapps.com/t/please-test-make-com-integration/67979/16):
>
> Increment is not an atomic operation. The increment happens on the client, and the result is sent to the server. For atomic increment, you should use Call API with a service like Upstash that offers serverless redis (a database with first-class support for atomic increment). You can get a good result this way! We did it for PGA when they needed a distributed counter for their grandstands. We’d like to offer atomic increment in Glide but it’s not a top request from customers yet.

---

<div class="post-metadata">

**Author:** ![slscustom.ru](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/slscustom.ru/32/77336_2.png) [@slscustom.ru](https://community.glideapps.com/u/slscustom.ru)\
**Post date:** [February 6, 2024, 12:14pm UTC](https://community.glideapps.com/t/uniqueness-of-rows/70544/5 "2024-02-06T12:14:08Z")

</div>

Yes, i already use Upstash Redis solution instead Make, because with make it will require 2 paid update, but with Redis is only one.  
I’m just curious that fact of above tutorial many times suggested as solution, it is excellent for study, but not for production. Thanks to confirm, because in a before another Glide expert said: it is solution and i need to study carrefully.  
Another thing, i don’t understand how another’s have build so many production apps which requires overbooking control.  
Also Redis solution also have fails(some times, in reason of internet connection) to return response and we need to create dummy flow to correct it. It will be great to have native solution for server side calculation in Glide, but as Glide CEO said, he haven’t see many requests from customers for it.  
Thanks for your answer!

P.s.:  
May be it is not right topic for this question, but:  
Does add row action is atomic?  
Does it firstly add row to server, then receiving answer and then ready to run “On submit action”?  
If like this, it can solve some needs.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [February 6, 2024, 12:34pm UTC](https://community.glideapps.com/t/uniqueness-of-rows/70544/6 "2024-02-06T12:34:20Z")

</div>

> [@slscustom.ru](#):
>
> May be it is not right topic for this question, but:  
> Does add row action is atomic?  
> Does it firstly add row to server, then receiving answer and then ready to run “On submit action”?

I believe that rows are added locally, and then subsequently synced with the Glide back end.

---

<div class="post-metadata">

**Author:** ![slscustom.ru](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/slscustom.ru/32/77336_2.png) [@slscustom.ru](https://community.glideapps.com/u/slscustom.ru)\
**Post date:** [February 6, 2024, 12:38pm UTC](https://community.glideapps.com/t/uniqueness-of-rows/70544/7 "2024-02-06T12:38:33Z")

</div>

So, it mean we exactly need external service just simple, for unique Order’s serial number. Native row id is unique, but not a serial and not human’s friendly readable.  
Thanks again!

---

<div class="post-metadata">

**Author:** ![slscustom.ru](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/slscustom.ru/32/77336_2.png) [@slscustom.ru](https://community.glideapps.com/u/slscustom.ru)\
**Post date:** [February 6, 2024, 12:42pm UTC](https://community.glideapps.com/t/uniqueness-of-rows/70544/8 "2024-02-06T12:42:08Z")

</div>

But in which order they have been added to server?  
As they actually arrived to server or as they actually created(user’s side quantized to global Unix milliseconds?)

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [February 6, 2024, 12:55pm UTC](https://community.glideapps.com/t/uniqueness-of-rows/70544/9 "2024-02-06T12:55:43Z")

</div>

Why does that matter?  
Rows are rows, ordering is unimportant. If your App functionality depends on the ordering of rows in the underlying tables, then you are doing something wrong (and violating the first rule of database normalisation).

---

<div class="post-metadata">

**Author:** ![slscustom.ru](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/slscustom.ru/32/77336_2.png) [@slscustom.ru](https://community.glideapps.com/u/slscustom.ru)\
**Post date:** [February 6, 2024, 1:04pm UTC](https://community.glideapps.com/t/uniqueness-of-rows/70544/10 "2024-02-06T13:04:14Z")

</div>

For now I’m sending Row ID to Redis and they respond me serial number which i saving in Glide table in the row which Row ID has send to Redis, but it requires one paid update.  
For all computation i using Row ID, Serial just for showing to users and during user’s searching from app interface.

p.s. I just trying to explore the way, to obtain global serial number without paid update.
