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
0answers
23 views

Architecture to show the number of results within the filter

I am building a web application connected to MySQL database that is supposed to work like an e-shop. User should be able to filter products, but I want to display the number of results that would be ...
-1
votes
2answers
46 views

Sensitive data and cloud storage

I've been reading about machine learning models deployment and pipelines and so far most of the sources suggest that the data should be ingested from some sort of cloud based storage or source, be it ...
-6
votes
0answers
50 views

Concrete trade offs of code reuse vs database usage? [closed]

A database backed system has two concepts where a concept B is built on top of concept A. An upside is concept B piggybacks on functions of A and generally makes excellent code reuse. Downside is that ...
-2
votes
0answers
39 views

Can we have a binary relationship with both entities totally participating?

For example, I have an entity set Person and an entity set Personality. Each person can have more than one personality but must have a personality. Also, since a Personality P is present in the ...
0
votes
2answers
59 views

Hierarchical vs chronological schema for a tree depth of 1

"All modern chatting interfaces, without exception, implement a hierarchical and a not-chronological schema for chat" I was searching for SO answers and came across this: https://dba.stackexchange....
0
votes
0answers
21 views

Error code handling between Oracle Database and Microservice API

I'm using Oracle Database and .Net Core API for my project. What is the best way / best practice of handling errors between Database and API? What I'm thinking is, I'll return only custom error ...
1
vote
2answers
112 views

SQL Finding duplicates across databases across machines

