Questions tagged [database]

This tag is for general database questions; if you question is specific to SQL use that tag instead.

Filter by
Sorted by
Tagged with
0
votes
1answer
45 views

Encrypted ID to 3rd party application

I would like to ask you a questions that arose these days with GDPR new rules. What I have is a payments service which use BrainTree to make the payments. In my side I store some information ...
2
votes
1answer
388 views

Best practices for translatable models in Entity Framework Core 2.1+

I'm building an Entity Framework Core-backed ASP.NET Core RESTful service and I have entities / models such as Product, Document etc with description in multiple languages. I want to be able to ...
2
votes
1answer
117 views

How should I move auditing data periodically to another microservice?

I have been reading a lot about microservices and have been trying to logically split my system design up accordingly. For the most part, my system will have a central database whereby I will have ...
1
vote
1answer
156 views

Keep enumeration in DB when data associated with it is not storable in DB

I've seen several questions on this website explaining that enums should be kept in the database when there is one (this one for example). However, I feel like my case is different and there are extra ...
-1
votes
2answers
75 views

Should the TotalGrandPrice be property or Order or Invoice

I'm developing a shop. I'm trying to figure out: where should "total_grand_price" belong to? "total_grand_price" = price of all order items - discount + shipping + taxex +- etc.... Should ...
-2
votes
1answer
208 views

Difference between data Dictionaries and diagrams in SDD

I am writing a software specification and I got confused with the data dictionaries section. is it a full detail of the interfaces and stored models ( like of a database ) or a just a second step of ...
2
votes
1answer
152 views

How to optimize a complex task with multiple DB calls

I have been working on a multi-layer, sale management application developed with WPF and partly refactored with EF6 (long story). The application has some very complex tasks which require multiple ...
49
votes
6answers
17k views

In microservice, is it single database or single database instance for each service?

I understand that a each service in a microservice architecture should have its own database. However, by having its own database, does it actually mean simply having another database within the same ...
-1
votes
1answer
26 views

Cursor select on 2nd Primary key on db2 sql field for embedded positional value - Unable to determine most efficient for longterm design

I have a SQL DB2 table where the first two fields are the primary keys (not including the third field which is date/time stamp). The table was designed by another team with the intent to make it ...
2
votes
2answers
150 views

Migrating from legacy database schema, rewrite legacy or sync to new

We're currently in the process of designing our new version of an existing application. This new version will not reuse any existing code as the old code is over 10 years old and tightly coupled. ...
0
votes
0answers
59 views

Do database CRUD operations dictate whether and application should be one-way or two-way binding?

I am confused (easily done). To me model is the data from the database sent back as JSON. When I think of that in an Angular context, when two-way binding is configured, it makes me think the ...
1
vote
1answer
72 views

In the context of nested database relations (A->B->C), what are the considerations for having an additional “shortcut” foreign key (A->C)?

I have a normalized relational database. I often find I need traverse multiple tables to get the related object of a related object and so forth. So by that I mean let's say I have related tables A->...
-3
votes
1answer
67 views

Creating a multiplatform (IOS, Javascript, and JAVA) linked user account database

I have done weeks researching this question for my App Idea. Background of the APP - Simply a multi crypto currency wallet which users sign up with ONLY username and Password - no email, FB, or ...
0
votes
2answers
128 views

design discussion, user experience first or correctness first in our case

We are discussing the system configuration module design in our Java medical device software. The system has a voice instruction function used to guide patient during the examination. Different ...
1
vote
4answers
332 views

Little value in unit-testing the database component

Having a component that represents the database is wonderful! You can use it from the business logic to read and write data. But should that component be unit-tested? I would argue that it should ...
1
vote
2answers
2k views

Should I use NoSQL (MongoDB) or SQL (postgresql) database for my application?

