Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [sql-server]

SQL Server is a relational database management system from Microsoft.

0
votes
0answers
30 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
1answer
28 views

what is the best appraoch to store files for our asp.net core web application (Blob, FileStream or File system)

I am build a new asp.net core MVC web application, the web application is a workflow based system which will be accessed by different users, as follow:- the workflow will have 10++ steps. Inside each ...
0
votes
1answer
42 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
49 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 ...
0
votes
1answer
60 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
76 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-...
2
votes
4answers
167 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 ...
0
votes
1answer
28 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 ...
0
votes
3answers
143 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 ...
0
votes
1answer
65 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
35 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
28 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 ...
0
votes
0answers
23 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
3answers
206 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 ...
-3
votes
1answer
37 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
114 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 ...
3
votes
1answer
147 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 ...
1
vote
2answers
372 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 ...
2
votes
3answers
1k views

Logical separation of database content

Background I have an application which stores a lot of entities in a classical relational database (Microsoft SQL Server) and I use an ORM (Entity Framework) to query data from it. This database has ...
0
votes
3answers
252 views

C# algorithm that can read special logical expressions

I have a need to implement a special logical operations algorithm. The task has been assigned to store the logical conditions in a database and have C# code read the information and select the ...
-1
votes
2answers
182 views

SQL Coding Naming convention: Variable same name as Columns

Is there a coding naming convention principal for SQL variables? Can variables be named the same as column names, I heard in different companies, this may cause confusion. However in C# below, its a ...
4
votes
2answers
310 views

Need to email customers once per year - best way to record this

