vb.net - Business Layer vs SQL Server -



vb.net - Business Layer vs SQL Server -

i have application complex calculations members. each fellow member can have multiple states linked profile. each state has got different calculations each course of study fellow member completes.

as of have been performing calculations in db (sql server 2008) , sending info app layer can see history , download certificate each course.

i have business logic layer not lot happens there. know has been asked lot think should perform these calculations: business layer or database? going , forth!!

i in sql server that:

does lot of summing, counting, averaging etc. of info , returns single value. there's no point in transferring big volumes of info middle tier, sum column

does lot of row / set-based manipulation; if need copy, insert, update lots of data, again, there's no point in dragging info middle tier , sending server - on server right go. also: t-sql faster in dealing set-based operations (like shuffling info around) in middle tier be

in brief: seek avoid sending big volumes of info client/middle-tier/business layer unless absolutely have (e.g. because want download file stored in database, or if need have 200 rows materialized objects in app displayed somewhere or operated on)

one feature that's overlooked computed columns right in database table - @ e.g. summing order total plus taxation , shipping grand total, or great set first , lastly name display name. kinds of things shouldn't handled in business logic layer - if in database directly, "computed" values available when inspect database tables , @ info in sql server mgmt studio ...

i set middle tier / business logic layer

if required extensive logic checking, string parsing, pattern matching , forth; t-sql sucks @ things

if required things calling web service info validate info against, or that

if required more of business logic operation (rather strict "atomic" database operations)

but "rough" guidelines - it's design decision each case, , don't believe in strict rules; mileage may vary, case case - pick 1 approach works best given task @ hand.

sql-server vb.net data-access-layer business-logic-layer

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -