imperium2335
imperium2335

Reputation: 24122

Store physical dimensions in MySQL

I often store the dimensions of a product in my database by having X, Y and Z columns.

Is this the best way of doing it or is their a better way? I have heard that there is a spatial datatype in MySQL, would that be relevant in this case?

Upvotes: 0

Views: 264

Answers (1)

TGlatzer
TGlatzer

Reputation: 6258

If you store physical dimensions of an object, that is far away from anything which a spatial datatype tries to represent. Spatial Datatypes are for Location-Information (e.g. Points on globe or Points on a plane) and contain x and y values for geometry data (describing local spaces, like Football fields) or longitude and latitude (describing global spaces)

Upvotes: 1

Related Questions