We need to email our customers once per year (yes it's opt-in etc). As I see it we have 2 ways to record the fact we contacted them (so we know not to contact them for another year). A log, or a '...
-3
votes
2answers
3k views

What is the difference between end of support and end of life?

SQL Server 2008 reaches its "end of support" date next year: 7/9/2019 But it reaches end of life much later: 7/31/2023 link What is the difference? Is this terminology common to Microsoft, or to ...
0
votes
1answer
93 views

Database design: where to store a “current” or “selected” flag in a parent-child hierarchy [duplicate]

Sorry, maybe it's a well known design principle, but because I don't know a name for this kind of relation, I was not able to find any existing answer. So, let's say we have a parent which may have ...
1
vote
1answer
246 views

Strategies for managing legacy data for a medium sized enterprise

I work for a mid market manufacturing company with around 1700 internal employees and about 7000 external users (employees of our customers). We grew through acquisition which means we have many ...
-1
votes
2answers
667 views

Nullable foreign keys and creating join tables

I'm not that experienced in sql modeling and i'm looking for input on this because it's important for me to get it right. I use mssql and entityframework core in an asp.net core web app. The app ...
1
vote
1answer
63 views

Table design with Microsoft SQL Server

I was hoping to get some advice from you folks on my table design methodologies (specifically in MS SQL if that matters). Let me start by showing a couple of example tables that I might have in a ...
-2
votes
1answer
97 views

Correct terminology for a table which provides “dynamic columns”

A common pattern in database design is to append dynamic columns to a table with a design like so: create table MasterTable ( Id int not null primary key , Name nvarchar(64) not null unique ...
3
votes
2answers
415 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
1answer
137 views

Creating a web portal to access multiple databases (security and best practice?)

I am looking to create a website. There will be a portal, from which the user (and thier associated users) can create/access one or more databases. There will be many different databases in the ...
0
votes
1answer
51 views

Store nested object from .net to a SQL Server

I build an object in vb.net where I store data from JSON file that I get from a RESTApi. The object is nested and looks like this: Public Class FullData Public Property userID As ULong Public ...
0
votes
2answers
220 views

How to update MSSQL DB schema during deployment in HA enviroment without any downtime

I spend a lot of time trying to figure out what MSSQL provide to update MSSQL schema without loosing the sync, but I find it hard to find a solution. Does any of you faced the some problem ? I found ...
8
votes
2answers
2k views

How to safely run database migrations with multiple app instances?

We have an application that has a mix of both fast (< 1 second) and slow database migrations (> 30 seconds). Right now, we're running database migrations as a part of CI, but then our CI tool has ...
1
vote
0answers
65 views

Disaster Recovery Database Switchover options

Some info on the current setup: We're currently using database replication - transactional replication, to be specific - between 2 servers. For sake of this post, we are replicating from a PRIMARY to ...
2
votes
0answers
248 views

Replication between SQL server and Couchbase Lite

We have a main MS Sql server. This is the main data source that delivers and receives data to and from backend administration and (in development) mobile software. We need to make a connection to ...
0
votes
1answer
118 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 ...
3
votes
3answers
156 views

SRP processing file line-by-line

I'm writing a class that read lines from a file, process them, store them in an accumulator and when it reaches a threshold bulk inserts in a SqlServer database. Like this: class ...
1
vote
0answers
1k views

Entity Framework naming conventions for the same table name across multiple schemas

The DbContext of my application's Entity Framework setup (which I will refer to as ApplicationContext, the name of our derived type) contains classes for all of the tables in our SQL Server database, ...
-1
votes
1answer
83 views

.NET Sort concurrent requests into a queue

I asked this at Stack Overflow but seeing as it wasn't so much a programming issue as a theory issue it wasn't well received. I have a program that issues a unique ascending code every time one is ...
32
votes
10answers
23k views

Using a GUID as a Primary Key

I generally use auto increment IDs as Primary Keys in databases. I am trying to learn the benefits of using GUIDs. I have read this article: https://betterexplained.com/articles/the-quick-guide-to-...
1
vote
3answers
281 views

Row level access in a monolith application and in microservices based application

I would like to get an advice on how to tackle such a problem. Currently we're using SQL Server as our database and the whole application is a fat, juicy monolith which we'd like to break down. There'...
0
votes
1answer
248 views

Round robin, balanced home/away, multiple locations with multi-team options

This is my first question on this forum, have tried to exhaust every possible research option I could think of or find. Actually this is the first time I've posted for help with this anywhere, so ...
2
votes
4answers
609 views

How to automate certains tasks in a web application?

I'm working on my final project for a course named Web Applications in ASP.NET. Basically, it's a web application for shopkeepers to manage their clients' money accounts in their stores. In order to ...
1
vote
2answers
1k views

Encrypt data in code or stored procedures?

I'm working on a Web App where the data is quite sensitive and is required to be encrypted before it is stored in the database. Now there are two ways through which I can achieve this: Encrypt data ...
1
vote
1answer
272 views

MS SSIS as good approach for two-way data synchronization

We have SQL Server databases in every retail store, and one database in main office. We want to collect data from all stores and load the main DB (for BI), but we also want to sync data from main DB ...
3
votes
4answers
657 views

Handling data latency when working with a read-only database?

Our Web API app is C#/MS-SQL and our DBAs want us to use two databases, one Writable, one Read-only. The database for writes will replicate to the read-only copy. This question may apply to other ...
1
vote
1answer
721 views

Event sourcing vs SQL Server Temporal Tables

With the creation of Temporal Tables in SQL Server 2016 (or similar technologies in other databases), would you consider Event Sourcing unnecessary? Both are audit techniques, very similar (one deals ...
2
votes
3answers
58 views

Verbose specification of exact Table or Implied

Consider the following two queries in SQL (Transact SQL): UPDATE [database_name].[dbo].[table_name] SET [database_name].[dbo].[table_name].[field_name] = @value WHERE [database_name].[dbo].[...
1
vote
1answer
3k views

Data Encryption in Data Layer with ASP.NET Core Entity Framework

I am currently designing a web application where the data needs to be stored encrypted. Planned technologies used: ASP.NET Core API ASP.NET Core Entity Framework MS SQL Server 2016 any Web Frontend ...
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 ...