بتاريخ: 4 نوفمبر 200421 سنة comment_17425 what do you base a block on?it seems easy but still a real question when you do the job on network and you should be concern a bout the traficand what triggers should be used.actually, the answer based on 2 categories:-1-data source(where data is quered from)2-data target(where data in the form goes when the user issues commit)and there are 2 properties involve in this matter (query data source&dml data target)first basing a block on a table:-it has a draw back in case of none-based table items, because you should use post-query which has a bad impact on performance by firring for each row fetched from database, so the only time the block should be based on a table when there is no columns need to be populated by triggers that access the database so baseing ablck on a table its a rare occurance in database projects2-basing ablock on a view:-using this method eliminate the need for post-query and the colmuns from detail table in joining case like(emp table can be updated but colmuns from dept will not because it dosent contains key preserved) to accomplish this you can writing a post-query as a function that you place it in select clause of the view and all queries performed on db serverbefore query result passed to the form otherwise use instead-of database trigger . 3-basing a block on from clase:-this usefull if you cannot create view for lack of privilegesbut it takes longer time to execute because implemented as "select from (select...)" select into select.to perform dml use transactional triggers on-insert,on-update,on-delete or by using set-block-property.basing a block on sored procedure:-this the most advanced and the purposeis to provide use-defined logic for replacing default functionallity of select,lock,insert,update,delete this required when:-1-a block must be based on multiple tables tied together by complex logic in this case view or from clause cannot be used because of the complexity 2-dml must be performed on server side i think this is the best method for the network trafic because involve getting and returning result set of data rather than processing one record at a timethus reducing network traffic especially in wan.i hope this prelude will open a new window in this topic to enrich our knowledge.muddatherocp app.dev 6i تقديم بلاغ
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.