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
4answers
959 views

Concurrent database access on shared network drive

I'm part of a small team that currently uses an Access database for scheduling a larger team's availability. This has presented some issues with corruption of the Access database. Additionally, I want ...
-3
votes
1answer
1k views

NoSQL vs SQL for creating an inventory database [closed]

I've been reading a lot of comparisons between NoSQL and SQL. I feel like NoSQL might be the way to go but I'm still uncertain. So here's my example: I want to be create an inventory system. There ...
-4
votes
1answer
61 views

Is PHPmyadmin “SAAS”? [closed]

AFAIU a SAAS software is any software which is runs on a browser and performs a certain service, (aside of giving a way to contact the owner of that software) and is also aimed for reuse, whether if ...
1
vote
1answer
29 views

Imagers for a product in Internet Store — one to many or many to many?

I'm creating a database schema for a internet store and I wonder how to better create the tables "images" and "products". A simpler way will be to have it as one_to_many, that is: images(....., ...
1
vote
2answers
185 views

Dealing with stale data persistence

Currently implemented the model and working on the UI for a scheduling application. This is just an in-house application for work between ~5 people that may occasionally have the application running ...
1
vote
2answers
156 views

Save not-so dynamic data into a database and retrieve with changes in the future

Imagine this use case: I have a class with 50 attributes of which 10 are relationships plus 100 methods which perform calculations and return a value. I need to save that data (including ...
3
votes
1answer
259 views

Read Only Generic data access layer Best practice

I am trying to write some art of "generic" data access library to access the data of my company's ERP Software, which is our main/core application where all our related data is managed. I am a ...
4
votes
1answer
352 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 ...
6
votes
3answers
1k views

Effecient algorithm for data deduplication in procedural code

I have written a data cleansing application which, for the most part, works well. It is not designed to handle large volumes of data: nothing more than about half a million rows. So early on in the ...
20
votes
4answers
3k views

What are the practices you follow to avoid wrong data updates in big databases?

A typical advice before any production deployments is backup the DB first. This way, if the new update has some issue that can lead to potential data loss or logical data corruption, then you still ...
1
vote
0answers
126 views

Location specific caching for read-heavy data (server architecture)

This project will serve many duplicate requests with location-specific answers. I.e. 10,000 people in New York will all get the same server response (a list of businesses in New York), but one person ...
-1
votes
1answer
73 views

How to design classes and db table in right way for recurring Order?

I have requirement like user can booked space (office, room, meeting room etc) for a rent for particular time period. But requirement is like user required to booked space every month 5th date, or ...
2
votes
1answer
82 views

Decouple service complex query building from datastore

We have a very large search service (written in golang if it matters) that runs on top of ElasticSearch, receive requests, builds the correspondent query, and returns the results (with some post-...
14
votes
6answers
3k views

What are the best practices around retiring obsolete database columns? [closed]

I'm designing an application which will in an early stage collect data A, B, and C from clients, but later on will instead collect data A, B, and D. A, B, C, and D are very related and right now ...
12
votes
2answers
346 views

Should I lock rows in my cloud DB while they're being edited by a user

I am creating a desktop application that persists the data in the cloud. One concern I have is a beginning to edit an item in the application and leaving it for a while causing the data to become ...
1
vote
1answer
71 views

Database Schema design of server running status log

I am working with 4 AWS EC2 instances (servers). Each Instance has Instance ID and Instance Name. Instance ID is unique. Each of them having multiple application servers, like on of them is running ...
2
votes
1answer
90 views

Where should my method(s) that connect to DynamoDB go?

I'm a Java developer working on a new module for my app that connects to, inserts, and updates DynamoDB information. For a lot of our projects, I used an MVC design pattern with a service layer to ...
1
vote
3answers
95 views

Architecture - External 3rd Party DB Queries

Our team is tasked with querying an external 3rd Party database to pull information. We don't own the database, so it could change without notice and our queries would stop working. We are currently ...
2
votes
2answers
112 views

Object that can set its own subclass/amend its methods with subclass?

I have a database that stores client data. All data is in one table. For each client, there is one row per day. Clients have different kinds of contracts, their data format remains the same, however, ...
2
votes
0answers
81 views

Idea on replacing DAO/Domain obj pattern

I know someone has probably already thought of this, but here is a way to replace DAOs and Domain objects: For example public class Bike { private int id; public Bike(String model) { //...
4
votes
3answers
300 views

Distributed database algorithm

I have a need for a distributed data store, where existing solutions may not work as the computers these will be running on will be extremely resource limited, for instance 64-128MB RAM. Plus, as a ...
0
votes
1answer
94 views

How to enforce business rules in a hierarchical container structure

So, earlier I asked this question about infinite-depth objects and arrived at using the Composite pattern to model that a freezer contains a rack contains a box and so on and so forth. There's now ...
0
votes
1answer
449 views

Proper modeling and name convention for an intermediate table between intermediates

I have 4 entities: Event, Message, Flow and Document. Event table stores a limited (seeded) number of records. Message has many events and each event can be related to many messages. The name ...
8
votes
2answers
2k views

How to safely run database migrations with multiple app instances?

We have an application that has a mix of both fast (< 1 second) and slow database migrations (> 30 seconds). Right now, we're running database migrations as a part of CI, but then our CI tool has ...
-7
votes
1answer
167 views

Where should I store data related to UI/presentation?

Say, I have a table Categories. On a page I have a header and for each category the colour of a header varies. A colour is of the presentation level and I've heard that what's related to the UI/...
4
votes
3answers
190 views

How do I model Infinite-Depth Objects?

I'm working on a web application that manages specimen freezers so our researchers can manage and inventory all the gross stuff they've made. A freezer looks like this: 1 Freezer +- X Racks +- Y ...
2
votes
2answers
80 views

How this context can be modeled (fullfilling the normal forms)?

I'm a beginner in DB. I have studied some basic examples but now I'm studying more complex cases that envolve many tables related to each other. I'm studying how to model a DB for a conference system ...
-2
votes
1answer
1k views

Databases - Difference between roll-back and roll-forward with example

Kinda new here and also learning new db concepts. I got little bit confused about terms: Roll-back and Roll-forward. I read definitions and thought I understand it. I found some little tasks about ...
3
votes
2answers
402 views

Database Table related to two tables

I was writing an app(learning) and I found this problem. I have 3 table Orders, Customers and Suppliers. An order can only refer to a customer or a supplier and there is no conceptual difference ...
3
votes
2answers
117 views

Is it acceptable to use a surrogate key identifier as a URL parameter?

Example: in the database I have a record such as this: { id: 53, part_number: 'MOTOR-OIL', description: 'Motor Oil' } I wish to use a link that displays this record. I could refer to ...
5
votes
5answers
245 views

How can I store information with varying structure?

I'm having trouble coming up with a name for this problem, but I feel like its been solved before. I think my naiveté is preventing me from typing the right words into Google to get the results I need....
10
votes
4answers
273 views

What are possible ways to avoid duplicates when you can't add an unique index

I'm stuck in a concurrency problem. Is a typical problem where the user sends 2 o 3 transactions to persists some data that SHOULD NOT BE duplicated in the DB, in case of a duplicate record you ...
-1
votes
3answers
670 views

For what kind of websites is it ok or even better to use SQLite? [closed]

I'm familiar with the process of setting up Postgresql. And I'm also thinking of using SQLite for some of my websites for I don't need that much functionality that Postgresql offers. And I also want ...
1
vote
2answers
107 views

Database Modeling Question

I am having a doubt while creating a DB, and I would like to know if there are objective arguments that could help me mak a better decision. Case A project that can have several revisions, so I ...
0
votes
2answers
52 views

A single field or 2 fields for “description” and “content” of Article?

Say, I want to create a db schema for a blog. So far I've used 2 separate fields for "description" and "content" of Article. But I've seen a lot that usually only a single is used for both. The "...
0
votes
1answer
248 views

How should I go about creating a db schema for “news subscription” and connecting it with “users”?

On my website there's a new subscription form. And users can also register and subscribe to news after. When an anonymous user subscribes to the news, how should I better handle that? Should I create ...
3
votes
1answer
205 views

Data access design pattern

I've several cases where a single entity has multiple tables in the underlying database. When reading or writing I want to handle all of the DB queries with a single class for that object, e.g., the ...
2
votes
2answers
68 views

unique varchar(NNN) with an index in database and its overhead

I've seen the url like this domain.com/some-article-title-which-can-be-very-long many times. There's no ID embedded in it. Therefore, in a db it must be defined as "unique article_url varchar(NNN)" ...
2
votes
1answer
3k 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 ...
3
votes
3answers
228 views

How can I mark one of a 1:n relation as the “default”?

I have an "easy" question, but since I am not a very experienced programmer I would like to hear what some of you have to say. If I have for example a Db called MyDb with many tables. Two of them are ...
53
votes
10answers
15k views

When would you use a long, string ID instead of a simple integer? [closed]

I'd like to use Youtube as an example: they use IDs in the form of PEckzwggd78. Why don't they use simple integers? Or imgur.com - they also use IDs such as 9b6tMZS for images and galleries. Not ...
0
votes
1answer
43 views

Is a InMemoryDatabase suitable for store live data?

I'm learning ASP.NET Core 2, with Entity Framework Core. A real use-case scenario is a small management of a production process. I have some persistent table like customers, orders, machines, etc... ...
-1
votes
1answer
57 views

Best Strategy for “clean” data or datatypes for databases? [closed]

I am doing some data scraping from websites, its quite a fairly simple task, getting data from some columns, however, those columns can be empty, strings, or numbers inter-mixed in one single column. ...
-3
votes
2answers
145 views

Is the system with no central storage more secure?

Consider a distributed system S that consists of several processing nodes (N1, N2, N3, ...) and spans the geographical boundaries. S -> {N1, N2, N3, N4 ...} N is more than 1000. now consider that ...
1
vote
3answers
103 views

Deduplicating data during batch processing

I constantly struggling to solve data duplication problems efficiently (storing data from any source to RDBMSes). My main concern is speeding up inserts/batch processing. Scenario: I read data from ...
0
votes
1answer
63 views

How to reference supporting database values throughout code?

How should necessary data that is stored in the database be referenced throughout code? Is it better to reference a numeric, auto-incrementing ID, or a unique alphanumeric key/name, etc.? For example: ...
7
votes
5answers
774 views

Database vs Flat files for rarely accessed data

We are receiving realtime data from over a 1000 sensors, each of which sends a data point every 10 seconds in average, which is amounting to about 1 million rows of data every day. Our system gives ...
-2
votes
2answers
275 views

What does it mean to “wrap” a stored procedure?

My manager has asked me to "just wrap the stored procedure". The requirements are to create a microservice that will do the following: Accept parameters from the user. Pass those parameters to the ...
0
votes
2answers
651 views

How to design a database that stores large json objects

I'm wondering the best approach to designing a database for storing crossword json data. As the website is at the moment, the frontend view just needs to be passed the whole object to render the ...
1
vote
3answers
1k views

Which is a more efficient way of storing data in a database using Objects or strings (Database design)

Which method is better to store the data in a database and why? Here is a restaurant example. I'm using a SQL database and JSON to communicate with the database. Imagine each row is a column in a ...