I have multiple databases (MySQL, all identical except data, can delete arbitrarily from any) across multiple machines which contain large quantities of sentences (~ 1e+11 per database, ~ 4e+12 in the ...
2
votes
1answer
102 views

Is it recommended to use schemas on non-relational databases?

I'm trying to figure out if the use of schemas on non-relational schemaless databases like MongoDB is a recommended practice or a bad practice to be avoided. I am doing research work and am looking ...
-1
votes
0answers
16 views

Allow Spring/JPA to create tables for tests vs create via SQL script

Let's say I'm using an in memory DB (Apache Derby, H2, HSQLDB etc.) for testing purposes. I usually create a simple SQL script to create all the necessary tables etc. for said DB. I know I can allow ...
2
votes
3answers
88 views

How should I best structure my app when I want to sort a “parent” model by a property computed on another “child” model?

Question about OO-programming, functional programming, NoSQL, SQL databases, and software architecture Hi all, I am a intermediate-level self-taught programmer, and have been dying to get an answer ...
0
votes
1answer
52 views

which layer must check if something(like account etc) exist in database

I am implementing a web api and i have crated three layers,data access layer,business layer and presentation layer. In data access layer I have a method which create a user.I use a transaction which ...
-4
votes
0answers
22 views

Database or cloud service for analytics on documents?

I have following requirements: To store .tsv files on a server, and maintain a central registry of available files with metadata. Following API is needed: Users should be able to run queries against ...
1
vote
1answer
52 views

Model-view-controller architecture, desktop application and database connection

Let's assume we have a class structure for a particular application (a University manager for example, with classes representing semesters, subjects, timetables and so forth). It is to be a desktop ...
1
vote
3answers
106 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 ...
1
vote
1answer
25 views

Storage of Per-Device Keys in Database?

In the context of many devices being secured with their own symmetric key (think: thousands of IoT devices), is it reasonable to hold these secret keys in a MySQL database? The goal is to verify the ...
2
votes
1answer
36 views

Can we have a ternary relationship together with a recursive one in E-R diagrams

I am designing an E-R Diagram for a simple system where there are some users and contests. A user can create a contest or invite other users to the contest who can decide to accept or not. I am ...
-2
votes
1answer
56 views

Database with auto-expiration

I am midway through my software development project in Node.js and have encountered a fork in the road. I need to create a "database" or a JSON file, that will automatically delete an entry after it ...
2
votes
2answers
84 views

Is it allowed to calculate the derived attributes by using other tables' attributes directly?

I tried to build a database for Driver Booking system. Here's brief details: Drivers have several vehicles and they offers the driving service with them Drivers will charge different hourly rates on ...
0
votes
1answer
70 views

Locking an item while waiting for human approval

I'm working on adding Approval workflows around our system which manages CRUD operations for our business item. Till now, I have been using an optimistic locking strategy to handle race conditions ...
3
votes
2answers
150 views

Use surrogate key or accountno field as primary key

I am in the process of designing a simple portfolio management system for financial advisors. The central table here is an 'tb_account' table that holds the various accounts an advisor manages. I ...
0
votes
0answers
18 views

Building a Feed Handler and Persisting JSON Data to Postgresql

I'm starting a pet project and would like some advice. I need to perform the following: Scrape JSON Data from a REST API Save the Data into my Postgresql table Paginate through the rest API and ...
0
votes
1answer
130 views

Saga vs. Unit of work

What's the relationship between the two? Both are for atomic operations. Both results need to be either success, or failure with rollback to original state.
1
vote
2answers
98 views

How should I design an architecture for an endpoint to take in huge amount of data without loading the database?

Every day, there will be a set of new data that I will need to write and update to the database. This set of data can contain 8-10million records. This new set of data comes from Service A and it ...
2
votes
1answer
66 views

How to handle frequent update requests to an API which is connected to the database?

In a document editing web application such as Google Docs or Evernote, sync/save has to happen almost instantaneously to make sure data loss is minimal in case of a connection failure or a client ...
-2
votes
1answer
41 views

In DBMS are Secondary Indices ordered?

I've read that the Heap File Organization is usually used to structure a secondary index. This makes me suspect that usually, a secondary index is unordered, as opposed to the primary index, that is ...
0
votes
0answers
23 views

How to generate object Ids for both local and online storage?

My application has both offline (SQLite) and online (iCloud) storage. See: Offline First: How Do I Fetch Data? Now, as stated in my past question above, the application is offline first, and I'm ...
2
votes
0answers
133 views

Data Types Based Database

I was wandering if there exists some kind of database that organises data based on some declared type rather than tables or collections. I'll try to explain better with an example. Let's say I have ...
1
vote
2answers
133 views

Can a wide table be the correct choice in design?

I am relatively new to database architecture and I have been tasked with designing a database that will store 250 values per entry by my group. This is pushing the upper limit for fields in an Access ...
1
vote
3answers
117 views

How do I query something when I don't know how its structured?

How does one write & run queries against a database/warehouse if they have no knowledge of how the data is structured? By "structure" I mean table names, fields, etc. Unless I have table names, ...
1
vote
1answer
65 views

Offline First: How Do I Fetch Data?

I'm new to this community, I'm glad I found this and so I can ask questions like this one (as per https://meta.stackexchange.com/questions/68384/whats-the-difference-between-stack-overflow-and-...
0
votes
1answer
84 views

Recommended Long Term Data Storage Format

I have an application (written in Go) with a lot of GPS location information. Each record consists of a latitude and longitude plus somewhere around 50 fields of various pieces of meta data, some of ...
0
votes
1answer
72 views

How to manage breaking updates in an API & database

So I have been working on my mobile app for a while and it is live and in production. Because we released the app prematurely and are continuously improving current features and making them more ...
1
vote
1answer
162 views

Triangle relationship in database

I have a problem figuring out the relations between some of my database tables. The scenario for this buisiness case is a b2b buissnes. I have 3 tables: users companies distributors. A Company ...
0
votes
2answers
86 views

Correct place to store semi dynamic data

What I mean by semi dynamic data are data that are expected to be changed only with product versions. Now imagine this scenario, In version 1 of the product, I have item status : SUCCESS , FAIL In ...
1
vote
2answers
48 views

Architecture of “tags” for contacts in a marketing system and hard-coded IDs so functions can refer to them

I have these tables: contacts, tags, contact_tags. (contact_tags has columns contact_id and tag_id.) Administrators can manually create new tags via an internal website. Administrators can also ...
-3
votes
2answers
110 views

How to structure a database where a record can be a child of a parent or a grand parent record

I have these concepts for a database application: Session, Subsession and File A session can have multiple files A session can have multiple subsessions A subsession can have multiple files A session ...
-2
votes
1answer
96 views

Store line numbers of CSV in the database

In our environment, we often have to import CSV files into a database, where each line represents a record. Though there is no actual business use case for storing the original line numbers inside the ...
0
votes
2answers
99 views

What's the best way to save/track change requests on multiple objects in a database?

I have a schema containing contracts, sub-contracts, services offered by each of those and sub-services. I also have a application that allows to extend the duration of the contract and to modify ...
2
votes
1answer
30 views

Do I need to put foreign keys into a metadata repository?

As I was creating a metadata repository, I came across a doubt. As I'm new to databases, I was wondering if I should add the foreign keys data into the tables that have them (for context, imagine a ...
0
votes
0answers
42 views

Handling a large local database in a chrome extension

I'm creating a chrome extension which needs a large local database. After researching my options, I figured my best bet is probably to use the chrome.storage.local API and give my extension the ...
0
votes
0answers
113 views

Optimizing web dashboard with editable elements for performance by introducing ElasticSearch

To improve performance, we are optimizing our complex tabular web-based dashboard that loads a lot of data (many columns and rows). Many cells in the table are editable so the data is mutable. Our ...
2
votes
1answer
36 views

Data modeling user-object permissions, between claims and metadata

I've been thinking about how to map user claims to permissions in a way that scales from a read and write perspective, probably using a stand-alone service. What we have today doesn't scale for ...
0
votes
0answers
55 views

What is the correct way of setting and then differentiating between paid and free user in Firebase / Firestore?

I am developing a mobile application that will have both free and paid versions. The way I see how I could differentiate between what is a paid and free user is to set a property isPaid on their ...
0
votes
1answer
122 views

Should you clean up your DB after integration tests?

Is it good practice to clean up your DB after running integration tests (which tests APIs that put data into that DB)? I want to have a cleanup method after my integration tests run which will access ...
1
vote
1answer
89 views

Saving flags in the database without relationships to other tables

I have an admin panel which can set a lot of options which will affect some other services drastically. For example I got one that if I create a different category I can just insert it in the Category ...
3
votes
3answers
99 views

Delete user data or replace it with empty resource?

Say, we have a public facing REST API which lets user manipulate data using POST, GET and DELETE. The API is exposed via Service A which at the backend calls Service B where most of the business logic ...
0
votes
0answers
23 views

Sequence Diagram Assistance with external database

I have 5 Java/android classes which are in sequential order. The user inputs data into the text box and clicks next. Two things happen, 1 the data the user inputs is passed to the next activity and it ...
0
votes
1answer
76 views

Web application and persistence choices

Right now we have a highly analytical system which collects tons of various metrics. We need to display this data in a web ui for users to consume. Since we are in early stages of development we are ...
0
votes
1answer
43 views

Event planning application database schema

I am planning to develop an Event Planning Application. Currently I'm in the stage of planning the app structure, for example database schemas. Basically there will be two kinds of users: The event ...
2
votes
0answers
49 views

Data pipeline architecture: airflow triggered by message broker

Let us say we have: a web app with a Postgres DB that produces data over time, another DB optimized for analytics that we would like to populate over time. My goal is to build and monitor an ETL ...