51

Re: Business of the logician in

Hello, Gattaka, you wrote: G> Hello, HeBpuMHeCkaTuHa, you wrote: G>>> do not trust. , here to you real business the scenario. There is a computer network in which there are network points and users. They have communications among themselves, it is we all we store in basis and we give the chance through our application . G>>> Tables User (Id, Name, Property), Network_Node (Id, Name, Property), User_User (User1Id, User2Id), Network_Node (Node1Id, Node2Id), UserOnNode (NodeId, UserId) G>>> In our basis of 70000 nodes on one user on a node (for simplicity). Users are connected all to all. For some (approximately half) nodes sign Prorepry has been put down - now it is necessary to add for such nodes on which there are  the bound users. Especially count the size of table User_User, it is pleasant moment HBM>> very similar on  the task which dares at  migrations. And there  what yes as. Will be normal SQL. G> That for  the task. A sign  - will be deleted, in it an administration and system essence.  together with a sign and communications walk... This requirement of business. Correctly he speaks. The request such will be fulfilled once and does not get at all to the program code. You result the scenario which is fulfilled from the program and more than once.

52

Re: Business of the logician in

Hello, gandjustas, you wrote: G> It indeed. But it is well visible in a retrospective show. G> and how you will prove in each specific case, what is simply fig code, instead of attempt of "premature optimization", without knowing to what consequences it results? G> even in this subject judgements that it is possible to write aby-what sql are expressed, and then to "optimize". It is impossible Though in most cases to "optimize", it is necessary to rewrite, and it is strong. In any way except as a technical lead with sufficient experience  on a rake...

53

Re: Business of the logician in

Hello, Gattaka, you wrote: G> Hello, gandjustas, you wrote: G>> It indeed. But it is well visible in a retrospective show. G>> and how you will prove in each specific case, what is simply fig code, instead of attempt of "premature optimization", without knowing to what consequences it results? G>> even in this subject judgements that it is possible to write aby-what sql are expressed, and then to "optimize". It is impossible Though in most cases to "optimize", it is necessary to rewrite, and it is strong. G> in any way except as a technical lead with sufficient experience  on a rake... That is is exceptional subjective judgement? Then consider that at me sufficient experience and I say that SQL always it is necessary to do well, instead of "to optimize then".

54

Re: Business of the logician in

Hello, Gattaka, you wrote: G> Hello, gandjustas, you wrote: G>>> do not trust. , here to you real business the scenario. There is a computer network in which there are network points and users. They have communications among themselves, it is we all we store in basis and we give the chance through our application . G>>> Tables User (Id, Name, Property), Network_Node (Id, Name, Property), User_User (User1Id, User2Id), Network_Node (Node1Id, Node2Id), UserOnNode (NodeId, UserId) G>>> In our basis of 70000 nodes on one user on a node (for simplicity). Users are connected all to all. For some (approximately half) nodes  sign Prorepry = true has been put down. Now it is necessary to add communications for such nodes (For nodes which have  the bound users). Especially count the size of table User_User, it is pleasant moment G>> And what task should be solved? G> Pofiksil also selected the description that it is necessary to make. What tell? It is necessary to explain still? I will tell that the administrator opens the console, writes request, fulfills and forgets. Will not be procedures, ORM.

55

Re: Business of the logician in

Hello, gandjustas, you wrote: G> Hello, Gattaka, you wrote: G>> Hello, HeBpuMHeCkaTuHa, you wrote: G>>>> do not trust. , here to you real business the scenario. There is a computer network in which there are network points and users. They have communications among themselves, it is we all we store in basis and we give the chance through our application . G>>>> Tables User (Id, Name, Property), Network_Node (Id, Name, Property), User_User (User1Id, User2Id), Network_Node (Node1Id, Node2Id), UserOnNode (NodeId, UserId) G>>>> In our basis of 70000 nodes on one user on a node (for simplicity). Users are connected all to all. For some (approximately half) nodes sign Prorepry has been put down - now it is necessary to add for such nodes on which there are  the bound users. Especially count the size of table User_User, it is pleasant moment G> You result the scenario which is fulfilled from the program and more than once. There is no not correctly it speaks. You have a software on network administration. A software essence to expose here such here signs on nodes. You as the manager periodically expose them and remove at different nodes. I as much as possible simplified to you the task. Actually it not  a sign etc., etc.

