SQL Server is a relational database management system from Microsoft.

learn more… | top users | synonyms (1)

67
votes
22answers
28k views

Stored Procedures a bad practice at one of worlds largest IT software consulting firms?

I'm working at a project in one of the world's top 3 IT consulting firms, and was told by a DBA that company best practice's state stored procedures are not a "best practice". This is so contrary to ...
14
votes
2answers
10k views

Creating database connections - Do it once or for each query?

At the moment I create a database connection when my web page is first loaded. I then process the page and run any queries against that conection. Is this the best way to do it or should I be creating ...
13
votes
13answers
1k views

Do SQL Devs create SQL queries using SQL Query Designers?

I was just curious if SQL Devs write their code freehand or do they make use of the visual query designer to generate queries? In the majority of the cases, the query designer can create most of ...
12
votes
3answers
20k views

Why do we need to put N before strings in Microsoft SQL Server?

I'm learning T-SQL. From the examples I've seen, to insert text in a varchar() cell, I can write just the string to insert, but for nvarchar() cells, every example prefix the strings with the letter ...
12
votes
5answers
3k views

Version Control with SQL Server

I'm starting a new project and using SVN (with Tortoise) as my Version Control System. I was wondering if it was possible to also maintain a SQL Server Database using the same system. I'd want to ...
10
votes
9answers
3k views

Foreign key restrictions -> yes or no?

I would like to hear some”real life experience” suggestions if foreign key restrictions are good or bad thing to enforce in DB. I would kindly ask students/beginners to refrain from jumping and ...
9
votes
7answers
3k views

What is the preferred tool/approach to putting a SQL Server database under source control?

I've evaluated RedGate SQL Source Control tool (http://www.red-gate.com/products/sql-development/sql-source-control/), and I believe that Team Foundation Server 2010 offers a way to do this as well ...
8
votes
6answers
9k views

When should I use the XML data type in SQL Server?

When should I use the XML data type in Microsoft SQL Server?
8
votes
3answers
426 views

How do you handle constantly changing database dimensions?

For the last two months or so I have been looking for solutions or practices to handle release management within databases. I'm looking for what people view as the best process for handling this. We ...
8
votes
3answers
1k views

Using Sql Server Change Data Capture with a frequently changing schema

We are looking into enabling Sql Server Change Data Capture for a new subsystem we are building. It's not really because we need it, but we are being pushed for having a complete history ...
7
votes
10answers
2k views

Do Microsoft Certifications matter? [duplicate]

Possible Duplicate: Are certifications worth it? I'm curious what experience others have had, both from the perspective of an employer and an employee on Microsoft Certifications. I'm kind ...
7
votes
4answers
453 views

What exactly does it mean that storing “large blobs in the database reduces performance”?

To someone who knows database internals this may be an easy question, but can someone explain in a clear way why storing large blobs (say 400 MB movies) in the database is supposed to decrease ...
7
votes
4answers
299 views

How best to handle database refactoring within a team?

We are currently usign a roll-forward approach to DB changes, akin to Migrations, where each developer creates and checks in a script that promotes the latest version of the DB to a new state. ...
7
votes
5answers
634 views

Visual Studio 2010 SP1 Performance

I've noticed since installing Visual Studio 2010 SP1 that I'm having huge performance issues. It will randomly freeze up on me quite a bit. I had no performance issues with Visual Studio 2010 before ...
7
votes
3answers
729 views

Can anyone recommend coding standards for TSQL?

We've long had coding standards for our .Net code, and there seem to be several reputable sources for ideas on how to apply them which evolve over time. I'd like to be able to put together some ...
7
votes
3answers
318 views

Using a standard localised data cryptography pattern with an ASP.NET MVC3 application

I have been given the task to rejuvenate an existing Human Resources application from Access into ASP.NET. This is a strictly internal application, and I have no problems developing it within our ...
7
votes
1answer
130 views

Securely sending data from shared hosted PHP script to local MSSQL

