XSD to SQL Server conversion - sql

I have a question in regards to the SQLXML for SQL Server.
My assignment is to convert an XSD file so that it magically "becomes" tables in the SQL Server database. I've looked around everywhere, on all the links I could possibly find, but nothing clicks. Everything is like a half-step of what I need to achieve.
I am not too familiar with Visual Studio, haven't done much else than running database queries and all the stuff one likes to do in a SQL Server database. Except for XML.
I figured that SQLXML from Microsoft's MSDN would be a good tool to have (and I believe it's already installed).
Any tips or solutions?
Thanks.

There's no magic involved, and as it's homework/study I won't detail how to do it myself, but if you direct your research towards SQL's Bulk Load functionality it would seem to be what you need.
Read this article for a brief "how to" guide.
Or this article for a detailed description of how to use it.

You can convert XSD to SQL using this approach https://github.com/ujhgj/xsd2sql
But I'm not sure of SQL dialect. That thing worked for Mysql.

Related

Decompress gziped field with tsql prior 2016 features

How can you decompress an sql server field with nothing but tsql queries?
Assumptions:
The field was compressed using GZIP from an application.
The field is a varbinary(max).
MSSQL version is less than 2016, meaning you can't use decompress function.
I don't think this is possible, I tried searching on google and found nothing. I'd like to have confirmation on this.
I think your best bet is to look into a CLR solution. CLR functions are written in C# and then can be executed in a standard SQL call. There are loads of examples on the internet of CLR functions.
My answer assumes you have purely SQL Server and not a solution like SSIS or alike installed.
Here's a link for basic example. You'll load a library that handles gzips. Lots of solution directions here.
https://www.skylinetechnologies.com/Blog/Skyline-Blog/March-2013/CLR-Functions-in-SQL-Server-A-Tutorial

SQL server stored procedures documentation

Does anyone know where I can get SQL server documentation pertaining to writing stored procedures (SQL Server 2008 R2)?
I Tried browsing SQL Server 2000 Books Online but find it very hard to use with links scattered all over the place.
I am particularly interested with built in functions (T-SQL), that includes examples, maybe in a pdf form also ?
Here is a list of built-in functions on MSDN. Get used to using MSDN; it's a great reference but you have to learn its quirks.
Here is a good article about stored procedures, i guess it will give you some useful info.

PostgreSQL visual interface similar to phpMyAdmin?

I'd like to view and possibly edit tables for PostgreSQL visually like phpMyAdmin, where you can see the list of tables, and fields and individual rows for a table. Is there any utility that can do this?
Forgive me if this is actually possible in pgAdmin III, but I couldn't figure out any way to see tables visually in pgAdmin. I have PostgreSQL 8.4 (I actually didn't install it myself, it was installed by another piece of software that utilizes it)
phpPgAdmin might work for you, if you're already familiar with phpMyAdmin.
Please note that development of phpPgAdmin has moved to github per this notice but the SourceForge link above is for historical / documentation purposes.
But really there are dozens of tools that can do this.
I would also highly recommend Adminer - http://www.adminer.org/
It is much faster than phpMyAdmin, does less funky iframe stuff, and supports both MySQL and PostgreSQL.
pgAdmin 4 is a powerful and popular web-based database management tool for PostgreSQL - http://www.pgadmin.org/
Azure Data Studio with Postgres addin is the tool of choice to manage postgres databases for me. Check it out.
https://learn.microsoft.com/en-us/sql/azure-data-studio/quickstart-postgres?view=sql-server-ver15

Why should I upgrade from SQL2000 to SQL2005?

I'm looking for the single biggest reason you are glad that you've already made the jump from SQL2000 to SQL2005.
Recursion without creating temporary tables.
Native Exception support (Try/Catch instead of if #Error goto)
Because:
Microsoft would like to remind customers that support for SQL Server 2000 Service Pack 3a (SP3a) will end on July 10, 2007.
Native XML support is big for us here.
SSIS support. Blows DTS away and is quite handy. :)
SSRS - A really huge advantage for my organization is having the free reporting tools that come with SQL Server 2005. Reporting Services allows me to produce nice looking reports that have exactly the fields that our managers need in very little time. It has a built in tool so they can convert to excel, pdf, or several other formats. Lots of value here.
SSIS - Integration services in 2005 is very powerful for ETL (export, transform, load) functions. You can set up automated processes to run on a schedule.
SSAS - Analysis services looks promising. I have not made any data cubes yet because I want to organize an actual data warehouse. Once you have that, robust data mining algorithms are already built in.
Take a look at these three tools that are included with SQL Server 2005. If i had to pick one as the single biggest reason to move to 2005, it would be SSRS.
At this point, I would suggest looking at SQL Server 2008.
Pagination without (manually) creating temporary tables is a basic, but huge improvement.
However, if you are then going to drag & drop some GridViews in your ASP.NET app directly from the data table, you'd be paging in the app...
CLR integration
Row Versioning-Based Transaction Isolation
I think the single biggest reason is that SQL 2000 is not supported on Vista. I had to move to SQL 2005 because of that.
I don't know if it's just me, but Linq2SQL doesn't exactly work perfectly with SQL 2000. Ordinarily its supposed to automatically generate and populate child collections based on inferences from your schema's keys, foreign keys, RI, etc. Works fine in 2005 but i haven't had much luck in 2000.
Common Table Expressions have proven incredibly useful.
Exception handling... how did we ever manage on SQL 2000...?
PIVOT. That beautiful little statement has saved me more time then any other SQL Server 2005 enhancement.
YOU CAN'T EXPORT TABLES with a "right click" anymore. This is more of a problem than a good reason.
Dynamic Management Views
for Optimisation and to quickly find out the state of the server.

MySQL tools which ease creation of SQL JOIN statements?

Does anyone know tools which look at a MySQL database, show you all the tables graphically and allow you to create complicated JOIN statements via drag-and-drop?
Before you buy anything, see if the free, official MySQL's GUI tools (specifically the MySQL Query Browser) will work for you.
Personally, I'm fairly comfortable interacting with MySQL's command line interface and haven't used their GUI tools very much, but I just downloaded Query Browser and it seems like it does exactly what you're looking for.
Also, check out "Building Queries Visually in MySQL Query Browser" for a nice tour of MySQL Query Browser.
As an update, the MySQL Tools collection is no longer supported, and has been replaced by MySQL Workbench. The documentation can be found here: http://dev.mysql.com/doc/workbench/en/index.html and you can download it here: http://dev.mysql.com/downloads/workbench/
Edit: stumbled across this today too, a good beginner tutorial for mysql workbench -> http://net.tutsplus.com/tutorials/databases/visual-database-creation-with-mysql-workbench/
EMS SQL Manager for MySQL has query constructor. Can't recall about joins, but they should be supported.