Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Post History

57%
+2 −1
Q&A What is a good modern language to use for a Business Rules project?

SQL is the right tool for this job. You say the data is already in a database, probably a SQL database You don't have to deal with moving the data out of the database and "into a programming la...

posted 10mo ago by matthewsnyder‭  ·  edited 10mo ago by matthewsnyder‭

Answer
#3: Post edited by user avatar matthewsnyder‭ · 2023-06-22T03:46:00Z (10 months ago)
  • SQL is the right tool for this job.
  • * You say the data is already in a database, probably a SQL database
  • * You don't have to deal with moving the data out of the database and "into a programming language" as you would with others
  • * This is an *extremely* common application of SQL, and you will find a plethora of relevant examples, guides and tools (including web based editors) online for it
  • * Many SQL engines have sophisticated query optimization features that will automatically improve the performance of your queries while you focus on the result you want
  • You say your experience using SQL was not ideal. I'm baffled. There are billion dollar businesses that run on the premise that it is, in fact, ideal. Your examples sound to me like classic SQL exercises. I would recommend you take each example rule, and ask a separate question like: "How to apply sales tax per lookup table based on city and state in SQL?" By the way, for something like that, you will need to find a lookup table of taxes by location - that will often also be available as a SQL DB from third parties.
  • Note that you also mention recurring processes, like "twice per month". This is a scheduling problem and no language supports this out of the box. You will have to use a separate scheduler that will have its own peculiarities, to actually put tasks on a schedule. Some examples include cron (becoming obsolete), systemd timers, Airflow. Some database engines also have a concept of scheduled tasks/jobs.
  • For other languages you listed:
  • * Python is probably the easiest after SQL. You will still have to deal with database I/O as a needless extra step, however some very complex rules may be easier than in SQL. It really depends on what rules exactly you need to implement. I said you should ask how to do each example in SQL, you should also ask for Python and compare the answer to decide what you'd rather deal with. Python is a very complex and sophisticated language, compared to SQL, don't be deceived by its apparent simplicity.
  • * R will require some busywork to push/pull data from the database. The syntax for data manipulation will be a bit more complex and cumbersome than SQL in your case, with little benefit. The benefit of R is its extensive, correct implementations of statistical and data analysis formulae, and powerful plotting libraries. You are using neither of these and IMO it's not worth it for you to deal with its limitations.
  • * Rust is a language designed to provide tight control over the low-level details of programs, like memory assignment. Its benefit is potentially better performance, and drawback is that high-level tasks require a lot more code and complexity to implement. It is a terrible choice for what you want to do. Go is similar, although it is slightly less low level.
  • * COBOL is ancient, it would be masochistic to attempt to use it in this century.
  • SQL is the right tool for this job.
  • * You say the data is already in a database, probably a SQL database
  • * You don't have to deal with moving the data out of the database and "into a programming language" as you would with others
  • * This is an *extremely* common application of SQL, and you will find a plethora of relevant examples, guides and tools (including web based editors) online for it
  • * Many SQL engines have sophisticated query optimization features that will automatically improve the performance of your queries while you focus on the result you want
  • You say your experience using SQL was not ideal. I'm baffled. There are billion dollar businesses that run on the premise that it is, in fact, ideal. Your examples sound to me like classic SQL exercises. I would recommend you take each example rule, and ask a separate question like: "How to apply sales tax per lookup table based on city and state in SQL?" By the way, for something like that, you will need to find a lookup table of taxes by location - that will often also be available as a SQL DB from third parties.
  • Note that you also mention recurring processes, like "twice per month". This is a scheduling problem and no language supports this out of the box. You will have to use a separate scheduler that will have its own peculiarities, to actually put tasks on a schedule. Some examples include cron (becoming obsolete), systemd timers, Airflow. Some database engines also have a concept of scheduled tasks/jobs.
  • For other languages you listed:
  • * Python is probably the easiest after SQL. You will still have to deal with database I/O as a needless extra step, however some very complex rules may be easier than in SQL. It really depends on what rules exactly you need to implement. I said you should ask how to do each example in SQL, you should also ask for Python and compare the answer to decide what you'd rather deal with. Python is a very complex and sophisticated language, compared to SQL, don't be deceived by its apparent simplicity.
  • * R will require some busywork to push/pull data from the database. The syntax for data manipulation will be a bit more complex and cumbersome than SQL in your case, with little benefit. The benefit of R is its extensive, correct implementations of statistical and data analysis formulae, and powerful plotting libraries. You are using neither of these and IMO it's not worth it for you to deal with its limitations.
  • * Rust is a language designed to provide tight control over the low-level details of programs, like memory assignment. Its benefit is potentially better performance, and drawback is that high-level tasks require a lot more code and complexity to implement. I would consider it a terrible choice for what you want to do. Go is similar, although it is slightly less low level.
  • * COBOL is ancient, it would be masochistic to attempt to use it in this century.
