剧院座位图(座位状态)
我想知道将图像的尺寸存储在我将存储路径的表中的数据库中是否是一个好主意。
或者 -
最好在运行时检查这一点,然后将这些值放入变量中并在运行时计算所有内容。
或者 -
通过 MSSQL 执行此操作会更好吗?
也是为了更好的解释。
我有一个方程,它使用图像高度、图像宽度、行、列来定位座位,并且这个方程中还会有间距因素,这样它就会完美地出现。
希望这是可以理解的。
I was wondering if it would be a good idea to store the dimensions of the image in the db in the table where i will be storing the path.
OR -
Should it be better just to check this at run-time and then put those values in a variable and calculate everything at run-time.
OR -
Would it be better to do this through MSSQL.
Also to better explain.
I have an equation which is using image height, image width, row,column to position the seats also there will be the factor of spacing in this equation so that it will come out perfectly.
Hope that this is understandable.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Enzero,
嗯,如果没有更多信息,确实不可能准确回答这个问题;但总的来说,最好将元数据与数据一起保存......并且可以“即时”计算出的元数据通常应该如此,以避免未来元数据带来的任何麻烦不同步。
想要存储图像大小是一件奇怪的事情......它当然在图像文件本身中。图像是什么格式?或者我错过了什么?
干杯。基思.
编辑:
经过一番来回讨论后,Enzero 说他将尝试这种方法:
将图像本身存储为 BLOB(而不仅仅是包含图像的文件的路径),并且它是身高& Seat_status 表中的宽度(等)。当应用程序启动时,它将把 Seat_status 加载到缓存中,以便随后快速参考。
干杯。基思.
PS:不客气,恩泽罗……很高兴为您服务。
Enzero,
Hmmm, it's really impossible to answer that question ACURRATELY without more information; but in general, it's a good idea to keep your metadata with your data... and metadata which can be worked-out "on the fly" generally should be, to avert any future headaches with the metadata getting out of sync.
An image size is a strange thing to want to store... it's in the image-file itself, surely. What format is the image? Or am I missing something?
Cheers. Keith.
EDIT:
After a bit of discussion back-and-forth, Enzero says he'll try this approach:
Store the image itself as a BLOB (not just the path to a file containing the image) and it's height & width (etc) in the seat_status table. When the application starts-up it will load the seat_status's into a cache, for fast reference thereafter.
Cheers. Keith.
PS: You're welcome Enzero... happy to be of service.