56

Re: Business of the logician in

Hello, gandjustas, you wrote: G> I Will tell that the administrator opens the console, writes request, fulfills and forgets. Will not be procedures, ORM. What console? He about existence of a DB does not suspect.

57

Re: Business of the logician in

Hello, Gattaka, you wrote: G> Colleagues, whether G> So badly to implement business the logic in high-efficiency stored procedures? Or now it is fashionable to use  type  which generate awful sql requests? Considering that the SQL text as a rule more  also is better read. Certainly it is possible, because neither , nor ORM have no relation to business logic. They solve tasks of data storage of the program between its starts. Many also do not suspect that in programs which they write, there is no business logic. Users want to enter the data and then for them to search, here and all logic. It is normal, the main thing not to waste time on illusive business logic - it there and is not necessary. If the program without a DB is not meaningful, it is simply alternative interface to a DB.

58

Re: Business of the logician in

Hello, Gattaka, you wrote: G>>>>> Tables User (Id, Name, Property), Network_Node (Id, Name, Property), User_User (User1Id, User2Id), Network_Node (Node1Id, Node2Id), UserOnNode (NodeId, UserId) G> Are not present not correctly he speaks. You have a software on network administration. A software essence to expose here such here signs on nodes. You as the manager periodically expose them and remove at different nodes. G> I as much as possible simplified to you the task. Actually it not  a sign etc., etc. Give the detailed scenario from the point of view of the user. The administrator comes, selects node, and further that?

59

Re: Business of the logician in

Hello, Gattaka, you wrote: G> It is all fine, but only the difference between such usage  and writing of requests on SQL is reduced to that what language we use. Well upon C# since many do not know plainly SQL. Essence  after all not in it. Idea such that we work with our domain objects as usual as if databases are not present. These domain objects  in itself the data and methods on their handling, business to the logician. If I am necessary these domain entities not only on the server I can use, but also on the client, yes anywhere. Since they do not depend on a DB, from  and something else. And who told that entities BL should be stored in storage in the form of objects BL? At us is DataAccess which returns objects BL and as there inside DA are problems DA. G> And here saving and  objects from a DB incurs  and if it is sufficient clever - all apprx. Well here not clearly. And as she should guess that you want only 2 fields from object. You somehow exhaust yourselves in a circle "I want that ORM all pulled out - ORM bad because pulls out all".

60

Re: Business of the logician in

Hello, gandjustas, you wrote: G> It indeed. But it is well visible in a retrospective show. G> and how you will prove in each specific case, what is simply fig code, instead of attempt of "premature optimization", without knowing to what consequences it results? Only subjective experience. For example, I would be confused with necessity "raisings on some KB of the text". Well and precisely would reflect after obtaining 0.5  on creation of the menu and a sentence to add a cache.

61

Re: Business of the logician in

Hello, gandjustas, you wrote: G> Hello, Gattaka, you wrote: G>>>>>> Tables User (Id, Name, Property), Network_Node (Id, Name, Property), User_User (User1Id, User2Id), Network_Node (Node1Id, Node2Id), UserOnNode (NodeId, UserId) G>> Are not present not correctly he speaks. You have a software on network administration. A software essence to expose here such here signs on nodes. You as the manager periodically expose them and remove at different nodes. G>> I as much as possible simplified to you the task. Actually it not  a sign etc., etc. G> Give the detailed scenario from the point of view of the user. G> the administrator comes, selects node, and further that? Only you consider that I to you and a heap of business rules made the simplified scenario of 140 tables for simplicity of an explanation. So, the administrator starts application. Selects the list of nodes, the right button - to assign a role. The role is assigned on nodes and also if on a node there are  users (them can be a little, we assume that one) and if these users have communications among themselves - it is necessary to install communications between network points, only if these communications have not been forbidden by the administrator before if there are no prohibitions from other roles and these communications do not exist yet. Plus at communication can be the status, but it we lower - it is necessary to assign in only for certain statuses of communications. A role this some property of a node. Them exists the order 1000 .

