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
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...
Answer
#3: Post edited
- 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
- 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
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.