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

learn more… | top users | synonyms (1)

0
votes
4answers
62 views

Standardizing data extraction

I'm part of a team asked to perform some predictive analysis with a huge relational database. Data is a mess. Documentation ranges from mediocre to incorrect to absent. Information is scattered all ...
-1
votes
1answer
26 views

Find which form field points to which database fields in MS Access

Let me explain the WEIRDEST requirement, we're scratching our heads for: We have an MS Access VBA application with thousands of forms fields in hundreds of forms. A few fields in these forms ...
0
votes
2answers
96 views

Struct “prototypes” in (plain)C?

As the title says, can it be done? struct Room{ char *type; //Lecture hall, laboratory, etc. char *name; int *capacity; //How may people it can hold struct Building *building; }; ...
1
vote
0answers
49 views

How do you design your software that updates several microservices, if one of them fails?

Is there a design pattern or practice I can use to help with services that are either down or go down, while others are stable? What if I have three microservices, and two of them are good, and one ...
3
votes
2answers
97 views

Nested transaction management .NET

I have an asp.net core project that is divided into the following structure Controller Store Repository The controller receives requests, and calls the correct Stores that are responsible for ...
0
votes
0answers
23 views

WCF Windows Service with plugin pattern, accessing several webservices and a database

I'm redesigning a WCF Windows Service (InstanceContextMode.Single) which was created by an external supplier, while it was super urgent and when there wasn't really much time to design the software. ...
1
vote
1answer
48 views

Gateway Pattern and Composition

I often write database intensive applications and discovered the gateway pattern which seemed to fit my needs. My problem now is that many of my models are compositioned of other models. For example ...
-4
votes
3answers
135 views

Is there any way to build a tamperproof forum like Reddit? [closed]

Following the recent incident on reddit (viz https://www.reddit.com/r/The_Donald/comments/5ekdy9/the_admins_are_suffering_from_low_energy_have/dad5sf1/) where the CEO of Reddit changed content of ...
1
vote
1answer
68 views

Request data from Wikidata every time or save it in database?

I'm working on web application, which gets Wikipedia data from Wikidata (such as description, image, Wikipedia link) and shows them on the page. I see 2 ways of making this: Upload requested data ...
0
votes
1answer
43 views

Categorizing columns in a database table

I wanted to know how do people generically think of, in a data base table: Columns that people are expected to use mostly for grouping expectable of groupability. Columns that people are expected to ...
-1
votes
0answers
40 views

What are some open source database engine that one can go through to understand the internals of a database engine [on hold]

My goal is to understand the internals of a database engine, specifically I would like to understand the internal data structure representation and the common engineering patterns for implementing ...
0
votes
3answers
85 views

How should a matchmaking app store matches for each user?

What is the most efficient way to store each users' matches in a matchmaking app/website? Given the complexity of these kind of algorithms, is it reasonable to calculate the matches all the time, on-...
5
votes
6answers
286 views

Store area as square feet or square meters?

In the context of houses, should area be stored as square feet or square meters? The area of the largest houses in existence are greater than 32000 sqft, so a 4-byte integer may be required to store ...
1
vote
4answers
152 views

How to keep permissions of users in a database?

What is the accepted way of keeping track of a user's permissions in a database? Say I have a web app where users can pay for privileges. To use a straightforward analogy, imagine Github's users (...
1
vote
1answer
113 views

Storing Local Filesystem Paths in Database

I'm developing a webapp where I have sets of data stored locally on my computer and I run a tool which transforms the data and uploads it to my webapp. However, I need to be able to rerun the tool on ...
3
votes
1answer
63 views

Implementing unit-of-work for multiple storage types

I'm trying to implement the unit-of-work pattern for mutliple storage types like the windows registry, a database or the app.config but I cannot figure out how to do it. All examples I find use Entity ...
8
votes
3answers
287 views

Is the age of domain logic in databases over? [closed]

I recently stumbled upon this opinion from 2016 saying that there is still case for domain logic in database. I thought that this is totally obsolete. I am just wondering if the guy is still living ...
3
votes
3answers
170 views

Best Practice regarding table schema

We are discussing in team regarding best practices. For eg. there are three tables Users Groups Teams A user will create a request to join a Team or Group or to follow a Private User. A request ...
3
votes
2answers
33 views

Composite-keys in multi-tenancy application for administrative actions

I've designed a single-instance database for a multi-tenant application which uses composite-keys to enforce tenant-segregation at the database-layer (thus preventing incorrect 3rd-degree relations). ...
1
vote
1answer
33 views

Building a Model using MVC 5 optimally that is Database friendly?

I'm using MVC 5 Core on my Web API and I wanted to know what is the most optimal way of storing an Array into a database? Should I store Arrays, does it matter, or should I parse the array and input ...
-2
votes
0answers
73 views

Question about security of php login page

i'm working on a CLI open sourced project who generates Virtual Hosts for apache 2. But i understand that using command line is less practical for some persons than using a web panel. So i decided to ...
-1
votes
1answer
73 views

Do I store blog posts in a database? And how do I continue to make posts?

I'm trying to make a simple blog from scratch, but it occurs to me that I probably shouldn't have a bunch of static html pages that I link to, especially since I want the home page to be a cascade of ...
0
votes
1answer
45 views

Storing user search terms

I have php application like airbnb. I want to store search values each time user search for listings. my number 1 solution would be storing it in mysql table, but I'm not sure its wise to do, if site ...
1
vote
1answer
46 views

Database rollover handling patterns

I have a question regarding the design of an application where the database system has a rollover. To clarify the context : the database system (a cloudant instance) is fed with sensor data by an iot ...
0
votes
1answer
49 views

Fast and memory-optimized checking for values in database using php

I have a function to generate n random string with the same length, making sure there isn't any duplicates, and then saves them to the database. Right now, to speed things up, first I get all the ...
0
votes
0answers
59 views

Creating an autoupdate for my program and its database

I've already an offline updater as a download but I want to make it automatically. It's a client/server software and a ms sql database. 3 parts have to be updated: update of a proprietary software (...
0
votes
3answers
44 views

Predefined city/country list vs manual entry for address table

I'm trying to design a database for my POS application and have stumbled when trying to create an address table. I'm confused whether to have city and country tables with predefined values and link ...
0
votes
0answers
40 views

How to implement ETL with MySQL?

I have a legacy MySQL Database (A), and a new reviewed structure for MySQL data base (B). Problem number one is that Database has to be alive and keeps receiving data from legacy apps. What I need is ...
5
votes
3answers
99 views

How to enforce the mandatory participation constraint at the many end in a one-to-many relationship?

Say I have the following ER diagram: Enforcing the mandatory participation constraint at the one end is easy, I simply make the foreign key (school_id) in Student NOT NULL. But how can I enforce the ...
0
votes
2answers
48 views

Modify existing column or link to what the change is?

I am making a game. In this game people can modify a value of an object. Let's picture it like so. House is the object price is the value Mold is the modifier Should I reflect changes to the price ...
1
vote
1answer
121 views

Dashed line in Crow's Foot notation

I am learning about the Crow's Foot notation, and there is something that I don't understand, some tutorials shows an Identifying Relationship as having a straight line, and a Non-Identifying ...
0
votes
0answers
40 views

concurrency in hierarchical filesystem databases

I am writing a small program that is a client of some protocol. I wanted this program to have a filesystem database. the main directory would contain one directory for a server that is configured, and ...
5
votes
6answers
285 views

Disadvantages of using a nullable foreign key instead of creating an intersection table

Say I have the following ER diagram: Now if I represented the relationship using a foreign key of School in Student, I could have NULL values (because a Student is not required to belong to a School),...
1
vote
2answers
80 views

Java application - How to optimize database calls and space & time which is more important?

I am writing a simple Java app to run weekly. The app need call database to get data, check it and update. The flow I need is little as following: select configure,orgID where status=true from orgs; ...
5
votes
3answers
71 views

Valid uses for DEFAULT clause in a table column definition, besides sequence nextvalue()

In a recent question, there's a debate whether or not an arbitrary default value in the definition of a column in a table is considered having business logic in the database. As we know, if an insert ...
3
votes
3answers
118 views

Can a default value for a business process be set in the database column definition?

The business team in my company has come up with a new field to add to one of our entities. For new instances of this entity, it'll be calculated dynamically, but for previously existing instances, we ...
0
votes
0answers
29 views

Bidirectional database sync

We are currently developing a mobile application with Xamarin.Forms. Now we need bidirectional syncs with our existing SQL database. Azure provides a great way to do so, but as far as I see, you have ...
1
vote
1answer
66 views

Delete user data when they sign out?

Im writing an app, and I would like users to have the ability to sign in across multiple devices and still have their data. My question is, when the user signs out of their account on device X, should ...
1
vote
2answers
64 views

Design question - storing data twice

I have a polyglot database solution that includes the following components: a management interface that consists of a web application and a document based database (either rethinkdb or mongo) a ...
5
votes
1answer
50 views

Best strategy for creating/updating CI build database

I was wondering what the best practice is regarding databases for integration tests on the build server. If there is a best practice. Currently, our build will create a new database from scratch for ...
0
votes
1answer
27 views

Redundancy in object data storage

In the relational database world, we would tend to store unique pieces of data uniquely (e.g., in a single table, for example). However, now, with object stores (e.g., Firebase) it seems like storing ...
0
votes
1answer
48 views

Transferring changes to production database

I have a website that's running on a production server, backed by mongodb. Every hour or so, some new data becomes available that I want to add to the db, inserting new documents, and updating old ...
0
votes
2answers
103 views

Notifications in a microservice architecture: In Application Logic vs. Database Triggers

Context Our group builds and is responsible for maintaining multiple apps for a larger institution. We are in the process of breaking up our monoliths into reusable microservices (hooray!). When we ...
1
vote
1answer
68 views

How to use object oriented principles to design a system that trims, selects, and formats values based on business rules, and unit measuring system?

TL;DR: I have bad, no .. horrible, horrendous code that kind of works but is a mess and is not easily maintainable. I want to redesign it and repackage it to where objects are well defined and ...
4
votes
1answer
55 views

Fast Upload/Retrieval For Blob Data Solutions

Problem I am currently investigating a solution to allow fast upload (and retrieval) of data that can be implemented via NoSQL/SQL or a file system on a Centos server with 64 core cpu with 529GB of ...
4
votes
3answers
167 views

How to DRY with calls to a database to execute?

I'm writing a python app that instructs a database to perform various processing instructions on partitioned tables. The processing can take long enough that there might be a timeout, so I surround my ...
1
vote
2answers
93 views

Evaluating the cost of a query in database

We are working on a project using Google App Engine + Google Cloud Datastore. The language used is Python. At some points of our API, we check if some arg is passed in request, and we make some query ...
5
votes
4answers
237 views

How to handle fast data generation vs slow data storage efficiently

I'm working on a project that generates massive amount of data and store that data in a SQL database. I'm talking about like 1 thousand records per second. Next I've to push that data to a database. ...
31
votes
6answers
4k views

Why is SQL the only database query language? [duplicate]

For general-purpose programming there are literally hundreds of programming languages. But for interacting/querying the databases, why is SQL pretty much the only used language?
-3
votes
1answer
77 views

Is there any benifit to using a PHP class to handle MySQL queries?

I know several frameworks have this functionality built in where you can use their special methods to make DB queries. I also know this is (partially) to ensure that everything is handled correctly to ...