Teach an M.B.A. the intricacies of Microsoft SQL Server (and how's it different from MySQL?) [closed] - mysql

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
I haven't had to interact w/MSSQL much in my development career, though I've spent many an hour working with MySQL.
An M.B.A. friend of mine is starting a job where she needs to gain functional knowledge of MSSQL Server, and I'd really like to help.
What are the differences between MSSQL and MySQL?
How would you recommend a non-technical person go about learning the ups and downs of MSSQL Server?
[update] Previous database design skills are naught. I've given her to short and long on what a database does from a high-level.

I'd love to say, "you can't". But that would be untrue (or at least mean).
If she has any background with database design at all, then this is merely a new RDBMS.
If she's never done database design, the place to start is not so much with MS SQL, but with how databases work, in my opinion.
Database Design for Mere Mortals is a good place to start. From there I'd move to an MS SQL -specific book, such as Microsoft SQL Server Unleashed.

Download the free SQL Express and start using it. Microsoft also has several video tutorials that would be helpful. They start pretty much from the beginning with "What is a database" and move to more advanced topics.

From the perspective of the database user, the backend is generally irrelevant if they understand some basic concepts.
First and most important concept for the non-technical user is GIGO (Garbage in Garbage out). Bad data is useless data. Check everything you enter into a database for correctness. You really don't want the customer's product to be mailed to San Diego, VA instead of CA.
Then next most important thing is to really understand your user interface and how it works. I've spent a lot of time fixing up junk because users didn't know what they were supposed to put in fields in databases (it would have helped if the developers had not allowed non-email type data to be entered into the email field, but you can't send an email to 757-111-6789). It is never a good idea to put the wrong kind of data into a field because you don't have another place to put it. As a user, you may have no idea what the database is going to use that data for and wrong data can completely stop a process or break something really important. If you don't know what to put in a field, then ask. Don't put junk into a field just because it is required. (Hint, it is required for a reason, that usually means this is data critical to the operation of the database, do not fake this information.)
Now if this person is doing reporting, then the critical concepts become understanding boolean algebra and a very strong undertanding of joins. If you have these two concepts down pat, you have 80-90% of what you need to query a database.
The specifics of the database supported also become important. You need to understand what is stored in what tables (or what views to use) and how they relate to each other. Coming into a new job, I would sit down with the developers if possible and get an overview of the design and whatI would need to know to get the data. I would review existing report queries to see how the data is currently being retrieved and use that to ask questions if I don't understand what the person did. Even a database expert will need to spend some time doing this when faced with a new database, so there is no reason to be shy in asking these questions when you are new.
Final thing is to learn how to report a problem to the developers. Problems that are not reported don't get fixed! Problems that are not reproducable because the user didn't provide screen shots and a context for what she was doing when the error occurred, don't get fixed either. New data fields that are needed as business requirements change, don't get added to the database until the developers know about them (Please ask for a Notes field if you need it instead of entering junk data into a field like email that you personally are not using for instance). New business requirements often require a lot of work in the backend to change how things work, it isn't as simple as adding a field on a form. Please be aware of that too when you make requests.

I learned from Robert Vieira's Professional SQL Server 2000 Programming -- well written and comprehensive. I am pretty sure the 2005 version is very similar, just updated. Despite the 'professional' label, I found it a great intro (I had practically no database experience at the time).
Also I second Erikk's comment. Download SQL Express and PLAY!

Related

Controlling access to data in MySQL, using Node, Express, Knex and Bookshelf

I am very new to database design and structuring - I have had no formal training and am purely self taught so I apologize in advance if this is a bland question.
I am designing a web app and am thinking to the future as users will have to be able to interact with each other sharing part of their data. I am wondering if there is a standard convention to controlling access to tables in MySQL and how I should generally tackle this problem with code written in NodeJS, ExpressJS, KnexJS, and BookshelfJS.
For example: a user will be matched with another user, both users will be able to see location, favourite book, etc but not able to see last name, birth date. etc.
How do I control this?
If anyone could point me to a few resources they have found helpful that would be great as well.
You seem to have learned a bit of MySQL and its access control features. Well, database user level access control IS NOT used by modern applications -- that could make resource management, like connection pools, very hard to implement. Usually SQL databases backing web applications have a single or, at most, two users: one for general data access and one for admin purposes.
The kind of access control you mentioned MUST be handled by your application code, YOUR code. There are libraries that help take care of authentication (e.g. passport) and authorization but ultimately it is YOUR CODE responsibility.
So my answer to your "How do I control this?" question is:
With YOUR code.
This is the whole point of Software Development.

Database Development - General Structure and Planning [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I'm about to start a fresh project and I'm good on normalization of the data. My question is the business I'm working for has a number of tables on MS Sql Server and some version of Oracle. Access to create temporary or even use temporary tables may be limited. We might be able to setup our own tables but chances are 50/50. The approach taken in the past has been to create temporary tables as needed for data dumps into MS Access.
If I can edit / create tables on the SQL server then I'm good, but if not I was thinking about setting up one of the spare machines as a MySQL or MS Sql Express server rather than using Access as a number of these types of projects have been completed in the past and push towards a gig in size due to the amount of data downloaded for preparing reports. Would this be a reasonable approach if I'm locked out of MS Sql server or Oracle? What would you do if your hands were tied in a similar fashion?
To provide a little more insight here, the data dumps are often used to build dozens of excel reports (mostly charts). I was thinking if I can use the MS Sql or Oracle to do all the work via triggers / stored procedures / etc. then perhaps I can eliminate the need for Access and just download the data via VBA using Excel only to reduce the amount of time it takes to build the reports.
Maybe I can use an ORM and some kind of VB.net code rather than excel to build the charts faster?
I'm open to suggestions, let me know what you all think and any questions I'll try to answer the best I can
Although setting up a PC with something like SQL Server Express or MySQL often sounds like a great idea, I strongly suggest that you get the backing of your boss before doing something of this nature. Installing unapproved software on inappropriate/unmaintained workstations is often frowned upon with extreme prejudice. Were I to do this at my current place of employment I'm confident I'd be looking for a job as soon as it was uncovered. I completely agree that just about anything is better than MS Access - however, supporting an architecture such as the one you describe, at least temporarily until you can find a better gig, is probably better than unemployment. YMMV.
Share and enjoy.
Actually the most easy solution here would be to continue to use access as a front end, and simply link to the tables on the particular server database system in question. That way you save all the money time and resources of having to pull down and build temporary local tables.
The end result is you get to continue to use Access as a great RAD tool, but enjoy the benefits of the security, performance and scalability of the server based system in question.

Adding security to a wiki

My company wants to use a wiki for training, to try and encourage a team learning and teaching approach. It was easy enough to set up the wiki, but I am trying to find the best way to require a username/password that calls upon an existing users mysql database table.
Does anyone know how to connect a wiki to a mysql database table for user authentication?
Just use a wiki that already has that functionality. Like Banana Dance (shameless plug!):
http://www.doyoubananadance.com/
If you're stuck using what you currently have, you'll have to simply:
1. Set up a table for users within your MySQL database,
2. Create PHP that will allow users to register/login/edit their accounts.
But since your question is so vague, it's hard to really answer short of doing the programming work for you, which probably won't happen.

SQL Server migration to mySQL, tips & potential issues? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I'm looking into whether a move from SQL Server is a viable option. To help me with this decision, I have some questions:
Is it possible to use asp.net membership on a MySQL server ?
Are there many/any useful tools to migrate tables/databases/etc and which ones are the best?
What are the Main disadvantages in moving to MySQL from SQL Server?
As it stands I have a large enough project but it doesn't avail of many MS features so if it's possible I'd like to move.
My company did this a couple years ago with a pretty big project. On thing that made it easier for us is that we mostly used very plain standards compliant SQL. No Linq, no Entity Framework, only a little T-SQL, and only a few stored procedures.
As far as getting your data into MySQL, We ended up creating our own tool for doing this. None of the existing stuff including "MySQL Migration Assistant" can anywhere close to being fully functional. Once you can recreate the schema on MySQL, Getting the data back in, is a matter of exporting to CSV and importing with LOAD DATA INFILE. Tranferring the schema was actually the hardest part. With so many tables, we couldn't just do it by hand. We wrote some code in .Net by starting off using this VBScript that we found, and upgraded it to use the tools in "Microsoft.SqlServer.Management" Namespace available for .Net.
For functions that exist in SQL Server but don't exist in MySQL, such as GetDate, it's easy enough to write your own functions in MySQL that map to these functions, instead of trying to find all the instances of this stuff in the code. There are quite a few syntax differences between MySQL and SQL Server, even with just using basic SQL. For instance MSSQL allows DELETE TABLENAME WHERE ...., but MySQL insists you use DELETE FROM TABLENAME WHERE..... That's just one, there are many other differences.
Anyway, it was quite an adventure, but it worked out well for us. It is do-able, but you have to be committed, and not be afraid to write your own migration tools.
Couple of things off the top of my head.
MySQL doesn't support CHECK constraints. Usually, if your dbms does support CHECK constraints, your tables use them.
Depending on the constraint, you might be able to rewrite it in one of these ways.
As a foreign key to a new table
As a trigger
As a daily (or hourly, whatever) exception report
As a module in application code (which could be part of an exception report)
Something else I haven't thought of.
MySQL's timestamps have a resolution of one second.
Microsoft has a SQL Server Migration Assistant but, naturally, it is designed to help users move in the other direction.
You may want to check out this whitepaper from the MySQL site (you'll need to register - I did not, so I don't know how valuable the paper will be compared to the knowledge you already possess):
http://www.mysql.com/why-mysql/white-papers/mysql_wp_mssql2mysql.php
There are also some products and guides that can be found with a fairly simple search, e.g.
http://www.spectralcore.com/fullconvert/tutorials/convert-mssql-sql-server-to-mysql.php
http://www.haidongji.com/2009/02/23/moving-data-from-sql-server-to-mysql/
I don't know that the ASP.NET Membership can be ported directly to MySQL but I am confident you could replicate its functionality (it is more a question of how much effort it will take, not whether or not it is possible).

Can someone explain the concept of MySQL to me? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
First and foremost, I do understand that MySQL is used for databases, and can be used to update content on a website. What I don't understand is how you actually are able to get MySQl to change the content on a site automatically, or if it is even possible. I really am a beginner so sorry if this question comes comes as noobish. I really don't understand the concept of MYSQL all that much, as I don't understand how websites are able to change the content on their main page daily using MYSQL, Now what I am saying is, if I were to have a website with new information every single day on the main page, and used Mysql as a database, would it be possible to upload for example 7 html files one for each day of the week,to the database, and have each of them displayed on different days, automatically? (This is all a presumption as I don't know how to get the data into a mySql database and if you upload a html file to the database) Sorry for the confusing question and thanks in advance for all the help.
As you mentioned, MySQL is just a database. You could in theory use Oracle or SQL Server or PostgreSQL, which are all MySQL's "competitors", if you will, in the database space.
What's generally done is that there is a program that sits alongside the web server on the box that reads the content from the database and then translates that content into HTML, where it's served up to you as a web page. This program is usually referred to as a Content Management System or "CMS" (You might want to Wikipedia for "Drupal", which is one popular CMS out there).
Web pages are rarely stored as whole HTML files in MySQL. Usually what's done is that the content (paragraphs of text, comments on a blog, upvotes and downvotes) are stored in some structured format, and the CMS takes that structured data from the database and presents it to you. The upshot of structuring the data in this way is that end-users who want to update content don't have to worry about coding the HTML -- they just write their content and the CMS takes care of the presentation bits.
MySQL is a database server, and doesn't have any web-related functionality built in. It's just a place to store data (though it's very good at that - it, and other relational database management systems like SQL Server and Oracle, attempt to optimize data storage and retrieval).
There's a layer between the database and the web server that you're missing - the web application framework. That's where your logic goes. If you want to display different data based on the day of the week, you'd program that in your web application:
// ludicrously simplified
if (Date.DayOfWeek = Friday)
Output "<html>TGIF!</html>"
PHP and ASP.NET are the best known languages for this kind of development.
There are a number of frameworks out there that simplify certain tasks. You can write HTML more or less directly from your code, using the languages above and the right runtimes (the ASP.NET runtime comes with Microsoft's IIS web server, and Zend is popular for PHP). Or with the right tools, you can specify the content each user sees at a very high level.
You can have some code/algorithm to rotate the news (articles) in your home page. Those articles can be inserted/stored into your MySQL database.
What I mean by rotate is that for each day a given article is retrieved from the database and shown on your homepage.
The articles can be inserted by hand on a given table in your MySQL database or they can be inserted using some kind of front end (a user form) for that purpose.
For a complete overview of MySQL, this page on Wikipedia is a good hit.
I don't know if the other answers have helped you understand, so I'll add a very simplistic answer that I hope will get you over the initial bump.
MySQL will act as an online storage space for you, but it won't provide the website.
In between MySql and the website, there will need to be a program of some sort.
There are many, many different languages and frameworks available to do this, and it's essentially the entire business of web developers to create these programs.
In your particular case, you asked about uploading different pages to MySql and having them displayed for each day of the week.
You wouldn't need to use MySQL or a database at all for this, a few lines of code in most common languages would do this for you, and adding a database would simply add complexity where it wasn't needed.