Open-event-server: Clarify DB tables

Created on 30 Jan 2020  路  9Comments  路  Source: fossasia/open-event-server

Some table's roles are unclear.

  • [ ] roles_panels - contains 1000s of duplicate entries
  • [ ] transaction - why are these in the database?
  • [ ] mails - Why are these in the database? They consume 20% of production DB
  • [ ] events_version - stores redundant versions where nothing is changed between rows
  • [ ] orders_tickets - redundant table. Remove and use redis for caching if needed
database discussion

All 9 comments

  • mails - Why are these in the database? They consume 20% of production DB

This takes a record of each & every mail which is sent from the app to the users. And details regarding those are then displayed in Admin/Mails

I know what it is used for, but why?

@iamareebjamal For orders_tickets, how exactly is redis caching going to be useful?

If you need to cache the amount of tickets associated with the order, cache it rather than storing it in a separate table in DB. It's the violation of single source of truth and source of bugs

The number of tickets associated with orders is being used everywhere in the application. Okay, I get your point.
But what I'm still skeptical about is the reason why the quantity field wasn't present in the orders table from before

Nvm, it's there

SELECT count(*) from ticket_holder where order_id = 5;

Hello Sir,
If issue is not solved, Can i try to solve it

Not meant for beginners, please don't spam comment on issues

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Masquerade0097 picture Masquerade0097  路  3Comments

shubham-padia picture shubham-padia  路  4Comments

mariobehling picture mariobehling  路  4Comments

iamareebjamal picture iamareebjamal  路  4Comments

Aju100 picture Aju100  路  4Comments