• Steve Jones - SSC Editor (4/25/2015)


    xsevensinzx (4/25/2015)


    Here is a good example I think where the number crunching cannot exist in the database.

    I worked in the video game industry, specifically in Massively Multiplayer Online Games. This is a type of video game genre where thousands of players play a single game simultaneously.

    Absolutely. This is certainly a place you'd struggle with anything, even recording actions. I worked in the financial industry at one point and we couldn't update pricing every minute and have our application work.

    However, that doesn't mean no business logic works. Plenty of situations can do better, not sending sets of data to a client to process rather than making a decision in the database.

    As with most things, it depends.

    Sure, but it's not the point of saying that business logic can and cannot exist in the database. It's about what makes sense in the use case. At the end of the day, front-end and back-end applications can process logic. But, in almost all situations, only the back-end can store physical data. This is why that business logic is not solely owned by the back-end such as the database.

    That does not mean that the back-end is not the best place for business logic, it just means that you can't make an argument that database engines specifically, is the sole owner of the logic or the main role by default because it's not. It would be a secondary role at best where the primary role is always going to be about the data, not the logic.

    I would say in most cases though, it's going to live in the back-end, especially in the database. But you have to remember, if someone came to me and said that the database can store no logic, then it's not the end of the world. If someone came to me that I could also store no persistent data on the back-end, then that may be world destroying.