#2: Post edited by user avatar matthewsnyder‭ · 2023-06-22T03:45:22Z (10 months ago)
  • SQL is the right tool for this job.
  • * You say the data is already in a database, probably a SQL database
  • * You don't have to deal with moving the data out of the database and "into a programming language" as you would with others
  • * This is an *extremely* common application of SQL, and you will find a plethora of relevant examples, guides and tools (including web based editors) online for it
  • * Many SQL engines have sophisticated query optimization features that will automatically improve the performance of your queries while you focus on the result you want
  • You say your experience using SQL was not ideal. I'm baffled. There are billion dollar businesses that run on the premise that it is, in fact, ideal. Your examples sound to me like classic SQL exercises. I would recommend you take each example rule, and ask a separate question like: "How to apply sales tax per lookup table based on city and state in SQL?" By the way, for something like that, you will need to find a lookup table of taxes by location - that will often also be available as a SQL DB from third parties.
  • Note that you also mention recurring processes, like "twice per month". This is a scheduling problem and no language supports this out of the box. You will have to use a separate scheduler that will have its own peculiarities, to actually put tasks on a schedule. Some examples include cron (becoming obsolete), systemd timers, Airflow. Some database engines also have a concept of scheduled tasks/jobs.
  • For other languages you listed:
  • * Python is probably the easiest after SQL. You will still have to deal with database I/O as a needless extra step, however some very complex rules may be easier than in SQL. It really depends on what rules exactly you need to implement. I said you should ask how to do each example in SQL, you should also ask for Python and compare the answer to decide what you'd rather deal with. Python is a very complex and sophisticated language, compared to SQL, don't be deceived by its apparent simplicity.
  • * R will require some busywork to push/pull data from the database. The syntax for data manipulation will be a bit more complex and cumbersome than SQL in your case, with little benefit. The benefit of R is its extensive, correct implementations of statistical and data analysis formulae, and powerful plotting libraries. You are using neither of these and IMO it's not worth it for you to deal with its limitations.
  • * Rust is a language designed to have tight control over the low-level details of programs, like memory assignment. Its benefit is potentially better performance, and drawback is that high-level tasks require a lot more code and complexity to implement. It is a terrible choice for what you want to do. Go is similar, although it is slightly less low level.
  • * COBOL is ancient, it would be masochistic to attempt to use it in this century.
  • SQL is the right tool for this job.
  • * You say the data is already in a database, probably a SQL database
  • * You don't have to deal with moving the data out of the database and "into a programming language" as you would with others
  • * This is an *extremely* common application of SQL, and you will find a plethora of relevant examples, guides and tools (including web based editors) online for it
  • * Many SQL engines have sophisticated query optimization features that will automatically improve the performance of your queries while you focus on the result you want
  • You say your experience using SQL was not ideal. I'm baffled. There are billion dollar businesses that run on the premise that it is, in fact, ideal. Your examples sound to me like classic SQL exercises. I would recommend you take each example rule, and ask a separate question like: "How to apply sales tax per lookup table based on city and state in SQL?" By the way, for something like that, you will need to find a lookup table of taxes by location - that will often also be available as a SQL DB from third parties.
  • Note that you also mention recurring processes, like "twice per month". This is a scheduling problem and no language supports this out of the box. You will have to use a separate scheduler that will have its own peculiarities, to actually put tasks on a schedule. Some examples include cron (becoming obsolete), systemd timers, Airflow. Some database engines also have a concept of scheduled tasks/jobs.
  • For other languages you listed:
  • * Python is probably the easiest after SQL. You will still have to deal with database I/O as a needless extra step, however some very complex rules may be easier than in SQL. It really depends on what rules exactly you need to implement. I said you should ask how to do each example in SQL, you should also ask for Python and compare the answer to decide what you'd rather deal with. Python is a very complex and sophisticated language, compared to SQL, don't be deceived by its apparent simplicity.
  • * R will require some busywork to push/pull data from the database. The syntax for data manipulation will be a bit more complex and cumbersome than SQL in your case, with little benefit. The benefit of R is its extensive, correct implementations of statistical and data analysis formulae, and powerful plotting libraries. You are using neither of these and IMO it's not worth it for you to deal with its limitations.
  • * Rust is a language designed to provide tight control over the low-level details of programs, like memory assignment. Its benefit is potentially better performance, and drawback is that high-level tasks require a lot more code and complexity to implement. It is a terrible choice for what you want to do. Go is similar, although it is slightly less low level.
  • * COBOL is ancient, it would be masochistic to attempt to use it in this century.
