BDP on how do set up detailed company profiles in XANO

Options

Hi Guys,

I would need some guidance from more experienced (backend) developers, specifically on how to set up company profiles in XANO with adding and static data.

1) Adding company information per day: We use date/point-in-time data points (meaning data is added per day), so not only static information - does that mean that we need to have for each company an extra table? Because how else should we store specific company data by date? We need the rows for making entries by date. So, for example, if we want to show sales by day, we need entries in the XANO table for each day.

-> But if we have 10000 companies, do we need 10000 tables?


2) Static information - meaning that should not change and does not need several dates, it should only be updated if something changes (e.g. Business Address), so one row per company is enough. However, we try to extract as much information as possible for a company.

3) Running Analysis: Once we have the company data in XANO, where should we store the analysis we get from our LLM? Do we add a column labeling "analysis_output_A", "analysis_output_B", and so forth OR should we use an extra table per company OR can we store the data in a function for each request to show it to the front-end?

Many thanks for your help, really appreciate it.


Best

Alex

Comments

  • Lachlan
    Lachlan Administrator

    ADMIN

    Options

    Hi Alex!

    Thanks for reaching out, I'll do my best to provide some very general advice, but how you set up your database schema is going to depend on ultimately how you plan to access/query this data.

    1. Xano's Postgres database is a relational database. So if you have a table that contains Company and then a table that contains "Daily information" you can relate the daily information to a particular company, via the "company_id" table relationship column. Meaning you can store your 10000 records per day in the same table.

    2. Your static data or "Company Information" you'd run a process to update this information as required, perhaps this lives in its own table.

    3. I'm not exactly sure what analysis data you are speaking of, however, this could also be it's own table, but with a relationship to the related company. You could then query this table flexibly either per company or as a bulk query, this could be added to an API to then be viewed on the front-end.

    Hopefully, this is somewhat helpful, don't hesitate to clarify with further information / queries.