Questions tagged [sql-server]
SQL Server is a relational database management system from Microsoft.
347
questions
-3
votes
1
answer
75
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 ...
1
vote
2
answers
47
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 ...
1
vote
2
answers
69
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:
{
...
1
vote
1
answer
145
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 ...
-1
votes
1
answer
49
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, ...
0
votes
1
answer
95
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 ...
0
votes
1
answer
54
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 ...
0
votes
1
answer
59
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, ...
0
votes
2
answers
68
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 (...
-1
votes
1
answer
33
views
Easiest Way To Implement Predictive Search On An Intranet Site [closed]
In my workplace, we have an intranet website developed internally that we use for CRM. The data of our clients are shown there (MS SQL server is used as a backend to store data). The site has a ...
-1
votes
1
answer
52
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 ...
-1
votes
1
answer
112
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 ...
3
votes
3
answers
927
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 ...
1
vote
0
answers
265
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 ...
1
vote
1
answer
162
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 ...
-1
votes
1
answer
70
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 ...
2
votes
1
answer
494
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 ...
0
votes
2
answers
178
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? ...
0
votes
0
answers
39
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 ...
3
votes
1
answer
838
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 ...
-3
votes
1
answer
129
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 ...
0
votes
0
answers
300
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 ...
-1
votes
2
answers
186
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 ...
2
votes
1
answer
322
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 ...
-2
votes
1
answer
476
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 ...
1
vote
2
answers
187
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 ...
5
votes
1
answer
235
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 ...
0
votes
1
answer
69
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 ...
2
votes
1
answer
76
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 ...
-1
votes
1
answer
121
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,...
-3
votes
1
answer
77
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 ...
1
vote
1
answer
179
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 ...
2
votes
1
answer
101
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 ...
6
votes
5
answers
838
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
1
answer
312
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
0
answers
32
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
1
answer
55
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 ...
1
vote
3
answers
117
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
0
answers
155
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 ...
1
vote
1
answer
361
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
4
answers
371
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'...
1
vote
1
answer
838
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 ...
3
votes
1
answer
469
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
votes
3
answers
581
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 ...
1
vote
5
answers
4k
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 ...
1
vote
2
answers
259
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
1
answer
211
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 ...
1
vote
2
answers
125
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 ...
0
votes
1
answer
425
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
1
answer
134
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 ...