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

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

I'm currently migrating an app from Heroku to Google Cloud Platform (GKE and Cloud SQL). With Heroku, I've become used to the incredibly simple practice of defining a DATABASE_URL and letting their ...
0
votes
2answers
85 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 ...
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
20 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 ...
-6
votes
1answer
40 views

Wordpress Database [closed]

I am curious about the need for access to a website's database for simple fixes. Is it normal and customary for a freelance developer to need a copy of your WordPress database to perform edits or ...
1
vote
1answer
50 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 ...
54
votes
9answers
19k views

Storing a re-orderable list in a database

I'm working on a wishlist system, where users can add items to their various wishlists, and I plan to allow users to re-order the items later on. I am not really sure about the best way to go about ...
-3
votes
0answers
35 views

Oracle sybase bidirectional synch

I need to keep oracle table in synch with sybase ASE table. Oracle table gets a few hundred rows added every few minutes, I need to insert those new rows into sybase table, then sybase starts ...
1
vote
3answers
100 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 ...
2
votes
2answers
78 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 ...
1
vote
1answer
24 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
0answers
18 views

Relay IOS Events to a server

So, a friend of mine has asked me to assist in creating an application to create a Discord Rich Presence (Information displayed on the Discord users profile from things like Video Games, and other ...
2
votes
1answer
34 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
54 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 ...
0
votes
2answers
98 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 ...
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 ...
1
vote
1answer
48 views

how simulate sequential consumers in Kafka

I have kafka consumer that get data from kafka and do some process if some circumstances meet and send it for another consumer to do it's job. How can i build something like this? One way I think ...
3
votes
2answers
147 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
15 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
118 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 ...
7
votes
5answers
395 views

Database-stored configuration management

Developing database-backed software, often one finds it convenient to store stuff in the database which one might traditionally express in code, but which is useful to store in the database (so that ...
8
votes
5answers
4k views

Two Database Architecture : Operational and Historical

I thought about an uncommon database structure and wonder if anyone has seen it in use before. It's basically using 2 databases: First database hold only the data that is currently valid Second ...
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 ...
3
votes
3answers
517 views

Aggregation of data from two Microservices

I have two Microservices A and B. B Microservice has a large set of an entity called User. A Microservice stores the User entity in its own DB if User is configured by an agent. There is no flag ...
-2
votes
1answer
39 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 ...
5
votes
2answers
3k views

Good way to handle the notification counter like Facebook does

I want to build a similar notification mechanism that Facebook handles. I actually store the user's notification in an SQL table (actually it's a graph database but everybody master RDBMS terms). I'...
12
votes
2answers
46k views

How to get real time notifications, when a database change (insert, update, delete) occurs?

I'm creating a dashboard which should monitor a database table. I have only database access (no application layer). The table is rather large (10 million rows), however not changing rapidly (100 ...
2
votes
0answers
132 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
1answer
34 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 ...
0
votes
0answers
22 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 ...
104
votes
3answers
132k views

Creating database connections - Do it once or for each query?

At the moment I create a database connection when my web page is first loaded. I then process the page and run any queries against that conection. Is this the best way to do it or should I be creating ...
1
vote
2answers
132 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
116 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
64 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
83 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 ...
20
votes
7answers
29k 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
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 ...
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 ...
1
vote
1answer
148 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 ...
1
vote
2answers
46 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
109 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 ...
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
111 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 ...
3
votes
1answer
192 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
77 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 ...