Questions tagged [sql-server]
SQL Server is a relational database management system from Microsoft.
348
questions
-2
votes
2
answers
67
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 ...
-1
votes
1
answer
73
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 - ...
-3
votes
1
answer
77
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
50
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
71
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
186
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
50
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
101
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
56
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
61
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
91
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
54
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
128
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
1k
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
269
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
167
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
78
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
669
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
41
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
967
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
133
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
330
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
205
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
334
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
495
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
219
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
256
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
72
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
78
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
82
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
183
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
103
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
851
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
339
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
34
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
118
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
169
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
393
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
385
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
860
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
503
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
609
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
262
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
212
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
126
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
446
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 ...