这是维护大型业务逻辑的最佳方式,无论是在Windows程序还是数据库程序中 [英] Which is best way in maintaining large business logic whether it should in windows programm or database program

查看:56
本文介绍了这是维护大型业务逻辑的最佳方式,无论是在Windows程序还是数据库程序中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在数据库中创建了业务逻辑,如下所示。

1.表中有很多学生数据

2.基于我们取得的各自课程的排名学生(学生靠近1 Lakh)

3.循环浏览偏好并找到步骤,找出候选人是否适合任何座位。然后,如果可能,请在各自的座位中分配候选人。

4.这个程序在开始执行时需要花费超过5个小时的时间,因为它可能具有递归逻辑。

5.现在我希望这个逻辑应该保存在C#代码中我们可以处理逻辑以及何时可以轻松管理来自客户端的更改。但是在数据库中我们每次都必须修改过程。

6.同样在C#Windows中,它的工作时间不超过5小时。

7.此外,如果任何逻辑失败,那么跟踪(调试)非常困难,因为我们使用SQL Server Express 2012.

8.为此,我们希望在C#代码中移动逻辑,我们可以轻松地轻松管理业务逻辑。



我尝试过:



我在观察查询执行计划后正确构建索引的简单查询

即使这样,程序也需要更多时间。我试图调试程序但是失败了因为它挂起或给出了运行时异常。



我还试图维护日志表和打印语句,但即使这样,它很难找到问题,因为存储过程有更多步骤和复杂的逻辑。

为此,我想在Coding中移动所有逻辑,以便我们也可以调试和维护逻辑。如果业务规则发生变化,我们也可以修改逻辑。

I have Created business logic in Database which is as bellows
1. There are lots students data in tables
2. Bases on their rank in respective courses I fetch students (Student near by 1 Lakh)
3. Loop through preferences and find in Steps find whether candidates fits any seats.Then Allocates the candidates in respective seat if possible.
4. This procedure when starts executing then it takes time more than 5 hours as it is likely to have recursive logic.
5. Now I want to have this logic should be maintained in C# Code where we can handle logic as well as when changes from client can easily managed .But in database we have to modify Procedure every time.
6. Also in C# Windows its not working as takes more than 5 hours.
7. Also when if any logic is failed then for tracing (Debugging) is very difficult as we are using SQL Server Express 2012 .
8. For this we want to move logic in C# Code where we can easily manage Business Logic easily.

What I have tried:

I made simple queries with indexes properly build after watching query execution plan
Even then procedure takes more time .I tried to debug procedure but failed as it hangs or gives run time exception .

Also i tried to maintain log table and print statement but even then its very difficult to find out issue as Store procedure have more steps and complex logic .
For this I want to move all logic in Coding so that we can debug and maintain logic as well .Also we can modify logic if there is change in business rule.

推荐答案

您的问题超出了快速回答论坛的范围。您要求人们重新设计和设计具有极少量信息的系统。你要找的东西需要几个小时的来回才能有人给你一个可靠的答案(假设你找到一个愿意免费这样做的人,因为人们为这种工作付了很多钱)。



我的建议是阅读n层架构,然后开始提出相关问题。



n层架构简介 - Google搜索 [ ^ ]



什么是N-Tier建筑?示例,教程&更多 [ ^ ]



https://www.guru99.com/ n-tier-architecture-system-concepts-tips.html [ ^ ]
Your question is beyond the scope of a quick answer forum. You are asking people to re-architect and design a system with an extremely small amount of information. What you are looking for would take hours of back and forth before someone can give you a solid answer (providing you find someone willing to do that for free as people pay lots of money for that kind of work).

My suggestion to you is to read up on n-tier architecture and then start to ask questions about that.

introduction to n tier architecture - Google Search[^]

What is N-Tier Architecture? Examples, Tutorials & More[^]

https://www.guru99.com/n-tier-architecture-system-concepts-tips.html[^]


这篇关于这是维护大型业务逻辑的最佳方式,无论是在Windows程序还是数据库程序中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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