qwat / qwat-data-model

TEKSI Water module (project QWAT) - PostgreSQL / postgis Datamodel
https://www.teksi.ch
23 stars 24 forks source link

Raising precision/length of some field such as names up to 256 (or even more) #323

Open nicolas-sitylb opened 4 years ago

nicolas-sitylb commented 4 years ago

For example, in table qwat_od.pressurezone, the name attribute is allowing only 50 characters strings. In real world data, I frequently encountered names longer than that.

What about raising the length to some value such as 256 or 1024, which would give practitioners wider possibilities of naming?

Same thing happened in table qwat_od.distributor but here the name length is even lower (30).

Thanks a lot for your great work!

haubourg commented 4 years ago

+1 for me. @qwat/qwat-psc any opinion ?

sjib commented 4 years ago

Just make sure you can still plot and arrange longer names in a map.

ponceta commented 4 years ago

I usually don't go over varchar(255), I usually prefer text() format when more than one line is implied, but I keep that format for multiline text attributes only.

These name fields are only for pressure zone names or distributor names, it would be wrong to add more than the name, better add some attributes to these classes (eg. distributor adress, email, phone number, pressure zone number, pressure zone community, ...)

30 char is very short : Entreprise de démontage de ca 50 char is better : Entreprise de démontage de canalisation et de récu 80 char is probably sufficient Entreprise de démontage de canalisation et de récurage et de nettoyage et de fi 255 char is too much Entreprise de démontage de canalisation et de récurage et de nettoyage et de fibre optique et de démontage et de génie civil dans le domaine de la construction et bla bla bli et bla bla bla société anonyme sarl corporation united infinited internati

ponceta commented 3 years ago

BTW : QGEP uses organisation.identifier character varying(80) as equivalent for QWAT qwat_od.distributor.name and a remark text field.

ponceta commented 3 years ago

@nicolas-sitylb do you have some real world examples for pressure zones names to have as example for a size change?