learning how to write complex stored procedures [closed] - sql

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
i'm looking for good books and tutorials
about writing complex stored procedures along with common tricks and best practices
commonly used by DBAs.
all i usually find is the basic SQL Statement tutorials ,
what i need are some good examples of Complex Data Selection
along with common tricks of how to correctly and efficiently filter data
for selection between multiple tables .
i release this is hard to find , because Complex DB's are usually built
only in large projects and not for tutorials , but for the least i would like to find commonly used method applied by DBAs
thanks in advance.

You can use below site for download Ebook about SQL server complex stored procedure :
1- COMPLEX STORED PROCEDURE IN SQL
2- STORED PROCEDURES
3- Google Ebook

There are lots of site but I find This site is very helpful for my SQL Server learning. It is very informative site for database developers. If you want to read books then probably you can pick on from Microsoft press.

You should look at The Guru's Guide To Transact SQL by Ken Henderson, a bit old, but probably still the best book about T-SQL :)

Related

User friendly SQL query program? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I doubt this could exist, but crazier things do. Is there a program or place where I could enter in just the tables/columns, and some criteria options and it will generate a working SQL query code for me?
I know there are programs that will make the code look all nice, but I mean truly generate the code/joins/FROMS/etc.
Actually with Microsoft SQL Server Management Studio you have tools for everything.
You just need to learn the basics, but almost everything can be done with pre-made code for you.
You can create a table by just Right-Clicking on a database and select Create Table. From there you just have to fill the column names and the rows.
You can fill you rows with something similar without using the T-SQL language directly.
There are too many tools for me to list them all here but it is really User-Friendly.
I do recommend you go and learn SQL. It is really easy to learn the basics and so useful.
If you really want a software that generates the code for you you can google SQL Genetator.
I found this. Although I don't recommend using a code generator.
As everyone already commented, SQL Server Management Studio (SSMS) is your tool to go. But I guess you are asking for something that maybe requires a little bit less knowledge of the underlying tSQL language.
A sample could be MS SQL Code Factory I once recommended to some advanced user of a system I used to work and for him it was enough to do simple and some mid-adavanced queries.
But definitely you should aim to learn tSQL and then apply your knowledge together with a tool like SSMS to create all the queries you need, there is "almost" no limit on what you can achieve, and it is fun too as #Polynomial stated

Which database? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I'm a java developer, currently starting developing a hospital management system that will server patients, doctors, accountant, .... etc the system is really huge that may have 900,000 records/day, data is really growing so fast, for that i'm confusing in which database to use since i have the following options: (Percona Server(Mysql), Oracle, SQLServer), since the application will run on network with average of 45 online users.
I hope to find a good answers here.
Thanks in advance
If you have been working with MySQL for 6 years then stick with it!
You don't want to add the burden of learning another database as well as having to develop your application.
If you are unsure if MySQL is up to the job then run some tests. Write an app that runs multiple threads inserting 1M rows and see if your servers can handle it.
I'm guessing the brand of the database you choose will be less important than the performance of the platform (machines) it is running on.
There is no good or bad answer to this question. Basically it is as good as the DBA knowns to manage it.
If asking this question it would be wise to group a team of people well known with various systems to find out the best practice. To answer such a case, even more with very sensitive data, it is not just a simple solution which will do the trick. A thorough process of decision making is very important. Not only from a technical but also from a security and business side.
As per as think your database is large you can go with oracle.but the decision also depends on the expertise of people working with you and availability of resources.

SQL abstractions [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
Why do some frameworks (like CakePHP, Kohana, Zend, Django, less - Rails) create some kind of SQL abstractions instead of a raw SQL database access? E.g. why do we need to make some perversions instead of a usual queries?
UPD: are there any SQL-injection reasons of this purpose?
Basically a good abstraction layer makes it easier for the developer to use a database, and not care what what and which kind of database he is connecting to, thus speeding up the development process.
Check out http://en.wikipedia.org/wiki/Database_abstraction_layer, the most common pros and cons are listed here.
Thats called abstraction. Usually its done to be db specific indipendent.
Sql will be built based on the db type of the connection..
There are two main reasons.
Database Indepence
The code can be applied to different databases. MySQL, MS SQL-SERVER, ORACLE. And with a little wrangling to other DBs using OBDC like MSAccess, or CSV files.
Separation of Database Code with Business Logic
Most frameworks follow this model: http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller
It's primarily an attempt to reduce what's known as the impedance mismatch between the relational storage of the database and the domain model within your application. Without the ORM you often find yourself writing "left hand right hand" code modelobject.property = reader["field] where you're mapping values from the storage format you've received from the database into your model.
In summary, hopefully the ORM allows you to concentrate on solving the business problems without having to worry about all of the plumbing. We're not there yet but we're getting close.

Where should rookie go for best SQL tutorial resources? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I´m interested in both web resources and books. It´s a jungle out there, please give me a hand.
My goal is to learn the SQL language so I can query Sql Server databases within a couple of weeks.
I´ve got a programming background, and I know some basic stuff about relational databases, but almost nothing on how to use the SQL language.
Thanks to you ALL for all good tips! I will save this page as a starting point in my mission to learn SQL. Sadly enough it´s not possible to set more than one answer as "accepted"...
I don't normally go for the ' ... in 21 days' books but this online one seems reasonable: Teach Yourself SQL in 21 Days, Second Edition.
See Where can I find training/tutorials for SQL and T-SQL?
one of my favorite websites to get started with SQL is : SQLCourse
Good luck for your starting
This (w3schools) is always a nice place to start.
Try SQL Exercises
Perhaps You need to begin your own project, It is always recommended when learning something new that you fight with real problems.
http://www.databasejournal.com/ is one of good recurses,

some microsoft products and XML on an interview [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
here's the job description:
Experience with data mapping/extracts tools such as Monarch and VorteXML.
Familiarity with XML documents and schemas.
Minimum 1-3 years of data analysis in SQL Server environment.
Working knowledge of TSQL and SQL Server 2000 tools such as Enterprise Manager, SQL Query Analyzer, Profiler, DTS and BCP.
Working knowledge of SQL Server Reporting Services design and administration.
BSCS or other technical degree.
Healthcare background strongly preferred.
Strong organizational and communication skills.
Strong analytical thinking, troubleshooting and ability to manage multiple, concurrent projects.
Ability to meet deadlines while working in a fast-paced environment.
what is an XML schema? ive extracted data programmatically from XML files, but i dont understand what they mean by schema?
data analysis in SQL server environment - does this just mean knowing how to do joins and select statements?
SSRS (design and administration) - can someone please get me started on some basic tutorials where i can learn this?
what is Monarch and VorteXML and where can i learn the applications?
If you don't know those technologies and what they're talking about, you probably shouldn't be applying. The same goes for any job, whether or not it's in the IT field.
Are you just planning to answer the questions and then spend about two weeks stressing your nut off once you get the job. W3Schools will give you a start with schema (.xsd files). Sql server documentation will help you with the rest (patterns and practices on microsoft site is a good read).
You've got to understand that the interviewer probably has some ideas about the answers they want to hear too.
Good luck :)