62

Re: Business of the logician in

Hello, gandjustas, you wrote: G> Then consider that at me sufficient experience and I say that SQL always it is necessary to do well, instead of "to optimize then". Now we consider that "well" too subjective concept. Further too all is subjective - each programmer IMHO should try to do well, observing thus balance of quality of the decision and time expended on it. Also experience, and "" etc. And a difference results Here affects, will be that distinguishes the beginner from the expert (and their payment).

63

Re: Business of the logician in

Hello, Doc, you wrote: Doc> Hello, Gattaka, you wrote: G>> It is all fine, but only the difference between such usage  and writing of requests on SQL is reduced to that what language we use. Well upon C# since many do not know plainly SQL. Essence  after all not in it. Idea such that we work with our domain objects as usual as if databases are not present. These domain objects  in itself the data and methods on their handling, business to the logician. If I am necessary these domain entities not only on the server I can use, but also on the client, yes anywhere. Since they do not depend on a DB, from  and something else. Doc> and who told that entities BL should be stored in storage in the form of objects BL? At us is DataAccess which returns objects BL and as there inside DA are problems DA. Really, who? I did not speak. . In a DB can it is stored somehow, sense  in that that  domain essence to the table or tables without delivering a headache. G>> and here saving and  objects from a DB incurs  and if it is sufficient clever - all apprx. Doc> Well here not clearly. And as she should guess that you want only 2 fields from object. You somehow exhaust yourselves in a circle "I want that ORM all pulled out - ORM bad because pulls out all". Here actually an inconsistency of this idealistic pattern I also try to inform. And with domain objects without a binding to a DB I approve idea of operation. It sensible and interesting, but not implemented still... Also there is still an approach of type Dapper or linq2db is  not ORM, it only a method to write on C# database requests. Such SQL without SQL... On me so it is better to write at once on SQL and it is not soared, to what this interlayer which only adds complexities, as a rule not all is able. The argument  and simplified refactoring  of that does not justify...

64

Re: Business of the logician in

Hello, Gattaka, you wrote: G> G> Give the detailed scenario from the point of view of the user. G> G> the administrator comes, selects node, and further that? G> Only you consider that I to you and a heap of business rules made the simplified scenario of 140 tables for simplicity of an explanation. G> so, the administrator starts application. Selects the list of nodes, the right button - to assign a role. The role is assigned on nodes and also if on a node there are  users (them can be a little, we assume that one) and if these users have communications among themselves - it is necessary to install communications between network points, only if these communications have not been forbidden by the administrator before if there are no prohibitions from other roles and these communications do not exist yet. Plus at communication can be the status, but it we lower - it is necessary to assign in only for certain statuses of communications. G> a role this some property of a node. Them exists the order 1000 . While sounds as thoughtless . avalon 1.0rc3 build 430, zlib 1.2.5

65

Re: Business of the logician in

Hello, Gattaka, you wrote: Doc>> And who told that entities BL should be stored in storage in the form of objects BL? At us is DataAccess which returns objects BL and as there inside DA are problems DA. G> it is valid, who? I did not speak... In a DB can it is stored somehow, sense  in that that  domain essence to the table or tables without delivering a headache. And than anonymous types did not please, for example? Actually, from the point of view of code BL I do not see a difference between request on LINQ and a call . As a result you receive a certain object with 2 fields (or their array). What's next? Where you place result? G> also there is still an approach of type Dapper or linq2db is  not ORM, it only a method to write on a C # database requests. Such SQL without SQL... On me so it is better to write at once on SQL and it is not soared, to what this interlayer which only adds complexities, as a rule not all is able. The argument  and simplified refactoring  of that does not justify... Well looking to whom and what project. Intellisense, refactoring, possibilities of a spelling concerning simple requests of a C # the programmer without engaging SQL of the programmer, above speed of development... But certainly all depends on a command.

66

Re: Business of the logician in

Hello, Dziman, you wrote: D> While sounds as thoughtless . Well I above resulted already the list of tables. : "Tables User (Id, Name, Property), Network_Node (Id, Name, Property), User_User (User1Id, User2Id), Network_Node (Node1Id, Node2Id), UserOnNode (NodeId, UserId)" That here is thoughtless  and as though you normalized? What list of tables at you would turn out?

