Questions tagged [sql-server]

SQL Server is a relational database management system from Microsoft.

Filter by
Sorted by
Tagged with
-2 votes
0 answers
41 views

SSMS 2016: Function returns a null when its not supposed to? [closed]

I currently have a warranty function (which is being used for an INSERT query)that determines whether a warranty is still valid. It compares warranty_remaining [DATEDIFF between the date of purchase ...
PixelationX's user avatar
0 votes
1 answer
73 views

How to organize "master" data VS "working" data in MS SQL

I have this survey software that I'm writing and I'm wondering what would be the best design for my requirement. I'm going to simplify it as best as I can. I have these entities: class Survey { ...
Francis Ducharme's user avatar
0 votes
0 answers
93 views

SQL Database design for reusable components and classes

I am working on a small suite of enterprise applications, and I am trying to determine the best way to make them more consistent and maintainable across the board. The applications are .Net Blazer ...
aterbo's user avatar
  • 111
-1 votes
1 answer
117 views

PowerApps with SharePoint Versus ASP.NET core with SQL Server

I have around 6 years of experience in SharePoint, ASP.NET MVC, ASP.NET Core MVC & SQL Server. Now when I want to take a decision, if the project should be implemented using SharePoint/PowerApps ...
microsoftdeveloperdesigner's user avatar
35 votes
6 answers
10k views

SQL as a means of avoiding "releases"

The system I'm working on started as a small training project within the company I work for but quickly caught interest from management as a means to help to standardize the existing excel-heavy ...
ElderFuthark's user avatar
0 votes
3 answers
96 views

How to avoid data corruption with dual parent/child foreign keys

Imagine the following: Persons table: (Id, FirstName, LastName) PersonEmails table: (Id, PersonId, Address) (to allow a person to have multiple emails) Contacts table: (Id, PersonId, UnsubscribeAll) (...
Mr. TA's user avatar
  • 155
-2 votes
2 answers
105 views

How to filter and concatenate multiple sql files into one database [closed]

I have an issue where I have multiple databases from previous projects that I would like to combine into one large database. These databases are stored in .sql files. The issue is that I only need ...
ste's user avatar
  • 7
-1 votes
1 answer
86 views

multiple products db structure in mssql

I am looking for a better approach to add multiple products to my db. (things I have tried) Example 1 [table Products - ProductId pk( ProductId,ItemCode,Price,ProductType)..] [table 2 Frame - ...
cal's user avatar
  • 17
-3 votes
1 answer
90 views

Where should linking tables be stored? [closed]

I have a system where properties can be stored, and linked with multiple other entities (each with their own schema). Let's say that Documents can be linked with Users and Assets. What is the best ...
mft25's user avatar
  • 161
1 vote
2 answers
68 views

How to write robust or alternative to TSQL data processing routines in SqlServer?

My company has a workflow that involves ingesting huge amounts of raw data from external sources into SqlServer and then interpreting and weaving that data into our own application tables. This ...
Joshua Frank's user avatar
1 vote
2 answers
75 views

Should I avoid putting Id's in a contract/response model?

Here is the scenario: Let's assume that we have a Telephone and a Driver. Here is the definition of the classes (Pseudocode): Telephone: { Id: number, [Unique] TelephoneNumber: string } Driver: { ...
Replay's user avatar
  • 109
1 vote
1 answer
366 views

Performing many SQL inserts quickly without using BulkCopy

I have a C# system that reads thousands of messages per minute from a Kafka topic. The messages are filtered and I need to insert the filtered messages into a MSSQL table. A normal insert statement is ...
Mulciber Coder's user avatar
-1 votes
1 answer
126 views

How can I pass a large amount of data from a JavaScript client to the web server in bulk

I have a Vue/Quasar application that allows the end user to convert an Excel Spreadsheet into an Array and load it into a DataGrid. The Spreadsheet has a list of peoples names, email address, ...
user1314159's user avatar
0 votes
1 answer
110 views

Syncing and matching local records to external database that behaves like a black hole

Black hole problem I am working on matching and daily syncing of our internal data records to an external database that behaves like a black hole, meaning, we cannot view nor extract any data from it ...
valeesi's user avatar
0 votes
1 answer
72 views

Finding/determining future data for pricing

I'm honestly not even sure how to go about how to ask what I'm looking for/need. lol. I'm currently using Sql Server for my database and the 'new' .net 5. There are multiple pricing tables that each ...
Travis's user avatar
  • 19
0 votes
1 answer
78 views

Why does SQL Server prefer to order this result set on a nonclustered index rather than the clustered index?

It's common knowledge that the order of records from a simple one-table query is not guaranteed to be in the order of the primary key/clustered index. Adding a simple ORDER BY is no problem of course, ...
Jacob Stamm's user avatar
0 votes
2 answers
443 views

Structure database for timeline with different objects

I need to work on a project where we have a "case". Within this case we need to attach different things, in a timeline. Those things can be: Status change (Open, On hold, Closed) Messages (...
Roy Berris's user avatar
-1 votes
1 answer
95 views

Implementation of concurrent purchase for unique items

I am building an API for webshop. I need to implement following scenario: There are x (let's say 500) digital items, which will have same price (let's say each item costs 10$), but unique serial ...
Ramūnas's user avatar
-1 votes
1 answer
201 views

Allowing end users to upload a large amount of data using Excel

I've read Allow users upload CSV files, and embed the data for a simple API , Importing large data sets into a database over the web the closest concept is Is there a way to efficiently allow a user ...
user1314159's user avatar
3 votes
3 answers
2k views

Scheduling database design approach

Unfortunately, I do not have the flexibility to use Quartz for scheduling and am left to build a simple scheduler for emailing based on frequency determined by user. A user can choose to receive the ...
user721264's user avatar
1 vote
0 answers
832 views

The most "correct" way of detecting changes to a database

We have a few 100's lines of code, that according to some complex logic decides if certain columns of certain entities should be updated from some legacy system. Those columns don't necessarily get ...
Oren A's user avatar
  • 270
1 vote
2 answers
254 views

Passthrough database views - what's the point?

I've inherited some legacy code which has some ostensibly strange views in an SQL Server database. They are basically complete passthroughs for a table. No column differences - a comparison of the ...
Paul Alan Taylor's user avatar
-1 votes
1 answer
106 views

Strategy to make sure relevant cache records are expired on data update

In our database, we have around 150 different tables. However, there are a handful of them that are key, as in they get referenced pretty much everywhere. We also have quite a few reports that we pull ...
Riz's user avatar
  • 196
2 votes
1 answer
2k views

Best approach to connect master and child table while insert data in tables

I need advice what is best approach to connect data between master and child table. I have console application written in C# which scrape data from web, process data and insert them in table. Master ...
TJacken's user avatar
  • 123
0 votes
2 answers
193 views

Why does Microsoft SQL server default to failing on deadlock?

Why does Microsoft SQL server ( and possibly other SQL implementations ) default to failure when a deadlock is detected? Wouldn't it be more useful, at least as a default, for queries to be retried? ...
George Barwood's user avatar
0 votes
0 answers
45 views

Scalable database design review

I'm doing some research on how to scale our current SQL database and need some advice with a possible solution. The goal being able to handle more data and doing it in a way that performs well. We ...
user3953989's user avatar
3 votes
1 answer
2k views

How to handle complex business logic permissions in the database?

I have a system in development and part of the system is how permissions are handled, business logic rules for this are very complex so after lots of trials, we couldn't fit them directly in the ...
user2987021's user avatar
-3 votes
1 answer
144 views

SQL Server: Which License? Any alternatives?

I'm working on a project which at the moment is not being used for any commercial purposes, and I'm managing the data by using a SQL Server Database. I read here that I should pay for it if I ever ...
Ferran R.'s user avatar
0 votes
0 answers
467 views

Net Core: Solutions to Update History Tables in Application Design

Our company did not properly design Address Record Code Module. Developers are updating Address SQL table with Multiple Service Methods, and are not updating AddressHistory Sql table. They're asking ...
user avatar
0 votes
2 answers
361 views

Is it true that ORM allows for changing the type of SQL that you use easily?

Hey so I have been looking into ORM since my last question and I am wondering. Instead of worrying alot right now about whether I will use mysql, postgre, or sqlite, would it be better to use ORM ...
Kwsswart's user avatar
  • 139
2 votes
1 answer
405 views

How do you approach one database per developer when working with a very large databases?

In our production environment we have a large database (SQL Managed Instance), roughly around 400-500 GB. We create a copy of this database and use it to restore in our development environment to ...
Ross's user avatar
  • 129
-2 votes
1 answer
549 views

What is a simple implementation of onion architecture for C# ASP.NET Core WebAPI and SQL db that is not full DDD and CQRS?

I'm a programming teacher. My students learn structured and then object oriented programming in JavaScript and C#. They learn SQL, MS SQL Server, Dapper and EntityFramework Core. After this they ...
Terje Kolderup's user avatar
1 vote
2 answers
324 views

How to design a process and use the business rules for sending alerts/notifications

Currently working on designing a process which demands me to send alerts like email notifications to the users which meet a business criteria(we can also call business rules). I want to make this ...
Brooklynn99's user avatar
5 votes
1 answer
425 views

Are legacy C# DataTable/SqlDataAdapters exponentially faster than SqlConnection/SqlCommand and/or LINQ to SQL DataContext.ExecuteCommand calls? [closed]

I can't believe DataTable/SqlDataAdapter massively beat out System.Data.Linq.DataContext.ExecuteCommand and ExecuteNonQuery (tried with both Stored Procedures and command text) and just straight ...
Terry's user avatar
  • 159
0 votes
1 answer
75 views

MVC database connection .NET

Introduction I intend to create a .NET WinForms application (this will be a toy application) which connects to a SQL Server database backend. I have designed and implemented an object-oriented model ...
Al2110's user avatar
  • 245
2 votes
1 answer
87 views

Techniques for handling large reporting periods in MSSQL

We have a fairly large database with some fairly large tables (100s of millions of rows). Some of those tables are reported on. We have indexes in place to make this as fast as possible, but still ...
Chris's user avatar
  • 137
-1 votes
1 answer
132 views

What is the best practice to insert two similar records in sql server db table which will be sent to two different destinations?

I am working on parsing a file and inserting records into SQL Server DB.The database table structure will be something like this: A Users table which contains (id, name, address, destinationName,...
Brooklynn99's user avatar
-3 votes
1 answer
109 views

How to store a limited set of custom properties without using an EAV Schema

I'm designing a solution in .Net which will be hosted on Azure. I have a system which will allow users to specify custom characteristics for their objects which they will track over time. I am certain ...
Riz's user avatar
  • 196
1 vote
1 answer
270 views

Designing low fault software rest API calls to achieve data synchronization between two different systems

I have been looking for a better design approach and will be providing my problem statement here with a similar example. As I don't have logic already in place but have the solution in mind which I ...
Brooklynn99's user avatar
2 votes
1 answer
125 views

Application Security Trimming vs Database Security Trimming

We have a fairly complex Meetings Management solution which would have one meeting to contain different agendas which would contain some tasks and also documents, etc. There are also different roles ...
windfly2006's user avatar
6 votes
5 answers
1k 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 ...
Dan's user avatar
  • 299
1 vote
1 answer
530 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' ...
Ananda Kumar Santhinathan's user avatar
1 vote
0 answers
36 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 ...
ruedi's user avatar
  • 133
-1 votes
1 answer
61 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 ...
Kelly o'Brian's user avatar
1 vote
3 answers
122 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 ...
tsu90280's user avatar
  • 119
0 votes
0 answers
216 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 ...
spovelec's user avatar
  • 101
1 vote
1 answer
587 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 ...
Surensiveaya's user avatar
3 votes
4 answers
464 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'...
Jaa Zaib's user avatar
1 vote
1 answer
905 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 ...
WebbyLass's user avatar
3 votes
1 answer
745 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. ...
Missy's user avatar
  • 141

1
2 3 4 5
8