Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [database]

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

0
votes
3answers
96 views

DB architecture for managing items of different categories

I'm making a rental app which has many categories with unique properties Example: Category 1 Car which has Fuel, model, color, speed Category 2 Apartment which has Rooms, lift, ...
0
votes
0answers
19 views

Storing data from a database vs continuous database retrievals [duplicate]

I've been searching for an answer across the web to my question but have not been very successful. I am creating an appointment scheduling program that uses a database to store a number of tables ...
0
votes
2answers
90 views

Should a SVG be converted to JSON to be stored in the database?

Consider an application where you can create and edit a SVG file (e.g. draw.io). How should the SVG be stored in the database? With SVG (image/svg+xml) Thus no further processing is required before ...
1
vote
0answers
36 views

Difference between Hints and Indexes [migrated]

Oracle Hints Hints can extend the capability of cost-based optimization. This technique is especially helpful if your distributed query contains an aggregate, subquery, or complex SQL. Indexes ...
0
votes
1answer
37 views

Descriptive short term for a field that has been set to read-only in anticipation of removal?

I'm currently writing a design to add the possibility to mark a field or attribute for an entity as read-only in preparation for imminent removal. The idea is that, once the field has been thus marked ...
0
votes
2answers
59 views

How to allow arbitrary database connections based on users selections?

I'm writing an application which would allow users to access the databases over the network. Currently the user enters database details in a form which are later used to establish a JDBC connection. ...
1
vote
1answer
79 views

How to set nullable/optional property of database object to NULL in backend?

We are building API which mainly passes database objects back and forth between user and database, so the main flow of information is quite basic: Table (view) <-- ORM --> C#/Java/etc. Objects &...
6
votes
4answers
391 views

If a microservice architecture needs a separate database per microservice then it's too costly & unmanageable. Why do we even need it?

I read about microservices and it seems illogical to me to create a separate DB per service just to achieve isolation. I can achieve the same using only web services and a single database. Why do we ...
0
votes
0answers
61 views

Is wrong to declare database public static?

GOAL: get access to a reference to the database (which is declared in the MainActivity ) from within a Fragment in another activity. The organization of the code is like this MainActivity public ...
1
vote
2answers
161 views

Best practice on how can I change the structure of a live database without losing data inside

Suppose I have a live website running on a live database and I have a dev website that is a duplicate of the live website. The live database is where customer transactions are stored. Suppose I do ...
0
votes
0answers
32 views

Time series database for low-resolution data

Does it make sense using a time series database, such as opentsdb, for very low-resolution data (hourly, daily) or I should rather use a relational/NoSQL database engine instead? It's quite possible ...
2
votes
3answers
73 views

Should I merge database migrations together before release?

During the development process many migrations may appear. Is there any point to keep them instead of merging them all together? Let's take a look into a simple example. During development we ...
1
vote
0answers
34 views

separate table for one of the type or java enum?

I want to make budget tracking web-app, tracking all savings and expenses with corresponding dates. Later generating reports, summaries etc.. I came up this design Frequency Table - does it have to ...
1
vote
0answers
53 views

How can I offload customer's data needs onto the customer?

I write code for an Engineering application where engineers keep giving me various specs in a form of tabular data - for example, a table with product model names and many various parameters for each ...
3
votes
4answers
120 views

Data storage for small application using XML

I am developing a small application as a hobbyist. This application will track costs (eg. purchases and sales, ...) for a single person company. Only string, date, double, integer, and decimal types ...
3
votes
3answers
282 views

One Database for Multiple Applications?

Has anyone worked in an environment where multiple in-house applications are all under one database with each application given its own schema within that single database? I don't just mean a few ...
2
votes
1answer
71 views

Development database with real data

In our team, we currently all develop on our local environment, with a local database, that regularly fetches data from the production database. However, as our production database grows, it's ...
4
votes
3answers
218 views

How to handle foreign key constraints when migrating from monolith to microservices?

My team is migrating from a monolithic ASP.NET application to .NET Core and Kubernetes. The code changes seem to be going as well as can be expected but where my team is encountering a lot of discord ...
3
votes
4answers
94 views

DB Enumerations vs App Enumerations vs Lookup tables

We started a project recently, and during the design process, we have some arguments among team members. We have to deal with enumerations so we ended up with three choices. Have the enumerations as ...
0
votes
2answers
62 views

Proper way to manage database for distributed backend architecture

My application backend consists of a bunch of standalone tasks linked together by messaging queues. They all need to access the same SQL database in order to run and store their results. Right now, ...
1
vote
0answers
30 views

Java dashboard for machine data

I am currently working on a project for a production facility. The machines in the production are saving so called 'Telemetry Data', measurements like water pressure, plastic volume or temperature ...
1
vote
2answers
91 views

Should application double check if data was acted upon?

Assuming the context of a CRUD: After performing a database DELETE, should an application's deletion method check if the records were actually removed from the database? If so, how valid is it for ...
0
votes
0answers
53 views

How to “emulate” materialized views in Java?

I'm trying to design a background Java app that should integrate a few databases and make some transformations and calculations on data. One of the scenarios could be to have three source tables in ...
0
votes
1answer
67 views

Storing records that are yet to be processed

I have a rails app where users can upload data and then the backend processes it and creates a bunch more data that gets stored with the record. The data processing is async and handled outside of the ...
2
votes
3answers
148 views

How should I implement custom database fields?

I'm building an app where end users can add custom fields to database tables. Think of it like a CRM app, where sometime you just need to add an extra field to your customer table. Pretty much all ...
1
vote
3answers
51 views

Is this implementation for the “one” side of the relationship correct?