I'm trying to add data from a webhook (from a web cart) to a local Microsoft SQL Server. It seems like the best route for me is to use a PHP script to listen for new data (POST as json), parse it, ...
7
votes
1answer
568 views

Are there tools that do automated validation of database standards?

I'm looking for something akin to FxCop, but for databases. Basically, I want to have a tool where I configure my database standards (naming conventions, field types, or more complex custom rules). ...
6
votes
5answers
375 views

Anti Identity Column

I recently came across some code which generates an identity value for a key: DECLARE @ID INT; SELECT @ID = MAX(ID) + 1 FROM Person; INSERT INTO [Person] ([ID], [FirstName], [LastName]) VALUES ...
6
votes
6answers
2k views

How do I make my ASP.NET application take an action based on time?

I have an ASP.NET MVC4 application. Suppose that I wanted to execute some code (such as emailing a user) 2 days after a user has signed up. One way is to have code executed on every request which ...
6
votes
4answers
18k views

Best practice to query data from MS SQL Server in C Sharp?

What is the best way to query data from a MS SQL Server in C Sharp? I know that it is not good practice to have an SQL query in the code. Is the best way to create a stored procedure and call it ...
6
votes
4answers
1k views

Should I Do Calculations in T-SQL or Program?

I am creating a stored procedure that is logging some data. The data ultimately needs to end up in 2 tables. The incoming data is coming from a JSON string containing 15 parameters, and the data is ...
6
votes
6answers
2k views

Is it recommended to use SQL Server as database for massively scalable applications?

Let's say you are planning to create a website of the scale of Facebook (If I am going to cite a website's name then why not Facebook?!). Is it recommended to use SQL Server as your database for such ...
6
votes
2answers
1k views

Best method to implement a filtered search

I would like to ask you, your opinion when it comes to implement a filtered search form. Let's imagine the following case: 1 Big table with lots of columns It might be important to say that this SQL ...
6
votes
3answers
2k views

Are there any special advantages of SQL Server with Visual Studio?

I have seen the forum dba.StackExchange, but this question involves Visual Studio as well, therefore I wanted to post this question here. One of my old application was built on VS-2008 and MySQL ...
6
votes
2answers
4k views

Can SQL Server and Mongo be used together?

We have a large news-oriented site that has high web traffic. The architecture is your often seen DB - Repo Layer - Services Layer - Asp.Net MVC. The problem that we've been seeing is around read ...
6
votes
4answers
1k views

Should “tags” be an nvarchar field in a table, or should it be another table altogether?

I am building a photography website and I want to allow the user to put tags on their photos for easy searching. But I'm not sure if I want the tags to be an nvarchar field in each picture and then ...
5
votes
5answers
728 views

Is realtime validation of username good or bad?

I have a simple form for the user to sign up to my site; with email, username and password fields. We are now trying to implement an ajax validation so the user doesn't have to post the form to find ...
5
votes
4answers
237 views

Putting audit functionality into the database

Our database does not have any audit functionality. It does not records who inserts the record or who who changes it It does not keep a history of the changes made Nothing can be restored if ...
5
votes
4answers
4k views

Better way of storing key-value pairs in the database?

I have a C#/SQL Server program that sometimes needs to store data. The data could be a response from a web service, a result of a database query, or any number of other things. There's no way of ...
5
votes
4answers
514 views

Architecture suggestions on a multi-project multi-database 'intranet'

Here is the situation I have inherited: We have approximately 10 websites (Asp.net web forms) that each have their own database. Each of these databases houses some site specific data, and each has ...
5
votes
3answers
655 views

Overloaded high transaction SQL Server database Solutions

The current sql server database is overloaded and many transactions are failing. The powers that be have a proposed solution to build a separate database to handle/store transactions and then ...
5
votes
4answers
324 views

Multiuser System With Encrypted Database

I am currently developing a hosted solution in ASP.NET using MVC3 and Entity Framework. This product will then be made available to a number of clients as a hosted solution. As the data stored by ...
5
votes
1answer
1k views

Designing a scalable and robust retry mechanism

