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

learn more… | top users | synonyms (1)

3
votes
2answers
166 views

Why do famous CMSes use string flags in the database instead of integers?

I've been browsing SQL dumps of some famous CMSes, literally: Drupal 7, Wordpress (some quite very old version), some custom application based on Python. And all these dumps clearly show that data ...
-1
votes
1answer
36 views

Qt connection Sql Server (universal connection string)

I am developing a software to connect to sql server. The problem is, ¿i don't know wich sql server is used?, and my question is ¿if exist a universal connection String?. I read many cases and in ...
1
vote
2answers
282 views

.NET Why should I use DAL over direct database access

Yesterday on one of SO chats I've been told I should never connect to database directly from the application and rather use DAL. I've been told that: 1. Using something in the middle should improve ...
0
votes
0answers
15 views

web app+databse+object store E2E testing

I wrote a thin layer that allows me to log every interaction between other programs and object store. It has simple logic to accept and serve only unbroken files(if checksums provided by user and ...
0
votes
0answers
18 views

DataStore for Certificates and Keys

I am developing a web application. It is a multitenant(SAAS) application. My application involves getting signed certificates from users. Obviously each certificate would be having a separate CSR and ...
-2
votes
0answers
18 views

SQL code gives an foreign key error [migrated]

It's my first time posting in here and I'm a bit stuck with a small piece of SQL code. Hopefully one of you master programmers have a solution to it. I have set up a Wordpress childtheme and I am ...
1
vote
1answer
63 views

Java partial enum backed by the database

I have following problem: need to use enum in my java code, since I'll have to ask in my business logic things like if(someting == enumname.VALUE_ENUM){... but I don't have all the enum types at the ...
0
votes
0answers
23 views

Fast comparison of recursive directory tree against a database?

I'm creating basic media player in the style of foobar2000. I want to load Id3 tags into a database because scanning whole directory tree every time is slow. The problem is, when user changes ...
0
votes
1answer
55 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 ...
1
vote
0answers
59 views

how to import large amounts of data without locking sqlite database

Background Information I have a web app that provides the user with the usual CRUD functionality for "widgets" let's say. But I also have give them the option of creating widgets in bulk via ...
2
votes
1answer
47 views

Reuse already fetched data for request

I have action that fetches user model from db to check access. Then I have method that in some cases requires same model. function checkAccess(req, res, next) { var data = ...
9
votes
4answers
810 views

Class Duplication Pattern?

I'm currently working as a solo developer on my current project. I inherited the project from another developer, who has since left the company. It's a model-view-controller style web application in ...
0
votes
1answer
28 views

How can I approach application programming from a database background? [closed]

I have a lot of database experience, but virtually no application programming experience. At work, we have an EDMX? model generated from entities in the database, and we transform T4 templates to ...
3
votes
3answers
106 views

Is it better to make database calls or external API calls first in the context of a single Web request?

Say you have a Web app that uses data from both a database and an external API, and for certain pieces of functionality, you need to call in to both in order to read/write the necessary data. Is it ...
0
votes
1answer
36 views

Making API calls with celery

I'm designing a system for a client where the requirements are: they upload a JSON file (one object/line) make a call to an API with the JSON object as the payload record the state (success/failure) ...
3
votes
1answer
33 views

Should I omit database and server communication (after initial response)?

I have a project that I'm working on where a user uploads a big file which gets parsed by the backend, and then returns the data back in a friendlier format. Now I'm wondering whether I actually need ...
0
votes
1answer
141 views

Java front-end, PHP/MySQL back end methodology

I have been basically out of the programming world for about 10 years, with only a bit of dabbling here and there with small Java utilities and one large Access database I wrote for someone, and some ...
1
vote
1answer
41 views

filtering data from db

I've taken over a web application that someone else built. It's a pretty simple application that queries ALL records from a db and displays them in a list. They've also provided a way to 'filter' the ...
2
votes
1answer
67 views

In what case would indexedDB be useful [duplicate]

I have been over-viewing indexedDB recently, and I cannot seem to find a suitable use case that would not be better done using a server side database. Since the little hackathon competition I'm doing ...
38
votes
7answers
4k views

Does using a database server make sense if the application only does things locally?

I've seen some applications that are basically application software that run local to the system (so they don't have communicate much over the network). These applications seem to depend on database ...
-1
votes
1answer
43 views

What tools are there to create/generate a full stack dev project? [closed]

I'm starting to develop a new project and I'm looking for a tool to generate all the needed layers for a full-stack dev project. I'm looking for a hello world generator that provides all the ...
1
vote
2answers
108 views

Database Design for Inventory

I am starting to design a typical product based MySQL database but I keep running in circles on how to design the tables. I have many types of products Jeans Tshirts Dresses Which have many of ...
1
vote
1answer
68 views

How do auto generated stories/news articles work?

So there seems to be a new trend of auto-generated stories, a concept which I am struggling to understand. For instance, this article seems to indicate that sports articles will henceforth be written ...
0
votes
0answers
20 views

Is Event sourcing a good fit for database sync (master-multiple-slaves)?

I'm looking for a good way to maintain in sync local sqlite databases that could be offline to a master one, for a invoice app. Then I read about EventSourcing and Log structured storage and wonder ...
1
vote
1answer
80 views

is there a cleaner / simpler way to code this? [duplicate]

I have a web app that uses ajax to filter db results. So if you have a list of 1000 widgets, that have IDs ranging from 1-1000, by typing numbers into the ID field, you can narrow your search. ...
2
votes
4answers
263 views

How to optimize the application with huge number of database requests per minute

I have to provide free demo of some service to end users in my application. Free demo could be of 30 mins, 1 hours, 5 hours etc. (predefined time) for a new user for one time only. User can also ...
1
vote
1answer
109 views

Am I planning my database/backend correctly?

I'm an iOS developer and to be honest I'm not really looking to become a database expert right at this moment, but I do need to know how to properly plan out what I believe to be a pretty cookie ...
0
votes
1answer
102 views

How to structure programs that interact with databases? [closed]

I've just finished a book on MySQL and I'm in the infantile stages of learning to couple that with Java. I know that the technology I need to learn is called JDBC and that it essentially allows you to ...
0
votes
1answer
84 views

Making a database and related operators using files and JSON in java [closed]

I'm trying to write a program that reads operations from a file. these operators look like below : CREATE TABLE student(id:integer, gpa:decimal, name:string, family:string,isMale:Boolean) INSERT ...
0
votes
1answer
129 views

Using XML to store and edit data records in Java

I want to use XML to store data for an assignment . In this Java assignment I'll get data from the user in form of lines in a file below INSERT INTO student(id,name,family,isMale) VALUES ...
1
vote
1answer
26 views

Sequencing distributed tasks with a distributed DB

Background I have two separate processes, WriteIt() and ReadIt(). One creates records, and the other processes the records in a DB cluster. Once WriteIt() creates a record, it queues a ReadIt() ...
0
votes
0answers
26 views

Is Python Logging in a WSGI application a best practice a production environment?

I am trying to log my webpage access to a database. It is a requirement. It seems to be a difficult thing to do outside of Windows IIS, and I do not wish to use Python with IIS. My options seem to ...
2
votes
4answers
232 views

why do people do REST API's instead of DBAL's?

At the past two companies I've been at REST API's exist for querying data via a web app. ie. instead of having the web app do SQL directly it calls a REST API and that does the SQL and returns the ...
2
votes
1answer
178 views

Integration testing and database connection string in app.config

I am working on a project where SqlConnection is created via a static method, lets say it's DatabaseAccess.GetSqlConnection(). This method reads the .config file to get the connection string and ...
2
votes
1answer
340 views

How should I handle database failures in a web application? [duplicate]

I'm developing a simple RESTful API using Go's Goji framework (although this question is language-agnostic), in which parameters from the URL are queried against a PostgreSQL database. Here's how it ...
0
votes
0answers
55 views

Abstracting the data in a relational database. [duplicate]

While working with data, which is in a relational database I came up with this issue. At first, I was just writing helper functions to retrieve A SPECIFIC data I needed for the current problem but it ...
0
votes
1answer
40 views

Recurring database migration

I'm importing data from older website to new one using database migrations. I have created first as one of first steps of development phase of new site. Then I planned to create another one, that will ...
0
votes
2answers
116 views

Getting to know my way around a database with hundreds of tables [duplicate]

I'm new to a small company that's pretty much run by one guy. He knows all the ins and outs of the system which is quite large. We have a database with about 300 different tables. I'm struggling to ...
4
votes
3answers
150 views

Algorithm that generates a group of men and women who are each interested in everyone from the other gender

In my dating app, I need to compile lists of men and women where all of the men in the list are potentially interested in all of the women in the list, and vice versa. That is, in a list of 10 men ...
0
votes
1answer
41 views

Tags DB structure - tags table using one join and GROUP BY, or pivot (join) table using two joins?

I'm implementing tags into my question and answer application. Users will be limited to the tags available by the app, so they can't choose their own. So maybe only 30-50 tags will be available. This ...
12
votes
5answers
1k views

How come the computer doesn't have to read the entire table when the column is indexed? [duplicate]

Let's say a table with two columns has 100 quadrillion records. And I want to find a record that has column #2 equal something. If column #2 is indexed it returns the result immediately, but if it's ...
1
vote
1answer
80 views

How to minimize database deadlocks in a load balanced web application?

I'm working on a web application hosted on multiple load-balanced web front ends (WFEs). This application has an API method that performs a database query and returns the results. This query only ...
0
votes
0answers
61 views

What is the design pattern name for a class that handles 2nd level caching? [duplicate]

I have a system where I want to start introducing some 2nd level caching. I want to abstract data access a bit and allow some type of other class to do the dirty work of fetching a DTO; it will check ...
0
votes
1answer
40 views

Planning complex Mongo (And possibly other NoSQL) Databases

There is no "right way" to do anything, but there are "better" and "worse" ways, as well as true and tested ways. I'm studying Mongo and considering it for a project. It's gonna start small but ...
1
vote
0answers
61 views

How to off load DB & API calls (PHP Heroku App) [closed]

I took over support for a PHP app that runs on Heroku. After analyzing the performance with New Relic, I'm noticing that the three bottles necks are the database and API calls to outside services. ...
2
votes
1answer
103 views

Strategies for handling or avoiding race conditions

I'm working on a .NET application where I off-load my DB work (save operations) to a separate thread (inspired by how NodeJS handles IO operations). A save operation comes down to this (using Entity ...
5
votes
4answers
279 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 ...
0
votes
0answers
79 views

Hybrid Apps and Storage - how does it work with Native apps and which to use?

I'm using Ionic at the moment. I believe, like many others, that hybrid apps will become more more common/important than they are now simply because the frameworks are getting better and better. ...
0
votes
0answers
37 views

How can I model this scenario in a graph database?

I'm developing an application where users can tag resources and it's also important to know who tagged the resource with a specific tag. A graph database seems like a good fit for this and the rest ...
3
votes
4answers
136 views

How to save many changes to database data?

I'm working on a feature which will pull many (say, 1000-5000) rows from a database, display them to the user and allow the user to edit them. This editing may involve changing text; adding rows at ...