How to build an app with GUI that works with SQL Server?

  • sgmunson - Thursday, October 18, 2018 6:16 AM

    elea.grig - Tuesday, October 16, 2018 12:04 PM

    sgmunson - Monday, October 1, 2018 1:05 PM

    elea.grig - Monday, October 1, 2018 12:41 PM

    sgmunson - Monday, October 1, 2018 8:09 AM

    Index maintenance is typically a DBA role, and should NEVER be relegated to users.   Just doesn't sound like a good idea to me at all.   Determining which method of dealing with the index is not a decision a user or an app is likely to ever be qualified to do.   That's the reason you pay a DBA to do it.   The DBA has the knowledge and experience to perform that task.   The user most likely does not and could easily do far more harm than good.   Really bad idea to even consider making an app and letting users run such things.

    Thanks for the answer! Actually this is a university project for studying, and basically this program will be used by other students. And maintenance plan does not let me choose all the options I will provide on my script

    I fail to see how that matters.   If your teachers are going to show you a bad idea, then they are not doing you any favors.  Besides, whatever database they have it pointed to will quickly get messed up by all that index maintenance, and quickly lose any real value precisely because it will be in a degraded state.   Somebody on the faculty isn't too bright a bulb....

    I've explained everything that this project is basically useless but in developing countries universities are like this.

    So be it.   And "in developing countries universities", if that is how their educators teach SQL, watch out world, will there ever be a glut of even less skilled database folks than there already are....   That might just be why those countries are referred to as "developing"...  Let's hope that such foolishness is not reflective of the overall state of IT education, because if it is, ...  again,  WATCH OUT WORLD...

    I don't see the sort of application the OP is supposed to develop as much different from the type of tools Redgate and ApexSQL, etc. develop.

  • Jonathan AC Roberts - Thursday, October 18, 2018 6:23 AM

    sgmunson - Thursday, October 18, 2018 6:16 AM

    elea.grig - Tuesday, October 16, 2018 12:04 PM

    sgmunson - Monday, October 1, 2018 1:05 PM

    elea.grig - Monday, October 1, 2018 12:41 PM

    sgmunson - Monday, October 1, 2018 8:09 AM

    Index maintenance is typically a DBA role, and should NEVER be relegated to users.   Just doesn't sound like a good idea to me at all.   Determining which method of dealing with the index is not a decision a user or an app is likely to ever be qualified to do.   That's the reason you pay a DBA to do it.   The DBA has the knowledge and experience to perform that task.   The user most likely does not and could easily do far more harm than good.   Really bad idea to even consider making an app and letting users run such things.

    Thanks for the answer! Actually this is a university project for studying, and basically this program will be used by other students. And maintenance plan does not let me choose all the options I will provide on my script

    I fail to see how that matters.   If your teachers are going to show you a bad idea, then they are not doing you any favors.  Besides, whatever database they have it pointed to will quickly get messed up by all that index maintenance, and quickly lose any real value precisely because it will be in a degraded state.   Somebody on the faculty isn't too bright a bulb....

    I've explained everything that this project is basically useless but in developing countries universities are like this.

    So be it.   And "in developing countries universities", if that is how their educators teach SQL, watch out world, will there ever be a glut of even less skilled database folks than there already are....   That might just be why those countries are referred to as "developing"...  Let's hope that such foolishness is not reflective of the overall state of IT education, because if it is, ...  again,  WATCH OUT WORLD...

    I don't see the sort of application the OP is supposed to develop as much different from the type of tools Redgate and ApexSQL, etc. develop.

    How about the fact that the someone doing the developing is an expert selling to other experts?  If that's not a rather sizable difference, then we can stop talking about it right here and now.   Any app being developed by a student for that kind of work had better be being done by a Mensa-level genius that actually has people skills, or there will be a HUGE difference in the resulting app.

  • sgmunson - Thursday, October 18, 2018 6:58 AM

    Jonathan AC Roberts - Thursday, October 18, 2018 6:23 AM

    sgmunson - Thursday, October 18, 2018 6:16 AM

    elea.grig - Tuesday, October 16, 2018 12:04 PM

    sgmunson - Monday, October 1, 2018 1:05 PM

    elea.grig - Monday, October 1, 2018 12:41 PM

    sgmunson - Monday, October 1, 2018 8:09 AM

    Index maintenance is typically a DBA role, and should NEVER be relegated to users.   Just doesn't sound like a good idea to me at all.   Determining which method of dealing with the index is not a decision a user or an app is likely to ever be qualified to do.   That's the reason you pay a DBA to do it.   The DBA has the knowledge and experience to perform that task.   The user most likely does not and could easily do far more harm than good.   Really bad idea to even consider making an app and letting users run such things.

    Thanks for the answer! Actually this is a university project for studying, and basically this program will be used by other students. And maintenance plan does not let me choose all the options I will provide on my script

    I fail to see how that matters.   If your teachers are going to show you a bad idea, then they are not doing you any favors.  Besides, whatever database they have it pointed to will quickly get messed up by all that index maintenance, and quickly lose any real value precisely because it will be in a degraded state.   Somebody on the faculty isn't too bright a bulb....

    I've explained everything that this project is basically useless but in developing countries universities are like this.

    So be it.   And "in developing countries universities", if that is how their educators teach SQL, watch out world, will there ever be a glut of even less skilled database folks than there already are....   That might just be why those countries are referred to as "developing"...  Let's hope that such foolishness is not reflective of the overall state of IT education, because if it is, ...  again,  WATCH OUT WORLD...

    I don't see the sort of application the OP is supposed to develop as much different from the type of tools Redgate and ApexSQL, etc. develop.

    How about the fact that the someone doing the developing is an expert selling to other experts?  If that's not a rather sizable difference, then we can stop talking about it right here and now.   Any app being developed by a student for that kind of work had better be being done by a Mensa-level genius that actually has people skills, or there will be a HUGE difference in the resulting app.

    Well the OP did say "Actually this is a university project for studying" so I took it as a learning exercise. Also, if she gets some scripts from the posters here that would check what maintenance operation should be done to different indexes and includes them within her application then she might come up with a useful application.

  • Jonathan AC Roberts - Thursday, October 18, 2018 7:05 AM

    sgmunson - Thursday, October 18, 2018 6:58 AM

    Jonathan AC Roberts - Thursday, October 18, 2018 6:23 AM

    sgmunson - Thursday, October 18, 2018 6:16 AM

    elea.grig - Tuesday, October 16, 2018 12:04 PM

    sgmunson - Monday, October 1, 2018 1:05 PM

    elea.grig - Monday, October 1, 2018 12:41 PM

    sgmunson - Monday, October 1, 2018 8:09 AM

    Index maintenance is typically a DBA role, and should NEVER be relegated to users.   Just doesn't sound like a good idea to me at all.   Determining which method of dealing with the index is not a decision a user or an app is likely to ever be qualified to do.   That's the reason you pay a DBA to do it.   The DBA has the knowledge and experience to perform that task.   The user most likely does not and could easily do far more harm than good.   Really bad idea to even consider making an app and letting users run such things.

    Thanks for the answer! Actually this is a university project for studying, and basically this program will be used by other students. And maintenance plan does not let me choose all the options I will provide on my script

    I fail to see how that matters.   If your teachers are going to show you a bad idea, then they are not doing you any favors.  Besides, whatever database they have it pointed to will quickly get messed up by all that index maintenance, and quickly lose any real value precisely because it will be in a degraded state.   Somebody on the faculty isn't too bright a bulb....

    I've explained everything that this project is basically useless but in developing countries universities are like this.

    So be it.   And "in developing countries universities", if that is how their educators teach SQL, watch out world, will there ever be a glut of even less skilled database folks than there already are....   That might just be why those countries are referred to as "developing"...  Let's hope that such foolishness is not reflective of the overall state of IT education, because if it is, ...  again,  WATCH OUT WORLD...

    I don't see the sort of application the OP is supposed to develop as much different from the type of tools Redgate and ApexSQL, etc. develop.

    How about the fact that the someone doing the developing is an expert selling to other experts?  If that's not a rather sizable difference, then we can stop talking about it right here and now.   Any app being developed by a student for that kind of work had better be being done by a Mensa-level genius that actually has people skills, or there will be a HUGE difference in the resulting app.

    Well the OP did say "Actually this is a university project for studying" so I took it as a learning exercise. Also, if she gets some scripts from the posters here that would check what maintenance operation should be done to different indexes and includes them within her application then she might come up with a useful application.

    True enough but let's review the requirements of the project as stated in the original post.

    I have to create a project which should have a GUI because people who gonna use it don't know TSQL. It's purpose it to let people choose options with checkboxes than run a index maintenance script on the server with specified options.

    Studying in university is supposed to prepare you for real life.  In real life, no DBA worth their salt would allow this.  If someone doesn't know T-SQL, how would they ever know enough about when, why, or what the settings for index maintenance should be?  No.... this absolutely should not be a program executed by users.  Index Maintenance should be automated by the DBA.  Having some user run index maintenance willy nilly during peak hours could cause real problems for the system and the other users.  Worse yet, giving them options could destroy performance by a bad rebuild/reorganize (especially reorganize) or what have you. 

    As a bit of a side bar, the OP is getting early training to understand that there are certain things that users (and developers) must not be allowed to do  and why and that, as in real life, sometimes the answer is going to not only be "No" but "Hell No!" 😉  Heh... and if the OP really knew T-SQL as they claim, they'd agree. 😛

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions

  • Bad idea aside, if you are a great student, you would do some extra research and present your findings to your professors and fellow students.  I'm betting that the professors are teaching from an old textbook that likely has no bearing on the real world.  That is a discussion for another thread, however. 

    And, this is not limited to "developing countries".  I recently reviewed the class syllabus for a colleague who was planning on taking some DBA classes. It was pretty bad.   

    Back to your project!
    I would create the GUI using Visual Studio .Net.  Pick your language, C# or VB would probably make the most sense.  Install SSDT (SQL Server Data Tools) along with it.
    The things you need to be aware of are:
    1. Security.  Will the users running the apps have admin rights to the server, or will you be creating an admin account that will be used to connect to the server?
    2. You could easily simply copy and paste any number of scripts that blindly re-index or re-org all of the indexes.  I think it would be beneficial, for yourself and others, to actually have the application display the fragmentation of the indexes, and then only reindex (re-org is pretty worthless most of the time) the indexes that exceed a certain level of fragmentation. 
    3. Has updating statistics ever come up in the class?  This is likely far more important than reindexing.  

    Your question does not really contain enough information for any of us to actually provide solid ideas and suggestions.  If this is an assignment, can you show the entire request?

    Michael L John
    If you assassinate a DBA, would you pull a trigger?
    To properly post on a forum:
    http://www.sqlservercentral.com/articles/61537/

  • What would be cool to find out is if this is a self-imposed project by the OP or a project imposed by some instructor.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions

  • Jeff Moden - Thursday, October 18, 2018 7:21 AM

    Jonathan AC Roberts - Thursday, October 18, 2018 7:05 AM

    sgmunson - Thursday, October 18, 2018 6:58 AM

    Jonathan AC Roberts - Thursday, October 18, 2018 6:23 AM

    sgmunson - Thursday, October 18, 2018 6:16 AM

    elea.grig - Tuesday, October 16, 2018 12:04 PM

    sgmunson - Monday, October 1, 2018 1:05 PM

    elea.grig - Monday, October 1, 2018 12:41 PM

    sgmunson - Monday, October 1, 2018 8:09 AM

    Index maintenance is typically a DBA role, and should NEVER be relegated to users.   Just doesn't sound like a good idea to me at all.   Determining which method of dealing with the index is not a decision a user or an app is likely to ever be qualified to do.   That's the reason you pay a DBA to do it.   The DBA has the knowledge and experience to perform that task.   The user most likely does not and could easily do far more harm than good.   Really bad idea to even consider making an app and letting users run such things.

    Thanks for the answer! Actually this is a university project for studying, and basically this program will be used by other students. And maintenance plan does not let me choose all the options I will provide on my script

    I fail to see how that matters.   If your teachers are going to show you a bad idea, then they are not doing you any favors.  Besides, whatever database they have it pointed to will quickly get messed up by all that index maintenance, and quickly lose any real value precisely because it will be in a degraded state.   Somebody on the faculty isn't too bright a bulb....

    I've explained everything that this project is basically useless but in developing countries universities are like this.

    So be it.   And "in developing countries universities", if that is how their educators teach SQL, watch out world, will there ever be a glut of even less skilled database folks than there already are....   That might just be why those countries are referred to as "developing"...  Let's hope that such foolishness is not reflective of the overall state of IT education, because if it is, ...  again,  WATCH OUT WORLD...

    I don't see the sort of application the OP is supposed to develop as much different from the type of tools Redgate and ApexSQL, etc. develop.

    How about the fact that the someone doing the developing is an expert selling to other experts?  If that's not a rather sizable difference, then we can stop talking about it right here and now.   Any app being developed by a student for that kind of work had better be being done by a Mensa-level genius that actually has people skills, or there will be a HUGE difference in the resulting app.

    Well the OP did say "Actually this is a university project for studying" so I took it as a learning exercise. Also, if she gets some scripts from the posters here that would check what maintenance operation should be done to different indexes and includes them within her application then she might come up with a useful application.

    True enough but let's review the requirements of the project as stated in the original post.

    I have to create a project which should have a GUI because people who gonna use it don't know TSQL. It's purpose it to let people choose options with checkboxes than run a index maintenance script on the server with specified options.

    Studying in university is supposed to prepare you for real life.  In real life, no DBA worth their salt would allow this.  If someone doesn't know T-SQL, how would they ever know enough about when, why, or what the settings for index maintenance should be?  No.... this absolutely should not be a program executed by users.  Index Maintenance should be automated by the DBA.  Having some user run index maintenance willy nilly during peak hours could cause real problems for the system and the other users.  Worse yet, giving them options could destroy performance by a bad rebuild/reorganize (especially reorganize) or what have you. 

    As a bit of a side bar, the OP is getting early training to understand that there are certain things that users (and developers) must not be allowed to do  and why and that, as in real life, sometimes the answer is going to not only be "No" but "Hell No!" 😉  Heh... and if the OP really knew T-SQL as they claim, they'd agree. 😛

    I think this thread has been unnecessarily hosed by Jeff and sgmunson, there are certainly point and click index maintenance programs out there, this is not out of the realm of possibilities that at some point somebody is going to write code to do this. I think its certainly ok to caution against having a program issue incorrect index rebuild statements, but I suspect this would also be part of the assignment. Heck in all likelihood they're going to be working on the exact same server environments I worked on in college, ie., installations that students can hose and the world will still continue to turn.

    So my question to Jeff and sgmunson, did your college not have environments expendable enough that students could learn on? Say, SQL express installations? I know when I worked in college, when a computer goofed up, we reinstalled them and the world didn't end. Was this not the case at the colleges you attended? Heck for that matter, reorgs and rebuilds would not be too prohibitive an operation to issue from dot net for instance.

    Just assume that I don't know what your concerns are on this one and clue me in! Heck if you are hiring a fresh graduate as your production DBA without a mentoring program or other work experience, doesn't that make this "gui a t-sql command" a bit moot? Wouldn't you have far larger concerns throwing a rookie out on your production servers?

  • patrickmcginnis59 10839 - Wednesday, October 24, 2018 1:54 PM

    Jeff Moden - Thursday, October 18, 2018 7:21 AM

    Jonathan AC Roberts - Thursday, October 18, 2018 7:05 AM

    sgmunson - Thursday, October 18, 2018 6:58 AM

    Jonathan AC Roberts - Thursday, October 18, 2018 6:23 AM

    sgmunson - Thursday, October 18, 2018 6:16 AM

    elea.grig - Tuesday, October 16, 2018 12:04 PM

    sgmunson - Monday, October 1, 2018 1:05 PM

    elea.grig - Monday, October 1, 2018 12:41 PM

    sgmunson - Monday, October 1, 2018 8:09 AM

    Index maintenance is typically a DBA role, and should NEVER be relegated to users.   Just doesn't sound like a good idea to me at all.   Determining which method of dealing with the index is not a decision a user or an app is likely to ever be qualified to do.   That's the reason you pay a DBA to do it.   The DBA has the knowledge and experience to perform that task.   The user most likely does not and could easily do far more harm than good.   Really bad idea to even consider making an app and letting users run such things.

    Thanks for the answer! Actually this is a university project for studying, and basically this program will be used by other students. And maintenance plan does not let me choose all the options I will provide on my script

    I fail to see how that matters.   If your teachers are going to show you a bad idea, then they are not doing you any favors.  Besides, whatever database they have it pointed to will quickly get messed up by all that index maintenance, and quickly lose any real value precisely because it will be in a degraded state.   Somebody on the faculty isn't too bright a bulb....

    I've explained everything that this project is basically useless but in developing countries universities are like this.

    So be it.   And "in developing countries universities", if that is how their educators teach SQL, watch out world, will there ever be a glut of even less skilled database folks than there already are....   That might just be why those countries are referred to as "developing"...  Let's hope that such foolishness is not reflective of the overall state of IT education, because if it is, ...  again,  WATCH OUT WORLD...

    I don't see the sort of application the OP is supposed to develop as much different from the type of tools Redgate and ApexSQL, etc. develop.

    How about the fact that the someone doing the developing is an expert selling to other experts?  If that's not a rather sizable difference, then we can stop talking about it right here and now.   Any app being developed by a student for that kind of work had better be being done by a Mensa-level genius that actually has people skills, or there will be a HUGE difference in the resulting app.

    Well the OP did say "Actually this is a university project for studying" so I took it as a learning exercise. Also, if she gets some scripts from the posters here that would check what maintenance operation should be done to different indexes and includes them within her application then she might come up with a useful application.

    True enough but let's review the requirements of the project as stated in the original post.

    I have to create a project which should have a GUI because people who gonna use it don't know TSQL. It's purpose it to let people choose options with checkboxes than run a index maintenance script on the server with specified options.

    Studying in university is supposed to prepare you for real life.  In real life, no DBA worth their salt would allow this.  If someone doesn't know T-SQL, how would they ever know enough about when, why, or what the settings for index maintenance should be?  No.... this absolutely should not be a program executed by users.  Index Maintenance should be automated by the DBA.  Having some user run index maintenance willy nilly during peak hours could cause real problems for the system and the other users.  Worse yet, giving them options could destroy performance by a bad rebuild/reorganize (especially reorganize) or what have you. 

    As a bit of a side bar, the OP is getting early training to understand that there are certain things that users (and developers) must not be allowed to do  and why and that, as in real life, sometimes the answer is going to not only be "No" but "Hell No!" 😉  Heh... and if the OP really knew T-SQL as they claim, they'd agree. 😛

    I think this thread has been unnecessarily hosed by Jeff and sgmunson, there are certainly point and click index maintenance programs out there, this is not out of the realm of possibilities that at some point somebody is going to write code to do this. I think its certainly ok to caution against having a program issue incorrect index rebuild statements, but I suspect this would also be part of the assignment. Heck in all likelihood they're going to be working on the exact same server environments I worked on in college, ie., installations that students can hose and the world will still continue to turn.

    So my question to Jeff and sgmunson, did your college not have environments expendable enough that students could learn on? Say, SQL express installations? I know when I worked in college, when a computer goofed up, we reinstalled them and the world didn't end. Was this not the case at the colleges you attended? Heck for that matter, reorgs and rebuilds would not be too prohibitive an operation to issue from dot net for instance.

    Just assume that I don't know what your concerns are on this one and clue me in! Heck if you are hiring a fresh graduate as your production DBA without a mentoring program or other work experience, doesn't that make this "gui a t-sql command" a bit moot? Wouldn't you have far larger concerns throwing a rookie out on your production servers?

    Hosed on, set on fire, and all the other hell we might need to rain down on it.  When you have to worry about being able to get decent IT talent to begin with, the last thing you want is some dipwad professor thinkin' he's smarter than the average bear when it's abundantly clear that he/she is doing a great job of promoting unnecessary risk taking in general and specifically some rather bad ideas about index maintenance.   More students with that kind of thinking going on just means more such "rookies" that you have to worry about when they come in the door.  Promoting bad ideas is the one thing every professor should NEVER do.   Maybe we need the functional equivalent of a Hippocratic Oath for education.   Unfortunately, most profs would probably fail that these days.

  • sgmunson - Wednesday, October 24, 2018 2:46 PM

    patrickmcginnis59 10839 - Wednesday, October 24, 2018 1:54 PM

    Jeff Moden - Thursday, October 18, 2018 7:21 AM

    Jonathan AC Roberts - Thursday, October 18, 2018 7:05 AM

    sgmunson - Thursday, October 18, 2018 6:58 AM

    Jonathan AC Roberts - Thursday, October 18, 2018 6:23 AM

    sgmunson - Thursday, October 18, 2018 6:16 AM

    elea.grig - Tuesday, October 16, 2018 12:04 PM

    sgmunson - Monday, October 1, 2018 1:05 PM

    elea.grig - Monday, October 1, 2018 12:41 PM

    sgmunson - Monday, October 1, 2018 8:09 AM

    Index maintenance is typically a DBA role, and should NEVER be relegated to users.   Just doesn't sound like a good idea to me at all.   Determining which method of dealing with the index is not a decision a user or an app is likely to ever be qualified to do.   That's the reason you pay a DBA to do it.   The DBA has the knowledge and experience to perform that task.   The user most likely does not and could easily do far more harm than good.   Really bad idea to even consider making an app and letting users run such things.

    Thanks for the answer! Actually this is a university project for studying, and basically this program will be used by other students. And maintenance plan does not let me choose all the options I will provide on my script

    I fail to see how that matters.   If your teachers are going to show you a bad idea, then they are not doing you any favors.  Besides, whatever database they have it pointed to will quickly get messed up by all that index maintenance, and quickly lose any real value precisely because it will be in a degraded state.   Somebody on the faculty isn't too bright a bulb....

    I've explained everything that this project is basically useless but in developing countries universities are like this.

    So be it.   And "in developing countries universities", if that is how their educators teach SQL, watch out world, will there ever be a glut of even less skilled database folks than there already are....   That might just be why those countries are referred to as "developing"...  Let's hope that such foolishness is not reflective of the overall state of IT education, because if it is, ...  again,  WATCH OUT WORLD...

    I don't see the sort of application the OP is supposed to develop as much different from the type of tools Redgate and ApexSQL, etc. develop.

    How about the fact that the someone doing the developing is an expert selling to other experts?  If that's not a rather sizable difference, then we can stop talking about it right here and now.   Any app being developed by a student for that kind of work had better be being done by a Mensa-level genius that actually has people skills, or there will be a HUGE difference in the resulting app.

    Well the OP did say "Actually this is a university project for studying" so I took it as a learning exercise. Also, if she gets some scripts from the posters here that would check what maintenance operation should be done to different indexes and includes them within her application then she might come up with a useful application.

    True enough but let's review the requirements of the project as stated in the original post.

    I have to create a project which should have a GUI because people who gonna use it don't know TSQL. It's purpose it to let people choose options with checkboxes than run a index maintenance script on the server with specified options.

    Studying in university is supposed to prepare you for real life.  In real life, no DBA worth their salt would allow this.  If someone doesn't know T-SQL, how would they ever know enough about when, why, or what the settings for index maintenance should be?  No.... this absolutely should not be a program executed by users.  Index Maintenance should be automated by the DBA.  Having some user run index maintenance willy nilly during peak hours could cause real problems for the system and the other users.  Worse yet, giving them options could destroy performance by a bad rebuild/reorganize (especially reorganize) or what have you. 

    As a bit of a side bar, the OP is getting early training to understand that there are certain things that users (and developers) must not be allowed to do  and why and that, as in real life, sometimes the answer is going to not only be "No" but "Hell No!" 😉  Heh... and if the OP really knew T-SQL as they claim, they'd agree. 😛

    I think this thread has been unnecessarily hosed by Jeff and sgmunson, there are certainly point and click index maintenance programs out there, this is not out of the realm of possibilities that at some point somebody is going to write code to do this. I think its certainly ok to caution against having a program issue incorrect index rebuild statements, but I suspect this would also be part of the assignment. Heck in all likelihood they're going to be working on the exact same server environments I worked on in college, ie., installations that students can hose and the world will still continue to turn.

    So my question to Jeff and sgmunson, did your college not have environments expendable enough that students could learn on? Say, SQL express installations? I know when I worked in college, when a computer goofed up, we reinstalled them and the world didn't end. Was this not the case at the colleges you attended? Heck for that matter, reorgs and rebuilds would not be too prohibitive an operation to issue from dot net for instance.

    Just assume that I don't know what your concerns are on this one and clue me in! Heck if you are hiring a fresh graduate as your production DBA without a mentoring program or other work experience, doesn't that make this "gui a t-sql command" a bit moot? Wouldn't you have far larger concerns throwing a rookie out on your production servers?

    Hosed on, set on fire, and all the other hell we might need to rain down on it.  When you have to worry about being able to get decent IT talent to begin with, the last thing you want is some dipwad professor thinkin' he's smarter than the average bear when it's abundantly clear that he/she is doing a great job of promoting unnecessary risk taking in general and specifically some rather bad ideas about index maintenance.   More students with that kind of thinking going on just means more such "rookies" that you have to worry about when they come in the door.  Promoting bad ideas is the one thing every professor should NEVER do.   Maybe we need the functional equivalent of a Hippocratic Oath for education.   Unfortunately, most profs would probably fail that these days.

    Bad idea on the back side, but teaches valuable things on the front side.  Professor just needs a better project.

  • Lynn Pettis - Wednesday, October 24, 2018 3:33 PM

    sgmunson - Wednesday, October 24, 2018 2:46 PM

    patrickmcginnis59 10839 - Wednesday, October 24, 2018 1:54 PM

    Jeff Moden - Thursday, October 18, 2018 7:21 AM

    Jonathan AC Roberts - Thursday, October 18, 2018 7:05 AM

    sgmunson - Thursday, October 18, 2018 6:58 AM

    Jonathan AC Roberts - Thursday, October 18, 2018 6:23 AM

    sgmunson - Thursday, October 18, 2018 6:16 AM

    elea.grig - Tuesday, October 16, 2018 12:04 PM

    sgmunson - Monday, October 1, 2018 1:05 PM

    elea.grig - Monday, October 1, 2018 12:41 PM

    sgmunson - Monday, October 1, 2018 8:09 AM

    Index maintenance is typically a DBA role, and should NEVER be relegated to users.   Just doesn't sound like a good idea to me at all.   Determining which method of dealing with the index is not a decision a user or an app is likely to ever be qualified to do.   That's the reason you pay a DBA to do it.   The DBA has the knowledge and experience to perform that task.   The user most likely does not and could easily do far more harm than good.   Really bad idea to even consider making an app and letting users run such things.

    Thanks for the answer! Actually this is a university project for studying, and basically this program will be used by other students. And maintenance plan does not let me choose all the options I will provide on my script

    I fail to see how that matters.   If your teachers are going to show you a bad idea, then they are not doing you any favors.  Besides, whatever database they have it pointed to will quickly get messed up by all that index maintenance, and quickly lose any real value precisely because it will be in a degraded state.   Somebody on the faculty isn't too bright a bulb....

    I've explained everything that this project is basically useless but in developing countries universities are like this.

    So be it.   And "in developing countries universities", if that is how their educators teach SQL, watch out world, will there ever be a glut of even less skilled database folks than there already are....   That might just be why those countries are referred to as "developing"...  Let's hope that such foolishness is not reflective of the overall state of IT education, because if it is, ...  again,  WATCH OUT WORLD...

    I don't see the sort of application the OP is supposed to develop as much different from the type of tools Redgate and ApexSQL, etc. develop.

    How about the fact that the someone doing the developing is an expert selling to other experts?  If that's not a rather sizable difference, then we can stop talking about it right here and now.   Any app being developed by a student for that kind of work had better be being done by a Mensa-level genius that actually has people skills, or there will be a HUGE difference in the resulting app.

    Well the OP did say "Actually this is a university project for studying" so I took it as a learning exercise. Also, if she gets some scripts from the posters here that would check what maintenance operation should be done to different indexes and includes them within her application then she might come up with a useful application.

    True enough but let's review the requirements of the project as stated in the original post.

    I have to create a project which should have a GUI because people who gonna use it don't know TSQL. It's purpose it to let people choose options with checkboxes than run a index maintenance script on the server with specified options.

    Studying in university is supposed to prepare you for real life.  In real life, no DBA worth their salt would allow this.  If someone doesn't know T-SQL, how would they ever know enough about when, why, or what the settings for index maintenance should be?  No.... this absolutely should not be a program executed by users.  Index Maintenance should be automated by the DBA.  Having some user run index maintenance willy nilly during peak hours could cause real problems for the system and the other users.  Worse yet, giving them options could destroy performance by a bad rebuild/reorganize (especially reorganize) or what have you. 

    As a bit of a side bar, the OP is getting early training to understand that there are certain things that users (and developers) must not be allowed to do  and why and that, as in real life, sometimes the answer is going to not only be "No" but "Hell No!" 😉  Heh... and if the OP really knew T-SQL as they claim, they'd agree. 😛

    I think this thread has been unnecessarily hosed by Jeff and sgmunson, there are certainly point and click index maintenance programs out there, this is not out of the realm of possibilities that at some point somebody is going to write code to do this. I think its certainly ok to caution against having a program issue incorrect index rebuild statements, but I suspect this would also be part of the assignment. Heck in all likelihood they're going to be working on the exact same server environments I worked on in college, ie., installations that students can hose and the world will still continue to turn.

    So my question to Jeff and sgmunson, did your college not have environments expendable enough that students could learn on? Say, SQL express installations? I know when I worked in college, when a computer goofed up, we reinstalled them and the world didn't end. Was this not the case at the colleges you attended? Heck for that matter, reorgs and rebuilds would not be too prohibitive an operation to issue from dot net for instance.

    Just assume that I don't know what your concerns are on this one and clue me in! Heck if you are hiring a fresh graduate as your production DBA without a mentoring program or other work experience, doesn't that make this "gui a t-sql command" a bit moot? Wouldn't you have far larger concerns throwing a rookie out on your production servers?

    Hosed on, set on fire, and all the other hell we might need to rain down on it.  When you have to worry about being able to get decent IT talent to begin with, the last thing you want is some dipwad professor thinkin' he's smarter than the average bear when it's abundantly clear that he/she is doing a great job of promoting unnecessary risk taking in general and specifically some rather bad ideas about index maintenance.   More students with that kind of thinking going on just means more such "rookies" that you have to worry about when they come in the door.  Promoting bad ideas is the one thing every professor should NEVER do.   Maybe we need the functional equivalent of a Hippocratic Oath for education.   Unfortunately, most profs would probably fail that these days.

    Bad idea on the back side, but teaches valuable things on the front side.  Professor just needs a better project.

    Ok I understand if you're giving college students sa on the colleges administrative servers or alternatively if you are consuming fresh college grads straight into production server admin positions, but neither one of those situations are particular to a dot net program sending t-sql to rebuild or reorg indexes. I'd probably hesitate to recommend either one of those strategies regardless of what programming task were considered.

    Is it just the dot net stuff that has you all uncomfortable? I guess I could understand that too but then why even bother commenting on making a gui with sql server, unless theres a "visual sql" I'm unfamiliar with LOL

    edit: cleaned up hosed post

  • Having worked in a university previously, I can tell you that a lot of GUI programs are deliberately not things you're likely to find out in the "real world" simply because it makes it more likely students won't just go off, lift the design from an existing application and then try to implement that. There is more benefit in a student sitting down and thinking through what should be displayed and how they can best get input from the user, than in the practical use of whatever they end up building.

    Having something run maintenance tasks on an arbitrary database is actually kind of interesting from that perspective. Not only does it involve some database connectivity code (always a good idea) but also means you can have them do demos/tests against a database they haven't necessarily seen before - which can even be pre-created with some known maintenance required.

  • andycadley - Thursday, October 25, 2018 12:33 AM

    Having worked in a university previously, I can tell you that a lot of GUI programs are deliberately not things you're likely to find out in the "real world" simply because it makes it more likely students won't just go off, lift the design from an existing application and then try to implement that. There is more benefit in a student sitting down and thinking through what should be displayed and how they can best get input from the user, than in the practical use of whatever they end up building.

    Having something run maintenance tasks on an arbitrary database is actually kind of interesting from that perspective. Not only does it involve some database connectivity code (always a good idea) but also means you can have them do demos/tests against a database they haven't necessarily seen before - which can even be pre-created with some known maintenance required.

    I totally agree on all counts, Andy.  It's why such exercises like the "Fizz Buzz" problem were developed, although that has certainly become seriously public and easy to find.  I also agree that the requirement of "people who gonna {sic} use it don't know TSQL" is a driver as to how complete the code should be for the project.

    I just don't agree with all of that for this particular case.  While I do agree that not everything has to be "real life" to teach thought processes and skills, this one is sending the wrong message, IMHO. (I also believe that it needs to be made absolutely clear that it's not real life so students don't take the wrong ideas forward).   Also, consider what could happen if this particular "gypsy moth" gets out into the "wild".  "Well, this was developed and tested at the University of {whatever}, so both the concept and the code must be correct".  While many with disagree with me, there are a whole lot of people in this world that would blindly copy and use the code.

    Also, once this gets out, the argument of having something fresh just because a database changes won't actually be valid anymore anyway.  Might as well teach the right way to do it and the real life reasons why.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions

  • Jeff Moden - Thursday, October 25, 2018 8:33 AM

    andycadley - Thursday, October 25, 2018 12:33 AM

    Having worked in a university previously, I can tell you that a lot of GUI programs are deliberately not things you're likely to find out in the "real world" simply because it makes it more likely students won't just go off, lift the design from an existing application and then try to implement that. There is more benefit in a student sitting down and thinking through what should be displayed and how they can best get input from the user, than in the practical use of whatever they end up building.

    Having something run maintenance tasks on an arbitrary database is actually kind of interesting from that perspective. Not only does it involve some database connectivity code (always a good idea) but also means you can have them do demos/tests against a database they haven't necessarily seen before - which can even be pre-created with some known maintenance required.

    I totally agree on all counts, Andy.  It's why such exercises like the "Fizz Buzz" problem were developed, although that has certainly become seriously public and easy to find.  I also agree that the requirement of "people who gonna {sic} use it don't know TSQL" is a driver as to how complete the code should be for the project.

    I just don't agree with all of that for this particular case.  While I do agree that not everything has to be "real life" to teach thought processes and skills, this one is sending the wrong message, IMHO. (I also believe that it needs to be made absolutely clear that it's not real life so students don't take the wrong ideas forward).   Also, consider what could happen if this particular "gypsy moth" gets out into the "wild".  "Well, this was developed and tested at the University of {whatever}, so both the concept and the code must be correct".  While many with disagree with me, there are a whole lot of people in this world that would blindly copy and use the code.

    Also, once this gets out, the argument of having something fresh just because a database changes won't actually be valid anymore anyway.  Might as well teach the right way to do it and the real life reasons why.

    + a googolplex, to the googolplex power, cubed !!!

  • sgmunson - Wednesday, October 24, 2018 2:46 PM

    patrickmcginnis59 10839 - Wednesday, October 24, 2018 1:54 PM

    Jeff Moden - Thursday, October 18, 2018 7:21 AM

    Jonathan AC Roberts - Thursday, October 18, 2018 7:05 AM

    sgmunson - Thursday, October 18, 2018 6:58 AM

    Jonathan AC Roberts - Thursday, October 18, 2018 6:23 AM

    sgmunson - Thursday, October 18, 2018 6:16 AM

    elea.grig - Tuesday, October 16, 2018 12:04 PM

    sgmunson - Monday, October 1, 2018 1:05 PM

    elea.grig - Monday, October 1, 2018 12:41 PM

    sgmunson - Monday, October 1, 2018 8:09 AM

    Index maintenance is typically a DBA role, and should NEVER be relegated to users.   Just doesn't sound like a good idea to me at all.   Determining which method of dealing with the index is not a decision a user or an app is likely to ever be qualified to do.   That's the reason you pay a DBA to do it.   The DBA has the knowledge and experience to perform that task.   The user most likely does not and could easily do far more harm than good.   Really bad idea to even consider making an app and letting users run such things.

    Thanks for the answer! Actually this is a university project for studying, and basically this program will be used by other students. And maintenance plan does not let me choose all the options I will provide on my script

    I fail to see how that matters.   If your teachers are going to show you a bad idea, then they are not doing you any favors.  Besides, whatever database they have it pointed to will quickly get messed up by all that index maintenance, and quickly lose any real value precisely because it will be in a degraded state.   Somebody on the faculty isn't too bright a bulb....

    I've explained everything that this project is basically useless but in developing countries universities are like this.

    So be it.   And "in developing countries universities", if that is how their educators teach SQL, watch out world, will there ever be a glut of even less skilled database folks than there already are....   That might just be why those countries are referred to as "developing"...  Let's hope that such foolishness is not reflective of the overall state of IT education, because if it is, ...  again,  WATCH OUT WORLD...

    I don't see the sort of application the OP is supposed to develop as much different from the type of tools Redgate and ApexSQL, etc. develop.

    How about the fact that the someone doing the developing is an expert selling to other experts?  If that's not a rather sizable difference, then we can stop talking about it right here and now.   Any app being developed by a student for that kind of work had better be being done by a Mensa-level genius that actually has people skills, or there will be a HUGE difference in the resulting app.

    Well the OP did say "Actually this is a university project for studying" so I took it as a learning exercise. Also, if she gets some scripts from the posters here that would check what maintenance operation should be done to different indexes and includes them within her application then she might come up with a useful application.

    True enough but let's review the requirements of the project as stated in the original post.

    I have to create a project which should have a GUI because people who gonna use it don't know TSQL. It's purpose it to let people choose options with checkboxes than run a index maintenance script on the server with specified options.

    Studying in university is supposed to prepare you for real life.  In real life, no DBA worth their salt would allow this.  If someone doesn't know T-SQL, how would they ever know enough about when, why, or what the settings for index maintenance should be?  No.... this absolutely should not be a program executed by users.  Index Maintenance should be automated by the DBA.  Having some user run index maintenance willy nilly during peak hours could cause real problems for the system and the other users.  Worse yet, giving them options could destroy performance by a bad rebuild/reorganize (especially reorganize) or what have you. 

    As a bit of a side bar, the OP is getting early training to understand that there are certain things that users (and developers) must not be allowed to do  and why and that, as in real life, sometimes the answer is going to not only be "No" but "Hell No!" 😉  Heh... and if the OP really knew T-SQL as they claim, they'd agree. 😛

    I think this thread has been unnecessarily hosed by Jeff and sgmunson, there are certainly point and click index maintenance programs out there, this is not out of the realm of possibilities that at some point somebody is going to write code to do this. I think its certainly ok to caution against having a program issue incorrect index rebuild statements, but I suspect this would also be part of the assignment. Heck in all likelihood they're going to be working on the exact same server environments I worked on in college, ie., installations that students can hose and the world will still continue to turn.

    So my question to Jeff and sgmunson, did your college not have environments expendable enough that students could learn on? Say, SQL express installations? I know when I worked in college, when a computer goofed up, we reinstalled them and the world didn't end. Was this not the case at the colleges you attended? Heck for that matter, reorgs and rebuilds would not be too prohibitive an operation to issue from dot net for instance.

    Just assume that I don't know what your concerns are on this one and clue me in! Heck if you are hiring a fresh graduate as your production DBA without a mentoring program or other work experience, doesn't that make this "gui a t-sql command" a bit moot? Wouldn't you have far larger concerns throwing a rookie out on your production servers?

    Hosed on, set on fire, and all the other hell we might need to rain down on it.  When you have to worry about being able to get decent IT talent to begin with, the last thing you want is some dipwad professor thinkin' he's smarter than the average bear when it's abundantly clear that he/she is doing a great job of promoting unnecessary risk taking in general and specifically some rather bad ideas about index maintenance.   More students with that kind of thinking going on just means more such "rookies" that you have to worry about when they come in the door.  Promoting bad ideas is the one thing every professor should NEVER do.   Maybe we need the functional equivalent of a Hippocratic Oath for education.   Unfortunately, most profs would probably fail that these days.

    A college is not and should not be job training.  So without knowing more information about what this project is actually about it's hard to say what value there is in it.  From a purely academic standpoint creating a user interface to simplify complicated back end tasks has a lot of value.  That might not be anything you would deploy to your enterprise server but from an academic standpoint it has value, particularly if it teaches the student that there's more to databases than just staring at SSMS.

  • Jeff Moden - Thursday, October 25, 2018 8:33 AM

    andycadley - Thursday, October 25, 2018 12:33 AM

    Having worked in a university previously, I can tell you that a lot of GUI programs are deliberately not things you're likely to find out in the "real world" simply because it makes it more likely students won't just go off, lift the design from an existing application and then try to implement that. There is more benefit in a student sitting down and thinking through what should be displayed and how they can best get input from the user, than in the practical use of whatever they end up building.

    Having something run maintenance tasks on an arbitrary database is actually kind of interesting from that perspective. Not only does it involve some database connectivity code (always a good idea) but also means you can have them do demos/tests against a database they haven't necessarily seen before - which can even be pre-created with some known maintenance required.

    I totally agree on all counts, Andy.  It's why such exercises like the "Fizz Buzz" problem were developed, although that has certainly become seriously public and easy to find.  I also agree that the requirement of "people who gonna {sic} use it don't know TSQL" is a driver as to how complete the code should be for the project.

    I just don't agree with all of that for this particular case.  While I do agree that not everything has to be "real life" to teach thought processes and skills, this one is sending the wrong message, IMHO. (I also believe that it needs to be made absolutely clear that it's not real life so students don't take the wrong ideas forward).   Also, consider what could happen if this particular "gypsy moth" gets out into the "wild".  "Well, this was developed and tested at the University of {whatever}, so both the concept and the code must be correct".  While many with disagree with me, there are a whole lot of people in this world that would blindly copy and use the code.

    Also, once this gets out, the argument of having something fresh just because a database changes won't actually be valid anymore anyway.  Might as well teach the right way to do it and the real life reasons why.

    At some point the SQL community needs to quit being the helpless triggered snowflakes repeatedly lashing out in slanderous fashion against innocent bystanders and start taking some responsibility for our field of endeavor. There are already point and click interfaces to SQL server, if there is ANY HARM AT ALL in a professor and their class investigating another, then its not an indictment against the professor, its rather an indictment against the fragility of the SQL community that it cannot withstand such an imaginary assault against some unpublished morality play.

    In other words, get over yourself.

Viewing 15 posts - 16 through 30 (of 56 total)

You must be logged in to reply to this topic. Login to reply