Questions tagged [sql-server]

SQL Server is a relational database management system from Microsoft.

Filter by
Sorted by
Tagged with
6
votes
2answers
227 views

Relational integrity without relations

I have about 15 years software engineering experience, writing business software with relational databases. Mainly SQL Server and Oracle. I've always been of the opinion that you should define ...
1
vote
1answer
74 views

Hashing from within the database or outside?

I am in the process of evolving architecture for an 'equity analysis system'. I will be using SQLServer as the database, but I am not going the .NET route and won't be using the built-in 'membership' ...
1
vote
0answers
27 views

How to create and store many statistics in SQL Server for Reporting Purposes

I have a C# Program that creats PowerPoint reports filled with statistics of a chosen (by the project manager who operates with the tool) company (each one has a companyID). The statistics are ...
-1
votes
1answer
36 views

MSSQL client server architecture

BASIC QUESTION: We have a small application that uses a MSSQL database to save data. We want to use Windows-Authentification to allow each client (15 in total) to connect to the database to write/read ...
4
votes
2answers
505 views

Is using spacing effectively equivalent to the long method code smell?

There's a common code smell involving long methods with the most common answer being that methods should be really small, less than 50 lines per say (or 20). I understand why this is because it ...
1
vote
3answers
108 views

How to make a data warehouse of a single full Database?

After learning about the data warehouse concepts whole day, I couldn't found a source that can actually say when you should not do data warehousing. In most tutorials I read, it says that DW is for ...
0
votes
0answers
34 views

Creating webhooks for a third-party application

First post here on Software Engineering, so I hope I don't goof up too much. I am writing software that integrates with an application written by a company that has a small development team. I have ...
4
votes
1answer
234 views

How to set up a sql database to cater for user records, group records and default records?

Outline I have an application that loads data from a database. I'm not talking about client data here though, I'm talking about application configuration. The database will therefore come with some ...
3
votes
1answer
284 views

Using Active Directory ObjectSid as Primary Key in SQL Server for Data Access via ASP.NET MVC

I am designing an Intranet employee reward web app using ASP.NET MVC C#/MS SQL Server. This will only be accessed from within the network. Employees and managers will be able to give a reward to ...
27
votes
1answer
50k 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 JOIN...ON.....
1
vote
1answer
92 views

Queue management project - Recommendations

I would like to develop a Patient Queue management system with online booking. In this case there are options to generate queue tokens for various departments. For example dept A will have tokens ...
3
votes
4answers
204 views

How to Handle Item Prices Change for Reporting

I am building a Point of sales software with Sql Server 2008-R2. I am now confused about how to handle multiple items with prices change. Let us say price of Pepsi is $2.0 on 10-09-2019 but today it'...
106
votes
3answers
135k 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 ...
1
vote
2answers
160 views

Querying Active Directory from SQL Server

We always used C# to query Active Directory, recently we need to add a patch to some code and it would be easier for us to query Active Directory straight from SQL DB as then we won't need to make ...
1
vote
1answer
53 views

Propagating MDS Data - SQL Service Broker or SignalR?

Hopefully, this is the right forum for this type of question.. We have a set of common entities which are 'shared' throughout the company - much like Master Data Services (MDS) data. Everyone has ...
0
votes
4answers
352 views

How to do versioning for stored procedure?

Is there any way to create versioning for stored procedures? I have created an API which fetches data from a database using stored procedures. This API is being consumed from a mobile app. I released ...
3
votes
1answer
112 views

How to Design for Monthly Database Refreshes?

I get a database every month with the prior month's data in it. There are three types of data: flag settings, demographic and transactional. I need to import the data into my standing database. ...
1
vote
2answers
101 views

How to keep track of db tables used in various apps [closed]

I have N applications using ORM, SQL-statements and stored procedures to access M tables from an MSSQL Server 2017. There are some shared tables that are used by various apps. Let's say I am forced to ...
1
vote
2answers
185 views

How should I handle Stored Procedure parameters that need to be the same length as a column?

I'm writing a lot of stored procedures for a SQL Server database that take an id or code that is a CHAR instead of an INT. Most of these haven't changed size in a long time, but when a customer wants ...
3
votes
1answer
897 views

Is a series of OR or a single IN SQL statement better?

I'm using MS SQL 2008 R2. I have been using a series of OR and have an issue where my app periodically give the following error: Exception message: Timeout expired. The timeout period elapsed prior ...
1
vote
1answer
96 views

Database Design - Hierarchical Structure [closed]

1 We are trying to redesign a database that currently holds thousands of parameters for different datatypes and currently has a flat data structure. We generate XML files from the database, which ...
7
votes
5answers
2k views

Write data to SQL Server directly from BizTalk or use external service?

An external source will be sending us XML data that BizTalk will pick up and transform into an internal schema. We need this data to be loaded into a SQL Server database as we're going to expose some ...
-1
votes
3answers
113 views

How should I manage SQL Server logins for a desktop application?

I'm looking for a bit of guidance or someone to point me in the right direction. I have a C# WPF desktop application which accesses a local SQL Server Express database. The application is on a single ...
0
votes
0answers
48 views

How to pass data from Java to display in SSRS?

I have a Java application that uses an 3rd party Java library to get data remotely. Specifically, a start date, end date and a few other search parameters can be passed to a library call and it will ...
1
vote
2answers
120 views

Downloading and appending data from AWS S3 whilst avoiding clashes

