-2

I'm using Xano as my database management system.

Here’s how my website content is structured:

- Company (first level type)
-- Division (second level type)
--- Team (third level type)
---- Employee (fourth level type)
----- Review (fifth level type)

In other words, each review belongs to an employee, each employee belongs to a team, each team to a division, and each division to a company.

Each of these types has specific information (table columns). For example, a company has a name, an address, an industry, etc. The “employee” type has the most specific information (table columns): personal details, job details, notes, etc. The "Review" table may contain a lot of data too: date, text, tasks, etc.

Now, as an example, let's come up with some numbers. Let’s say we have:

  • A total of 100 companies

  • 5 divisions per company

  • 5 teams per division

  • 10 employees per team

  • 20 reviews per employee

In this example we would have in our database:

  • 100 companies

  • 500 divisions

  • 2,500 teams

  • 25,000 employees

  • 5,000,000 reviews

I’m a bit worried about the size of these last tables; here, we’re talking about 100 companies resulting in 5 million reviews—already a big number; I let you imagine what they would be if the number of companies were to double). I’m even more worried by the fact that the “employee” and "review" types are to contain the most data (table columns). So the amount of data in these two tables alone could be absolutely huge.

So far, I’ve opted for a normalized database structure, meaning that each N level type belongs to its parent (N-1 level type). But I'm worried about size and scaling issues.

Would it be reasonable to have a different set of tables for each company?
If not, what other strategies should I consider?

6
  • What is the exact problem? How exactly it is addressed/solved by what alternate design? What exactly do you mean by "normalized" & "denormalized"? Denormalizing from higher NFs gives more cells. How does that help? What exactly does "a different set of tables for each company" mean? Why would it help? If you have a lot to record, you have a lot to record. "I'm worried" isn't a question & the answer to how to design is to apply the design method you are following. How are you not just asking us to repeat a description of a method you don't identify whose failure you haven't demonstrated?
    – philipxy
    Commented Jun 18 at 23:03
  • Ask 1 specific researched non-duplicate question. PS Strategy for “Which is better” questions How to Ask Help center
    – philipxy
    Commented Jun 18 at 23:32
  • @philipxy The problem is managing large tables' size and performance in a normalized database, especially for Employee and Review tables. By "normalized," I mean reducing redundancy with related tables; by "denormalized", combining tables for better read performance. Using separate tables for each company, could help by reducing table sizes and improving performance, though it complicates the schema. I'm looking for effective strategies to handle this data volume and ensure performance and scalability. Commented Jun 19 at 8:03
  • Please clarify via edits, not comments. PS Again: Your worries & problem claim & proposed options are vague & all that your 2 final post questions are asking now is, how do you do DB design. Please act on my comments. PS "DB normalization" doesn't (in either its senses of "to a 1NF" or "to higher NFs) mean "reduce redundancy" (or "design well").
    – philipxy
    Commented Jun 19 at 8:32
  • 1
    5 million rows is not large. If each review is 1,000 bytes, that's 5 GB. You can buy 2 TB flash drives. Construct your database and wait until you see actual performance degradation before you look for alternatives. Commented Jun 20 at 18:17

0