sql - is it common practice to further manipulate query results in code -


I do not have much experience with programming or scripting database queries, and I think rely on manipulation of results Instead of writing a final query, spending time with a database, to achieve my ultimate purpose.

In some cases in fact I am completely changing the nature of the result by adding values ​​of columns and by removing the rows. Instead of writing more complex questions, it seems easy to manipulate the code.

Of course, for most of the time I can write a query and I'm getting back to the result with the server how I want it to be consumed but there are occasions where I run the results for further filtering Yes, because I do not know how to do this in SQL, but coding is quite straight forward.

Post-text "itemprop =" text ">

Depending on it, generally, you should give a database to the database that are good in the data database - to be included in filtering, sorting, and data For complex complicated post-Qualification changes of data (business logic) you are usually doing in your application code, and not in the query, especially by debugging these things, really are very awesome in SQL. If you are fully convinced that your datasets are always very small (we say ... fewer than few hundred records) and your hard work It is always always simple, then instead of your application code, SQL is probably going to break into your overall performance or maintenance.

On the other hand, if the dataset was likely to increase for a few days is ( Paco should definitely test it - to test this dummy data!) Then you run the risk of writing application code which is unbearably friction and possibly uses the monster amount of memory to do those things which That database would be better for you At this point you may need to see how to add more efficiently to the database than the data code, Nbv can appropriately divided. To do this, you will need to test and analyze on both your data and your share of connectors working with you.

The last answer? Depending on your needs, decide how to break the work properly, which can be done effectively by the database server (in SQL) and your application code can be efficiently cleared and cleaned.


Comments

Popular posts from this blog

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -