SQL Server is a relational database management system from Microsoft.

learn more… | top users | synonyms (1)

97
votes
23answers
56k 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 ...
30
votes
2answers
28k 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 ...
22
votes
2answers
2k views

NoSQL within SQL Server

This question is not about the difference between SQL and NoSQL. I am looking for some rationale for something that really does not make sense to me at the moment (maybe because of my lack of ...
18
votes
3answers
52k 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 ...
14
votes
5answers
5k 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 ...
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
7answers
639 views

500 databases or 1 database with 500 tables or just 1 table with all the records? [duplicate]

I currently have an application that is used by a single end customer. For ease of discussion assume the application only needs a single database table for all records. I now need to support ...
11
votes
9answers
6k 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 ...
10
votes
3answers
2k 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 ...
9
votes
6answers
12k views

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

When should I use the XML data type in Microsoft SQL Server?
9
votes
3answers
527 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
10answers
3k 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 ...
8
votes
4answers
558 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 ...
8
votes
2answers
4k 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 ...
7
votes
4answers
27k 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 ...
7
votes
3answers
574 views

Enterprise software: Where should the code go? [duplicate]

I recently went for an interview with a software company that claims to write enterprise level software. During the interview, the interviewer remarked that its better to use the database simply to ...
7
votes
6answers
354 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
2answers
7k 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 ...
7
votes
3answers
970 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
340 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
223 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
912 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
394 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
6answers
3k 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
4answers
2k 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
3answers
3k 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
4answers
8k 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 ...
6
votes
4answers
2k 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 ...
6
votes
5answers
659 views

Visual Studio 2010 SP1 Performance [closed]

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 ...
5
votes
8answers
7k 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 ...
5
votes
5answers
802 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
277 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
736 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
1k 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
446 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
460 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
106 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
143 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
942 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
5answers
4k views

Should I store images in my database or file system in this application? [duplicate]

I'm using ASP.NET MVC 4 and SQL Server 2012. I have no problem going for either of these solutions but I want to know which one would fit better in the particular application I'm creating now. I'm ...
4
votes
3answers
8k 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 : ...
4
votes
3answers
3k 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 ...
4
votes
3answers
10k 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 ...
4
votes
4answers
6k views

Best practices for connecting from ASP.NET to SQL Server? [closed]

There are several different ways to connect to SQL Server from an ASP.NET application. I'm working on rebuilding an ASP.NET / SQL Server environment right now and I'm trying to figure out which ...
4
votes
2answers
491 views

Entity Framework with no direct table access

There are some similar questions I've found here, but none of them fully answer the question I'm asking. Similar questions: here and here In my company, I develop C# .NET applications and our Server ...
4
votes
1answer
445 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
4answers
1k views

Database is performing slow, even all the tables are having normalization

An interviewer asked me this question: Tables are created with appropriate normalization rules, However the database is performing slow. [Ie.: The select, insert statements are taking time to do ...
3
votes
5answers
627 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 ...