Howdy,
Work order data:
when displaying a work order on the "app"
question at the end
we have the work orders table laid out with "167" columns, not all of them will contain data, and not all of them will need to be filled out , so if there is a chem prescription there are 12 groups of columns totaling 36 columns total available for data entry meaning a total of 12 chemical prescriptions can be added to the order
headers follow this chem name 1 , rate 1, uom 1 / chem name 2, rate 2, uom 2, etc.....
Example: chemical prescription info "columns" /
Chem name + Rate + unit of measure = prescription #1 (3 total columns / same row )
Chem name + Rate + unit of measure = prescription #2 (3 total columns / same row )
so out of the 167 columns 6 will have data in them for that part of the info,
Complete weather data
5 columns = 1 weather data
same layout example as chemical scripts = 60 columns total for weather data per row = wind 1, wind 2 , wind 3 etc.....
So now to the question
is it possible to display to the user, columns that have data already and be able to add data either be a button to "add weather" or "add chemical" to the next "data" column(chem name 1, chem name 2) or to edit the current column
we think by using 1 row per work order with that many columns will streamline how the data flows, and allows for better database management.
Thanks
Solved! Go to Solution.
Sure you can! and I will tell you why. I'm sure my friend you are very good at what you do, so I'm interested in sharing a little thought with you, before answering your question.
Sure you can make anything work and there are often many ways to make something work in any dev environment. A developer however is constantly asking himself, in every step, every line, is this the best way of doing it? What is the cost of running my code? Does my code ensures the most efficient use of memory, battery, processing power and bandwidth? Am I wasting resources unnecessarily? Am I ensuring the fastest load and run times?
Now to answer your question. There are two considerations.
The first is a general one. When you are approaching a new dev environment/platform, especially when it is closed and you do not or cannot see the underlying mechanisms of this platform, you will always be better served to follow its official recommendations and guidelines. The developers of the platform invested time and effort to write and maintain these guidelines for a good reason. AppSheet has official guidelines telling creators how to model their data.
More specifically, about databases, why should your data be in rows rather than in columns and why in your case you should create several tables not one? There's a wealth of resources on this very subject online and you should be able to google them easily, but I'll give you a few:
1. Database size:
2. Flexible and consistent data structure:
3. Use of simpler and more efficient expressions:
This is definitely not better database management. Each one of these categories should be in its own table, with its own column, while the work orders table would be referenced by those table as needed. You should not use columns for lists as in chem1, chem2, chem3 etc. This is bad data modelling.
Please read this guide and follow the links inside:
Data: The Essentials | AppSheet Help Center
can we ask why?
why is tracking all of the order data on one table bad, or what could it lead to.
things not syncing?
other than it being a large spreadsheet with a crap ton of columns. (there are other tables for other data to reference the work orders table)
what is the benefit for split out each category into separate table,
how would that function in archiving changes to the orders, one of our processes is after an orders has been generated, anything that changes the original order. the OG order is archived into a seperate table and the updated work order gets a "-1,-2,-3" etc to designate the revision number.
i am not a developer and i have no formal education in code or app development
The last project i did was leading a team of devos (akin to herding cats) to link legacy DBs to api and cloud, and i ran into a lot of, you can't do that, or it doesn't work that way and i pushed them to do it anyway and it turned out to be the best thing since sliced bread, that company now uses those processes in their everyday work.
Sure you can! and I will tell you why. I'm sure my friend you are very good at what you do, so I'm interested in sharing a little thought with you, before answering your question.
Sure you can make anything work and there are often many ways to make something work in any dev environment. A developer however is constantly asking himself, in every step, every line, is this the best way of doing it? What is the cost of running my code? Does my code ensures the most efficient use of memory, battery, processing power and bandwidth? Am I wasting resources unnecessarily? Am I ensuring the fastest load and run times?
Now to answer your question. There are two considerations.
The first is a general one. When you are approaching a new dev environment/platform, especially when it is closed and you do not or cannot see the underlying mechanisms of this platform, you will always be better served to follow its official recommendations and guidelines. The developers of the platform invested time and effort to write and maintain these guidelines for a good reason. AppSheet has official guidelines telling creators how to model their data.
More specifically, about databases, why should your data be in rows rather than in columns and why in your case you should create several tables not one? There's a wealth of resources on this very subject online and you should be able to google them easily, but I'll give you a few:
1. Database size:
2. Flexible and consistent data structure:
3. Use of simpler and more efficient expressions:
Thank you, that was a very helpful explanation to understand why it should be organized into smaller tables,
how far should the database be split down
lets use weather data
wind, temp, humidity
would a table called "weather" then have 3 columns //or// have a table called "wind" another called "temp" etc...
That's a very good question !
How many tables should you have and how far should go splitting your data into different tables? I'll come back later this evening with my take in this. Just wanted to tell you now that your question is really good one!
User | Count |
---|---|
18 | |
14 | |
11 | |
7 | |
4 |