# Problem with Database Architecture

**URL:** <https://air.tableforums.com/t/problem-with-database-architecture/1417>\
**Category:** Airtable Questions\
**Created:** [January 17, 2025, 5:26pm UTC](https://air.tableforums.com/t/problem-with-database-architecture/1417 "2025-01-17T17:26:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JBJ](https://yyz1.discourse-cdn.com/flex029/user_avatar/air.tableforums.com/jbj/32/1063_2.png) [@JBJ](https://air.tableforums.com/u/JBJ)\
**Post date:** [January 17, 2025, 5:26pm UTC](https://air.tableforums.com/t/problem-with-database-architecture/1417/1 "2025-01-17T17:26:55Z")

</div>

Hi there,

I’m facing an architectural problem for which I haven’t a solution as of yet. This problem is linked to the way I handle revenue and payment depending on the client type – small company or big company.

Here’s how I decided to structure my database to handle revenue and payment for small companies:

 ![image](https://canada1.discourse-cdn.com/flex029/uploads/tableforums/original/2X/b/b120434ef0bdf60ffa7ccf26ed68e55beef288b9.png)

And here’s how I decided to structure it to handle the workflow for big companies:

 ![image](https://canada1.discourse-cdn.com/flex029/uploads/tableforums/original/2X/0/007adb7b41f4956b6237a3c3822bbc66c1d25bd1.png)

But this leads me to the following problem in terms of database design.

 ![image](https://canada1.discourse-cdn.com/flex029/uploads/tableforums/original/2X/d/d6ff35a00b9fde161ad39c7b8ad5aad73d7768fd.png)

I could have found a solution to this problem by:

- breaking the [Revenue Items] – [Client Sessions] direct relationship
- pulling the Client Sessions into the [Revenue Items] table with lookup fields and assigning each of them to the proper revenue item in dynamically filtering them based on their execution date  
 ![CleanShot 2025-01-17 at 17.48.55](https://canada1.discourse-cdn.com/flex029/uploads/tableforums/original/2X/9/98530db85f76d1d444be59f3e2f1dc6f4de41917.png)

Only problem… dynamic filter is not offered on lookups! That means that _all_ client sessions for the deal are assigned to each revenue item, instead of having _only_ client sessions of January be put into the bucket of the February revenue item.

 ![CleanShot 2025-01-17 at 18.20.13](https://canada1.discourse-cdn.com/flex029/uploads/tableforums/original/2X/8/8b3059dc59ec1775b9f55735997db66eae550d55.png)

Since artificial intelligence couldn’t offer a satisfactory solution to that problem, I’m now resorting to natural intelligence! Any smart database architect out there who’s got a suggestion?

Thanks.