Backstory I have an Messaging Server Application that is responsible for brokering/proxying calls made from an Application Tier to numerous external services. The purpose of this application is to ...
5
votes
2answers
159 views

Deploying Database Schema changes in a patching process [duplicate]

I am facing a conceptual development methodology problem that I was hoping you could help me with. Firstly, a little bit of background. Background The project I am developing is a niche application ...
5
votes
2answers
96 views

Tracking changes to posts

I'm currently in the process of writing a support ticket system... Let's say it's a small forum application, or something like Uservoice. Now I want my users to be able to edit their tickets, but ...
5
votes
2answers
140 views

Centralised Integration framework

We are looking to centralise our Integration in our company and I'm wondering what sort of solutions other have for this and what the best way to approach it would be. At the moment we have different ...
4
votes
2answers
384 views

How deeply programmer should know about internals of database engine? [closed]

I am learning SQL Server 2012 along with C#. In the past, I took database class in college, and have good grasp on SQL language and can write queries. However, looking at SQL Server documentation (or ...
4
votes
8answers
4k views

Alternative for Access+SQL Server for enterprise projects [closed]

We're a small software company, developing projects for manufacturing facilities about analysis, traceability, reporting etc. We're using Access for front end, SQL Server for back end. We've quite big ...
4
votes
3answers
2k views

What are the open source options for a Bug tracker on IIS 7 & SQL Server 2008? [closed]

What are the open source options for a Bug tracker on IIS 7 & SQL Server 2008? Currently we're running a Windows Server 2008 with IIS 7, Coldfusion 8 & SQL Server 2008. What are the best ...
4
votes
1answer
297 views

Algorithm to denormalize database

I have built a QlikView script generator (QVS), that can be used to generate large script files for data imports from SQL Server to QlikView. QlikView does not like 'fully' normalised database ...
3
votes
5answers
555 views

How do you keep track of the meaning of your SQL fields?

The more SQL fields I add to my tables and the more primary/foreign keys I add the more I lose the overview for specific fields for certain scenarios like Get/Add/Delete/Update data. I use SQL ...
3
votes
3answers
2k views

How to reach to the advanced level in SQL? [closed]

I think I have a good grasp of SQL and the most features it has, but sometimes when I've done some more advanced Reporting Services a fellow developer has helped me with some stuff and when I open ...
3
votes
3answers
6k views

Which is better : Storing/retrieving images on/from SQL server or in a directory on server

I am working on a project in Asp.net MVC and need to work with images. There is an SQL database with a Product table. Every product in the table will have it's own image. I have two ways to do this : ...
3
votes
6answers
809 views

How to include database changes during application publish

I am maintaining a WinForms application, which talks to a SQL Server database. Sometimes I have to change database schema (for example to alter a sql procedure or add new one). For this purpose I have ...
3
votes
5answers
372 views

New application development - Use existing database or create a new one?

A Client has a huge Windows Application running on a Database. This client wants you to develop an "Express" version of this application, including only, let's say, 20% of its features. This Express ...
3
votes
1answer
1k views

JOIN vs. INNER JOIN and FULL OUTER JOIN

I know there is a difference between INNER JOIN and FULL OUTER JOIN, I can see it, but, what is the difference between the two following: JOIN ... ON... and INNER JOIN...ON... and still yet ...
3
votes
3answers
4k views

Best practice for storing HTML coming from text fields to a database?

I have an application that allows users to edit certain parts of text and then email that out. My question is what is the best way to store this in a Microsoft SQL Server database. Right now I have ...
3
votes
1answer
140 views

Database Design - Optimise Relationships

I am about to embark on a redesign of an application, one where querying the database is particularly annoying. I intend to redesign the database as much as possible but the data shape cannot change ...
3
votes
3answers
390 views

Why should I add CHECK CONSTRAINT?

Following is a table creating script created by Entity Framework using the model shown in http://codereview.stackexchange.com/questions/14077/is-it-proper-tpt-inheritance. In this script, there are ...