I have to upload a TSV file to an S3 bucket, the content is form submission data. Another service will consume and do things with this data as soon as possible. The service would like one large file ...
0
votes
1answer
58 views

Using a db as part of CI

I am designing a CI system where I need to leverage a database as part of the software build process for integration tests. Different developers on different branches of the same repo will want to run ...
0
votes
1answer
61 views

Bridge/Join Table for a Many to Many Relationship between One Table and Multiple Others

Background I have a relational database an I want to have a table that contains flags. I want multiple tables in my database to have a many to many relationship with the flag table. Options I ...
0
votes
1answer
47 views

Venue Reservation System Logic Approach/Clarification

I hope this is the right place to ask since this is a programming related question. I’m developing a venue reservation app (similar to booking.com) and am almost done however I have 1 request for ...
0
votes
2answers
273 views

Best way to match timezone with time offset?

I have a c# solution which uses mssql database to store data. In my database there is a big table of entities (e.g. accounts) for each of which the TimezoneId field is defined. This field is filled ...
0
votes
0answers
113 views

Real-time application and RDBMS bottleneck

I'm currently developing a real-time application using .NET Core 2.2. Many IOT devices (could be up to 100) are concurrently sending messages via MQTT. These messages are parsed, elaborated to extract ...
2
votes
4answers
1k views

Is Entity Framework Core slower than using ADO .NET and stored procedures?

I'm looking at designing some new software for work, and I have been using EF Core quite a bit in my personal projects. In my mind, EF Core generates queries for the underlying data provider which ...
15
votes
7answers
21k views

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

When should I use the XML data type in Microsoft SQL Server?
0
votes
1answer
76 views

How to have SQL Server with Git, TeamCity and Octopus auto-deployment work with schema-level restrictions?

We are starting to integrate our SQL Server workflow with Git, by which I mean generating scripts for all objects and storing them in a Git repository so you can pull, edit, commit, push and apply, ...
0
votes
0answers
350 views

.NET WPF Best way to store a connection credential

I have an application that connects to SQL Server using windows credentials, which works very well for the domain paradigm. The client is now transitioning away from having a domain server, and is ...
1
vote
1answer
70 views

Multiple stored procedures or 1 with parameter

I need some advice... I started working at a financial business world recently. Looks like the DB architect uses auto generate function to create stored procs. At the end, we have way too many procs ...
1
vote
1answer
80 views

How to work with multiple databases efficiently (Development, Testing & Production)

Brief background I'm currently designing a COM DLL in .NET for use in MS Access by a few other developers. The Access application is hooked up to a SQL-Server & is supposed to just act as a front-...
0
votes
1answer
34 views

Updating a Bound Context in One Database From A Master Database

Let's say I have two domains: Customers and Jobs. Customers is responsible for knowing what customers a user has access to. Jobs is responsible for knowing what jobs a user has access to (by ...
2
votes
5answers
6k views

We are moving an Access based corporate front-end into a Web-based App [closed]

We have an enterprise application with a front end written in Microsoft Access 2003 that has evolved over the past 6 years. The back end data, and a fair amount of back-end logic is contained within ...
0
votes
3answers
164 views

Keeping objects in RAM vs more queries to the database

So this is my DataStructure: Project - Name - ID - Image - History - User - Comment When my application first starts it is pulling all projects with all details. obviously ...
1
vote
2answers
643 views

Socket Connection Data Insert

I have been working through a high-performance application where I have identified a bottleneck. The bottleneck is actually when the application must insert messages from a socket, it will record them ...
0
votes
2answers
3k views

Entity framework vs pure ado .net in calling stored procedure in an enterprise project

There is an enterprise project, which all the business implemented in databases and in the stored procedures, and web API is just like a light wrapper which get the request and deliver it to proper ...
0
votes
3answers
414 views

How can I interpret a SQL Check Constraint inside my C# .NET class libary?

I was given a more or less complex task. The goal is to interpret a SQL Check Constraint inside my C# .NET libary. In our case we have a simple UI that displays what is inside the database. We do not ...
0
votes
1answer
85 views

Benefits of placing error logs in a database by itself

I am working on a project where logs of all kinds (e.g. errors, warnings, etc.) are stored in a database table, in the same transactional database used for the other business purposes. It is a MSSQL ...
2
votes
1answer
57 views

Indexes on a SQL Server fact table

If I have a SQL Server fact table with four dimensions (OrderDate, Customer, Product, Region), my understanding is that it's best to create a non-clustered index per foreign key (dim key column in the ...
0
votes
0answers
29 views

Source control Sql Server multiple shards with minimal differences

One of the database systems I work with (I'll call it database A) was essentially sharded into 3 schema-identical copies. This was easy to source control, and when a change was made to any of the ...
-3
votes
1answer
42 views

Defer insert data into a database

I need to insert some records into a database at a time when it normally it's not being used, what are some approaches I can take? I have considered using the SQL Server Agent to run some stored ...
3
votes
1answer
116 views

Regulations about collecting data from software running at clients hardware (apps 'phoning home') [closed]

We develop an application which has now been installed on a few thousand customers sites. Unfortunately, we have no customer data collection built into the software. This is something we want to ...
1
vote
2answers
1k views

Single database call and iterate in memory vs multiple database calls and multiple smaller iterations

I'm designing a new application that is very basic however I expect it to grow and don't want to have to refactor down the line. My challenge is that in one method, I either need to retrieve thousands ...
34
votes
3answers
133k 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 N....
6
votes
6answers
4k 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 ...