#1: Initial revision by user avatar matthewsnyder‭ · 2023-06-22T03:44:53Z (10 months ago)
SQL is the right tool for this job.

* You say the data is already in a database, probably a SQL database
* You don't have to deal with moving the data out of the database and "into a programming language" as you would with others
* This is an *extremely* common application of SQL, and you will find a plethora of relevant examples, guides and tools (including web based editors) online for it
* Many SQL engines have sophisticated query optimization features that will automatically improve the performance of your queries while you focus on the result you want

You say your experience using SQL was not ideal. I'm baffled. There are billion dollar businesses that run on the premise that it is, in fact, ideal. Your examples sound to me like classic SQL exercises. I would recommend you take each example rule, and ask a separate question like: "How to apply sales tax per lookup table based on city and state in SQL?" By the way, for something like that, you will need to find a lookup table of taxes by location - that will often also be available as a SQL DB from third parties.

Note that you also mention recurring processes, like "twice per month". This is a scheduling problem and no language supports this out of the box. You will have to use a separate scheduler that will have its own peculiarities, to actually put tasks on a schedule. Some examples include cron (becoming obsolete), systemd timers, Airflow. Some database engines also have a concept of scheduled tasks/jobs.

For other languages you listed:

* Python is probably the easiest after SQL. You will still have to deal with database I/O as a needless extra step, however some very complex rules may be easier than in SQL. It really depends on what rules exactly you need to implement. I said you should ask how to do each example in SQL, you should also ask for Python and compare the answer to decide what you'd rather deal with. Python is a very complex and sophisticated language, compared to SQL, don't be deceived by its apparent simplicity.
* R will require some busywork to push/pull data from the database. The syntax for data manipulation will be a bit more complex and cumbersome than SQL in your case, with little benefit. The benefit of R is its extensive, correct implementations of statistical and data analysis formulae, and powerful plotting libraries. You are using neither of these and IMO it's not worth it for you to deal with its limitations.
* Rust is a language designed to have tight control over the low-level details of programs, like memory assignment. Its benefit is potentially better performance, and drawback is that high-level tasks require a lot more code and complexity to implement. It is a terrible choice for what you want to do. Go is similar, although it is slightly less low level.
* COBOL is ancient, it would be masochistic to attempt to use it in this century.