多用户方法 [英] multi-user approach

查看:78
本文介绍了多用户方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请问。假设在销售订单数据条目中,我是否必须保存空白SO或取消它?我是否必须立即创建SO号码或仅在保存SO时创建一个号码?我的SO号码不是我的主键。我有一个主键设置为在sql server上自动增量。

感谢。

Idea please. Suppose in a Sales Order data entry, do i have to save the blank SO or cancel it? Do i have to create right away an SO number or create a number only when saving SO? My SO number is not my primary key. I have a primary key set to autoincrement on sql server.

thanks.

推荐答案

嗯,你需要提供更多为了得到你问题的明确答案,背景说 - 保存空白的销售订单除了浪费数据库空间之外没有任何其他用途,除非你打算对以前开始的销售订单记录进行某种恢复......我个人认为取消它并且根本不将记录写入您的数据库。至于立即创建销售订单编号,这取决于您从上一个问题做出的决定。在接受我之前的回答时,您需要在保存时创建它 - 如果此人取消订单或出现错误,您创建了一个不需要它的销售订单号,从而搞砸了任何保留的希望数据库中的一组连续记录。

在旁注中 - 您可能想重新考虑使用自动编号作为主键,它可以根据您的数据量身定制索引的任何收益......只是值得深思。希望这有帮助,左Aj
Well, you'd need to provide a ton more background to get a definitive answer to your questions, that said - Saving a blank sales order doesn't serve any purpose other than to waste space in your database unless you plan to do some sort of recovery of previously started sales order records...personally I'd assume to cancel it and simply not write the record to your database.  As for creating a sales order number immediately, that depends on the decision you make from the previous question.  In taking with my previous answer, you'd want to create it on save - if the person cancels an order or there is an error, you've created a sales order number with no need for it and thus screwed up any hope of keeping a sequential set of records in your database. 

On a side note - you might want to reconsider using an AutoNumber for your primary key, it sorta kills any gains in terms of indexing being tailored to your data...just food for thought.

Hope this helps,
Aj


这篇关于多用户方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