I am planning to build a live audience interaction webapp similar to Slido as practice/fun project. User groups: admins and anonymous users Admins: login create event (define event period and ...
3
votes
3answers
329 views

How can database-specific functionality, such as increment/decrement features, be used in DDD?

I have an entity that has a dollar balance property. Whenever an event occurs that causes the balance to change, such as a debit, within the same transaction the balance should be decremented by the ...
2
votes
1answer
177 views

Where to store config settings in a text file and when in a database?

I have several web applications. All of them have config files. I'm trying to figure out when it's appropriate to store data in a config file and when in database in json or free format? For instance, ...
1
vote
1answer
213 views

Is it usual to “re hydrate” DTOs into full objects with relationships when consuming web services?

We are designing a web API to transfer objects obtained from a database to a client application which is a front end GUI. The server side business logic will be implemented (for better or worse) in ...
1
vote
2answers
393 views

token authentication security best practice

So I'm trying a few token based authentication in Laravel, each user have token they can use to access certain database. But there is something I still don't understand from these tutorial. The ...
-1
votes
1answer
50 views

Implement Customizing records

I have the following tables: Organization. Articles Templates Organization is the parent of both articles and templates. On the articles index page, I display (by default) all templates for the ...
2
votes
1answer
158 views

Keeping a JSON copy of a database

I'm new to server-side programming and I'm building a small "test" web application in NodeJS. Each time the clients need to view data from the PostgreSQL database, NodeJS will execute a "SELECT" query ...
-3
votes
1answer
194 views

Using pattern “Repository” for table relations

Have read about "Repository pattern", before it, I have used pattern DAO (data-acess-object). How should I implement table relations with this pattern? Should I create entity for links between tables?...
3
votes
2answers
307 views

How to organize PL/SQL objects in git [closed]

In our organization, we have several databases. Each of them has lots of schemas with tons of packages, procedure, functions and so on. Now, I wonder what approach is best in terms of organizing those ...
0
votes
0answers
607 views

Use of UUIDs (Primary key) in a REST API

I faced the problem bellow when I designed our new app. We are thinking to have one extra column for some tables which is a UUID for security purposes. So, there are two different solutions. First ...
3
votes
2answers
104 views

Time series and unique users

I need to collect user data every few seconds where each user is unique. I've done some research and concluded that I should consider my data as time series data because I'm looking at how user ...
2
votes
3answers
267 views

Deal with Enumerations (Lookup tables)

I am trying to design the DB schema of my new project and I need some suggestions. I decided to create a lookup table in order to save the enumeration values. So I have a table Status with these ...
6
votes
5answers
3k views

Use UUID on top of auto increment ID

I am trying to design the DB schema of my new project and I need some suggestions. I am thinking to have one extra column for some tables which is a UUID. I wanted mainly for tables which contain data ...
1
vote
2answers
163 views

Interfaces for CRUD Classes

In an in-house solution I've been working on, I've been unable to understand the benefit of how interfaces are frequently implemented throughout the project. Which is as follows: Want to do CRUD ...
6
votes
0answers
85 views

Is the C in the CAP theorem the same as the I in ACID? [duplicate]

This article states that: Consistency in CAP actually means linearizability, which is a very specific (and very strong) notion of consistency. In particular it has got nothing to do with the C ...
1
vote
1answer
174 views

Which is best software design for heavy query based app

I am in charge of design an application (.NET) that has these features: It´s a desktop app (maybe in the future will be web-based) It´s functionality is to provide users analyzed data retrieved ...
1
vote
1answer
86 views

Backend - own database vs live parsing

I am developing a mobile app that depends on some nearly static data. I will gather that data initially from an existing website by doing some HTML parsing. I could now create a database from that ...
1
vote
2answers
91 views

How to model a status log that doesn't allow duplicate statuses sequentially

I need to model the status of an object over time. I'm looking for the best way to model this so that concurrent database connections can look at the current status and update the status if the newer ...
-4
votes
1answer
74 views

What options are there to administrate a database for an online business? [closed]

Say you create a small online business from scratch, a nice Rails or Django app or something to that effect. With luck, you end up with a database full of customer orders and things. Now, aside ...
1
vote
0answers
206 views

Are there any advantages of Cloud SQL Proxy over a DBaaS?

I'm currently migrating an app from Heroku to Google Cloud Platform (with Kubernetes Engine and Cloud SQL). In using Heroku, I've become used to the incredibly simple practice of defining a ...
3
votes
1answer
110 views

What is the better search system, user defined tags or pre defined attribute fields?

I'm developing a marketplace application that will eventually list a large number of different types of items. Currently our search system (powered by Algolia) is built on pre defined attribute ...
2
votes
4answers
1k views

Best practices for database backward compatibility

I am working on an app which has multiple versions deployed in the market. Different versions have modified databases and databases are to be synced between local storage and server storage by signed ...
-3
votes
1answer
224 views

Storing a Database for a JavaFX program

I am currently developing a JavaFx program for a friend's company. I need to store information, so I am using an embedded database (mostly likely derby). Since the database needs to be outside of the ...
0
votes
1answer
99 views

How to make an server side application independent of database

We have a server-side application (in JAVA, communicates via web services) that accesses a database. If we wish to sell just the application to a customer, so that he can use his own choice of ...
4
votes
2answers
241 views

Should I retry a query that failed because of a connection error?

Let's say I want to add a row to a table. I send the query from the client (the website, not the user) to the database which is on another physical server. The query is sent over the network. The ...
3
votes
5answers
2k views

How can a web app work correctly when Internet connection is lost for some hours?

Our team wants to design a Web-Based retail pharmacy management system. A web based solution is good because no user installations are needed. Some of the data fetched from central database are read-...
2
votes
2answers
236 views

How to correctly split a monolith and rely on the same domain

Context I'm developing a Spring Boot java application. Currently it is a monolith with the rest API and the front end (vaadin driven) in the same big project. Although this is very easy to develop ...
0
votes
1answer
276 views

Hexagonal Architecture and database concurrency

I have been reading Alistair Cockburn's article on Hexagonal Architecture. One question that occurs to me, is how to handle situations where there are database concurrency issues. An obvious example ...
1
vote
3answers
136 views

Flat File vs Relational Database for Single User Desktop Application

So I keep track of all my finances using an Excel document (and have been doing this for many years) and it's become quite a pain. So for a fun side-project I want to implement something to handle it ...
2
votes
1answer
126 views

When should desktop app save to database using UoW?

So one thing I didn't really think about when designing this personal finance application was WHEN (not HOW) to persist the data. I'm using DDD, a 4-tier architecture, and EF. It struck me when I ...
2
votes
1answer
81 views

DB concurrency issues with domain model IDs

So I've done a good job separating the DAL from the BLL. I use repositories for each aggregate root. The issue I'm having is database concurrency with IDs in the domain. I don't want to use the ...
1
vote
2answers
98 views

Using Autoincrement Primary keys as Foreign Keys vs. unique codes

i’d like to push discussion on the same named thread again. I also use auto increment primary keys as foreign keys - mostly for code tables. Every row also has a code for identifying entries for ...
2
votes
2answers
266 views

Should audit records have their own id?

I'm creating audit tables to track changes made to some of my crucial tables and I'm wondering whether there's a point to history rows having their own id. Here's how my interfaces look like: public ...
3
votes
4answers
908 views

Why can't clients query the DB directly using SQL?

Given that a lot of modern web applications just consume JSON data from the sever, what is the point in having a REST api at all instead of just using SQL's query language? Nowadays people are ...
0
votes
3answers
177 views

How to associate one type with another in multiple contexts?

An application has types Game (and other business units) and Message. (Message is not a simple class with text, but a composition of a variable number of blocks like texts, images, and videos). ...