Say I have the following ER diagram: The "one" side of the relationship of the above diagram means the following: Each student can meet 0 or 1 teacher. So I can't do something like this: But can I ...
0
votes
0answers
109 views

Storing user files: Database or file system?

I'm trying to develop a decentralized cloud storage solution that anyone can deploy at home with sufficient storage space on the host machine. The complex part is that I'd like my system to support ...
1
vote
0answers
28 views

KNN Implementation in production for a retrieval arquitecture (CBIR)

We are going to start the implementation of a Content-based image retrieval (CBIR) that It will be integrated in our main product. We did tests and proof of concepts with different libraries that ...
0
votes
3answers
171 views

Does the “one” side of the relationship also apply to the same record?

Say I have the following ER diagram: What I know is that the "one" side of the relationship means the following: Each student can meet 0 or 1 teacher. So for example student3 can meet teacher7, but ...
1
vote
1answer
49 views

Better to store miscellaneous metadata in database or calculate on each access

I have a number of attributes I need for various page loads and other backend tasks, and I'm debating on whether storing these things in a database or calculating them on the fly. For instance, if ...
0
votes
0answers
20 views

mongodb/mongoose - ensuring uniqueness between two lists

So I currently have my list and item collection set up (mongoose). List new Schema( { items: { index: true, ref: "items", type: [ObjectId] }, ...
-1
votes
2answers
57 views

The challenges of removing/modifying entries from a database located in persistent storage

I'm implementing my own simple database with disk storage, and I'm not sure how to go about modifying and deleting entries. The problem is that as you delete a record from arbitrary position within ...
6
votes
3answers
206 views

How to solve form submission consistency in a web application?

Imagine that you have a form with which you can edit some data, let's call it a Person form. Let's imagine that a user opens up this Person form, receives the current data that is stored in the ...
1
vote
3answers
49 views

Calculating Journey Summary made by a vehicle and Cache them to database

This is more of a point me in the right direction kind of question, I have 2 solutions but both of them are invalid because the data calculated is invalid in some scenarios. I am working on a system ...
1
vote
1answer
45 views

Which datastructure to use for temporary storage of intermittent and asynchronous sensor data?

Here an outline of the setup: Input data: I have several sources for sensor input data (GPS, and a bunch of other sensor data from different sources). All of those individual inputs consist of a ...
-1
votes
1answer
209 views

Pros and Cons, use REST api vs querying directly to database with different client platforms [closed]

We want to figured out, whats are the pros and cons, when you use a REST api vs querying directly to a database, if you have different client platforms (Web-Application, Android, iOS). Edit: I know ...
-1
votes
1answer
13 views

Data store for sequential key-value, time limited event “journal”

I'm designing a system in which a key component acts like a "journal", in the sense that it stores a list of sequential events that can change the state of the entire system. Upon request, any other ...
0
votes
0answers
24 views

Edit List attribute in JPA when null?

I am using EclipseLink as my JPA implementation and Postgresql as my DB. JPA: @Struct(name="label,.....") @Entity @Table(name="\"XYZ\"", schema="\"XYZ\"") @NamedQuery(name="...
1
vote
0answers
104 views

How to maintain table relationship across services in with a micro-service architecture

I have a scraper service that looks for media online. For every source type, there are two tables. A common source table and a source_type_media table that are related by source.id to ...
0
votes
1answer
29 views

Extending photo album app with videos

I have a personal photo album application where I upload my photos. However, I'd now like to extend it with videos as well, and I'm unsure how to properly perform this extension. The current design ...
0
votes
2answers
124 views

How to create a db schema for “if this then… elseif … elseif …” and so on?

I want to create an app where a user will go through a series of steps every day. All the subsequent step will depend on the previous ones, that is, 2 users can have different experiences depending on ...
3
votes
1answer
102 views

How to design a storage backend for a cloud spreadsheet?

As a personal project to learn key technologies, I am trying to build a spreadsheet on the cloud (something like Google Sheets). How would you design the storage backend to power something like this? ...
2
votes
1answer
69 views

Data points to use cache or database for these three major features under scalable ecommerce? [closed]

Auto-completion :- When we start typing, does system suggest the product from cache or hit the DB every time or hit the DB only when no result found in cache ? Search:- When enter any product, does ...
2
votes
2answers
88 views

Should methods be part of your persisted entities?

We are coding a small game and have a Player class. This Player class has certain properties which you would persist in a database like Id, Level, Health. We would like a Player to be able to kill ...
0
votes
1answer
81 views

Does primitive obsession apply to columns of tables in database?

For example, in a Student object, in order to avoid primitive obsession, I should change public class Student{ public String name; public int age; } into public class Student{ public ...
0
votes
0answers
21 views

How to implement dynamic settings in a web app — db table design?

In my web app I want to be able to use Settings as an admin that I can edit/remove/add via my admin page I think I'll create a table like this: settings(id: int, key: string, value: string) I ...
1
vote
1answer
66 views

Fastest way to persist an append-only ordered event stream

I'm looking to persist a stream of events and I want it to be: fast in both latency and throughput, looking at at least 100k events per second ordered (not by timestamp, as multiple events within the ...
0
votes
1answer
70 views

Architecture of data logging and storage system

I've gotten myself a bit more roped into coming up with the design and architecture for a new system due to some departures and looking for some insights. The system has a bunch of different high ...
2
votes
0answers
39 views

Chronicle Queue: how to make a stack and how to limit disk usage

My server and several clients are different JVMs running on the same machine, they need to share persisted time series data: server reads a time series from somewhere, writes to a persisted embedded ...
3
votes
3answers
270 views

DB Queries in code or use Stored Procedures

Some of my colleagues tells me that using stored procedures in the database adds to much business logic in the database, and that you should keep the data separate from logic. Other colleagues tells ...