67

Re: Business of the logician in

Hello, Doc, you wrote: Doc> And than anonymous types did not please, for example? And within the limits of data domain anonymous types it that? They on determination  in domain language. Doc> actually, from the point of view of code BL I do not see a difference between request on LINQ and a call . As a result you receive a certain object with 2 fields (or their array). What's next? Where you place result? In domain object, I after all operate with domain entities. Exactly as well as customers with an analyst.

68

Re: Business of the logician in

Hello, Gattaka, you wrote: G> D> While sounds as thoughtless . G> Well I above resulted already the list of tables. :" Tables User (Id, Name, Property), Network_Node (Id, Name, Property), User_User (User1Id, User2Id), Network_Node (Node1Id, Node2Id), UserOnNode (NodeId, UserId) "G> That here is thoughtless  and as though you normalized? What list of tables at you would turn out? We begin with that that any roles figure in your description So, the administrator starts application. Selects the list of nodes, the right button - to assign a role. The role is assigned on nodes and also if on a node there are  users (them can be a little, we assume that one) and if these users have communications among themselves - it is necessary to install communications between network points, only if these communications have not been forbidden by the administrator before if there are no prohibitions from other roles and these communications do not exist yet. Plus at communication can be the status, but it we lower - it is necessary to assign in only for certain statuses of communications. Further, property at  and the user-it that for an animal? For each property the column? They are intersected between user, node? How can  2 tables Network_Node? What is User_User, UserOnNode (and why here suddenly refused from underscore ?)? And how communications are forbidden? And 100500 more questions and potential answers to them from which I drew an output that here is present  (possibly out of place) and as consequence of attempt to achieve  the data through . avalon 1.0rc3 build 430, zlib 1.2.5

69

Re: Business of the logician in

Hello, Gattaka, you wrote: G> So, the administrator starts application. Selects the list of nodes, the right button - to assign a role. The role is assigned on nodes and also if on a node there are  users (them can be a little, we assume that one) and if these users have communications among themselves - it is necessary to install communications between network points, only if these communications have not been forbidden by the administrator before if there are no prohibitions from other roles and these communications do not exist yet. Plus at communication can be the status, but it we lower - it is necessary to assign in only for certain statuses of communications. The problem in receiving transitive closing? Then also procedure not strongly helps. It is better to do closing not at the moment of request, and to build in advance.

70

Re: Business of the logician in

Hello, Gattaka, you wrote: Doc>> Actually, from the point of view of code BL I do not see a difference between request on LINQ and a call . As a result you receive a certain object with 2 fields (or their array). What's next? Where you place result? G> in domain object, I after all operate with domain entities. Exactly as well as customers with an analyst. I.e. on an output at you objects at which any some properties carry real values, and remaining  turn out? This wrong state of object seems to me. After all how then to guess that in property lies: real value or ? Well it is possible to make flags or to enter the predetermined values out of ranges or to make all properties Nullable. But after all all it leads to inflating of code BL even more, than introduction . Entities.

71

Re: Business of the logician in

