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
1
vote
2answers
101 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 ...
0
votes
2answers
80 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 ...
1
vote
3answers
104 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
44 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
79 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 ...
18
votes
7answers
28k views

Ways to have a history of changes of database entries

What are ways to allow the versioning of database entries (data)? Think of the content-managment-systems abilities to revert back changes of articles. What are their pros/cons?
0
votes
1answer
60 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
35 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 ...
1
vote
1answer
139 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
1answer
52 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
43 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 ...
6
votes
4answers
1k views

Should I comment Tables or Columns in my database?

I like to comment my code with various information, and I think most people nowadays do so while writing some code. But when it comes to database tables or columns, I have never seen anyone setting ...
-3
votes
2answers
108 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
93 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 ...
3
votes
7answers
2k views

Should I use entity framework for CRUD and let the database handle the complexity that comes with high end queries?

I am new to ef and liking it since it reduces the overhead of writing common queries by replacing it with simple add, remove functions. Agreed. Today I got into the argument with my colleague who has ...
0
votes
0answers
108 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
190 views

Designing database job monitoring

I have several Oracle database where my in-house applications are running. Those applications use both dba_jobs and dba_scheduler_jobs. I want to write monitoring function: check_my_jobs which will ...
2
votes
1answer
29 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
1answer
73 views

Custom service layer logic vs Custom DB query

I am trying to confirm best practice around architecture I am working with. Frontend <-> API gateway <-> Service layer (Rest API) <-> DB I have an incoming request which is asking for huge ...
0
votes
1answer
212 views

Appropriate design / technologies to handle dynamic string formatting?

recently I was tasked with implementing a way of adding support for versioning of hardware packet specifications to one of our libraries. First a bit of information about the project. We have a ...
0
votes
0answers
39 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
2answers
138 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 ...
36
votes
6answers
39k views

Unit-Tests and databases: At which point do I actually connect to the database?

There are answers to the question on how test classes that connect to a database, e.g. "Should service test classes connect ..." and "Unit testing - Database coupled app". So, in short let's assume ...
0
votes
1answer
96 views

Is my database schema going to work? Tracking git issues

My boss wants an automated weekly report on how many git issues have been moved to and from various "lanes" (pipelines) on a virtual kanban board. I wrote a quick python script to get that data using ...
3
votes
1answer
5k views

Shall the Database in a sequence diagram be represented as actor or boundary?

I'm designing a system made of a web application and database. I use the <<Entity>> - <<Control>> - <<Boundary>> stereotypes in my UML diagram. In the following ...
10
votes
4answers
21k views

Best approach for a database of long strings

I need to store questions and answers in a database. The questions will be one to two sentences, but the answers will be long, at least a paragraph, likely more. The only way I know about to do this ...
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 ...
19
votes
3answers
7k views

How to store ordered information in a Relational Database

I am trying to understand how to properly store ordered information in a relational database. An example: Say I have a Playlist, consisting of Songs. Inside my Relational Database, I have a table of ...
1
vote
1answer
84 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 ...
0
votes
2answers
85 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 ...
4
votes
1answer
396 views

Continuous Deployment Database Project VSTS

Looking for continuous deployment strategies regarding SQL server database projects targeting Azure SQL using VSTS. My scenario... Using VSTS for CI/CD Using a SQL Server Database Project to define ...
2
votes
1answer
369 views

Three phase commit protocol

I'm trying to understand the three phase commit protocol by reading the wiki page (http://en.wikipedia.org/wiki/Three-phase_commit_protocol#Motivation). In the description for the diagram I posted ...
3
votes
3answers
94 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 ...
1
vote
2answers
123 views

Architecture/algorithm for unusual recommendation system

There are thousands (or tens of thousands) of possible movie titles. New user enters my website and selects hundreds of titles that he likes. The only single goal of my website is to output the list ...
0
votes
0answers
21 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
75 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 ...
1
vote
2answers
175 views

Using UNIQUE (col1, col2) or using a composite primary key for a relation table in SQLite/SQL?

i’m working on a project where i’m using SQLite and where i have a few relation tables looking similar to this one: CREATE TABLE tag_entry_relation ( id INTEGER PRIMARY KEY, tag_id INTEGER REFERENCES ...
0
votes
1answer
37 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 ...
5
votes
4answers
496 views

How should I delete sensitive data from a database?

I have a new requirement to delete sensitive data when requested by the user. The problem is that the system is complex and there is a lot of existing data in the system and they are all related. ...
1
vote
0answers
37 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 ...
2
votes
1answer
255 views

How to handle database connection password?

I have a question about using databases in my application. I have the User table which stores passwords for my users. I know how to handle user authentication, but how to handle the password for the ...
4
votes
2answers
684 views

How can a Java programmer make the most of a new project in C or C++? [closed]

As a Java programmer, I'm looking to learn either C or C++ by writing a database manager. Obviously, Java shares many idioms with C and C++, but yet both bring vastly different program design ...
0
votes
0answers
23 views

Multitenant setup with master account

I would like to make a SaaS which would be a multitenant system. Development is done in Laravel, which is less important. What I would like to know is how would you handle having a master admin ...
2
votes
1answer
2k views

Why is elastic search popular? [closed]

Elastic search is basically about indexing of data. In database world, Multiple indexes can be created on a MongoDB collection Collection in MongoDB can be schema-less. In MongoDB, BSON encoding ...
0
votes
0answers
53 views

Effective database design for time card tracking

I'm building a timecard system for a company of ~50 employees. My problem is designing an efficient way of storing this data. Currently, their timecards are done on a table like the one shown below. ...
21
votes
7answers
6k views

Advantages and disadvantages of using bit masks in database

Not so long ago I talked to my colleague and he was definitely against using bit masks because it is hard to understand all the values that are stored in the database. In my opinion it is not always a ...
-1
votes
1answer
53 views

What is the best design for this use case regarding bidirectional relationship? [closed]

For this question let's consider a system in which the users can match with each other (let's say for simplicity exactly like the dating apps). User1 matches User2 (and the other way around) only in ...
103
votes
9answers
44k views

How much business logic should the database implement?

I've worked in some projects where most of the business logic was implemented on the database (mostly through stored procedures). On the other side, I've heard from some fellow programmers that this ...
0
votes
1answer
29 views

Update items based on a read operations on same items is a bad practice?

DynamoDB is the database solution, I'm using to store my items. It's a NoSQL/Document database and I got a real problem on real-time updates of items. First, the saved format is like { expiredTime:...
0
votes
2answers
160 views

Is it a software engineer's responsibility to structure data as opposed to a DBA?

As a backend engineer at a small company, we're running into a question of whether we need a DBA or another backend engineer (SWE2). The reason why this is a question stems from a difficulty in ...