Hello, Dziman, you wrote: D> Hello, Gattaka, you wrote: G>> D> While sounds as thoughtless . G>> Well I above resulted already the list of tables. :" Tables User (Id, Name, Property), Network_Node (Id, Name, Property), User_User (User1Id, User2Id), Network_Node (Node1Id, Node2Id), UserOnNode (NodeId, UserId) "G>> That here is thoughtless  and as though you normalized? What list of tables at you would turn out? D> we begin with that that any roles D figure in your description> So, the administrator starts application. Selects the list of nodes, the right button - to assign a role. The role is assigned on nodes and also if on a node there are  users (them can be a little, we assume that one) and if these users have communications among themselves - it is necessary to install communications between network points, only if these communications have not been forbidden by the administrator before if there are no prohibitions from other roles and these communications do not exist yet. Plus at communication can be the status, but it we lower - it is necessary to assign in only for certain statuses of communications. D> further, property at  and the user-it that for an animal? For each property the column? They are intersected between user, node? How can  2 tables Network_Node? What is User_User, UserOnNode (and why here suddenly refused from underscore ?) ? And how communications are forbidden? And 100500 more questions and potential answers to them from which I drew an output that here is present  (possibly out of place) and as consequence of attempt to achieve  the data through . At first I did not enter a role, entered simply a flag property - consider that it and there are roles. That is property Property of type int and exhibiting there values is there is a role assignment on a node. Table User we simplify to User (Id, Name).  that the second table is called not Network_Node, and Node_Node. User_User - the table of communications of users, I do not know and you that thought? Refused from underscore  because it  not important now. We after all assort a test situation. Now once again that is required to make. Since already many times corresponded. In table User (Id, Name) 70000 records. In table Network_Node (Id, Name, Property) 70000 records. In Table UserOnNode (NodeId, UserId) - 70000 records on one user on a node. In table User_User (User1Id, User2Id) - communications of users, all  are connected to all is 70000*70000=4900000000 records. On each of records on 8 byte, i.e. approximately 36 gigabyte a label, disregarding indexes. Now in table Network_Node (Node1Id, Node2Id) - communications of nodes. We admit someone with someone already has been connected randomly 900000000 records any. We need to make: At nodes (any 35000) Network_Node property Property changes - business of the logician is that that it is necessary to find  on these nodes  and if they are connected - to add communications on nodes. Actually communication too has properties, but let's not complicate now. Here the task simply such as I above described now.

72

Re: Business of the logician in

Hello, gandjustas, you wrote: G> Hello, Gattaka, you wrote: G>> So, the administrator starts application. Selects the list of nodes, the right button - to assign a role. The role is assigned on nodes and also if on a node there are  users (them can be a little, we assume that one) and if these users have communications among themselves - it is necessary to install communications between network points, only if these communications have not been forbidden by the administrator before if there are no prohibitions from other roles and these communications do not exist yet. Plus at communication can be the status, but it we lower - it is necessary to assign in only for certain statuses of communications. G> a problem in receiving transitive closing? Then also procedure not strongly helps. It is better to do closing not at the moment of request, and to build in advance. No, I tried to describe once again proceeding from questions which arise: http://rsdn.ru/forum/design/6482289.1 the Author: Gattaka Date: 26.06 07:00 Problem that the data  - 36  and the projection does not help you.

73

Re: Business of the logician in

Hello, Gattaka, you wrote: G>> the Problem in receiving transitive closing? Then also procedure not strongly helps. It is better to do closing not at the moment of request, and to build in advance. G> Is not present, I tried to describe once again proceeding from questions which arise: http://rsdn.ru/forum/design/6482289.1 the Author: Gattaka Date: 26.06 07:00 G> the Problem that the data  - 36  and the projection does not help you. A problem that you cannot explain a problem, you already the fourth post walk around and even the request did not result and user flow cannot explain normally. You have only an excuse "the data much".

74

Re: Business of the logician in

Hello, Artem Korneev, you wrote: whether G>> So badly to implement business the logic in high-efficiency stored procedures? AK> I had to support once such project. AK> I will not remember that for all my career other project which would be so difficult for supporting came across to me. And you had a possibility to compare to the same project, but with logic on the client? Can there was even worse. AK> the main complexity of support of that project was in stored procedures, business was aggravated with that procedures were written by the professional SQL-developer, and it was supported then C# full-stack by developers to whom was uneasy to read multipart cross-DB requests with heap JOIN', CROSS-APPLY, MERGE and other delights. It not the approach problem, is a problem of control of the project. There was a professional SQL-developer, then on it decided to spare. Here and result.

75

Re: Business of the logician in

Hello, Gattaka, you wrote: whether G> So badly to implement business the logic in high-efficiency stored procedures? Or now it is fashionable to use  type  which generate awful sql requests? Considering that the SQL text as a rule more  also is better read. In a general view I would tell so. While your application simple enough, noncritical to productivity and completely owns basis, use ORM. But if system it is planned to scale (or it is simple possibilities ORM ceases to suffice), it is necessary to be ready to transfer a logic part in . It is good that selected ORM it supported. And it is necessary to last to resist to transfer logic business, being restricted to logic of sampling and data handling.