This tag is for general database questions; if you question is specific to SQL use that tag instead.
-2
votes
0answers
18 views
What are some open source database engine that one can go through to understand the internals of a database engine
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
71 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-...
4
votes
6answers
200 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
122 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
96 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
49 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
224 views
Is the age of domain logic in databases over? [on hold]
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
127 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
29 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 ...
-1
votes
0answers
57 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
69 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
44 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
48 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
56 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
43 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
39 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
95 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
97 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
273 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
67 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
117 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 ...
0
votes
1answer
51 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
63 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
49 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
26 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
40 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
83 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
67 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
54 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
165 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
92 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 ...
0
votes
2answers
123 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
76 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 ...
0
votes
0answers
26 views
Best method in order to search, filter, or load items in a mobile application?
I want to design a mobile application in which users who have already registered are able to add/delete some human skills in their profile page. Skills are categorized hierarchically as a tree: each ...
0
votes
0answers
21 views
A proposed method to handle some specific requirements of a mobile application
I want to design and implement a mobile application in which:
Users who have already registered are able to add/delete some human
skills in their profile page. Skills are categorized hierarchically:
...
-1
votes
2answers
92 views
Relational or non relational database for my described application?
I want to design and implement a mobile application in which:
Every user who have already registered is able to add new news
(including title: text plus a picture, and content: long text,
pictures or ...
0
votes
1answer
57 views
Where to format number strings? Server or browser?
I am storing numbers in my database without formatting (e.g., 1434587). But I need a formatted string in the UX (e.g., $1,434,587).
Is it better to store the raw number AND the formatted value in the ...
1
vote
0answers
27 views
Should I implement an intermediate Profile table now, or wait until if/when I need it?
Traditionally the schema is very simple:
User <- Post
I have written the code for a Profile model to be an intermediate:
User <- ProfileUser -> Profile <- Post
When registering for the ...
0
votes
0answers
24 views
Modeling database to store files and search its content
I have a functionality which I must deal.
The requirement of a project is to transform papers to pdf and store this files.
The main functionality is that the user is being able to search words in the ...
-1
votes
1answer
100 views
How to handle legacy versions of DAL and Database?
Lets say you have a Database, and a Data Access Layer (DAL)
The DAL will be consumed by a various number of products which access the Database.
As time goes on, you add new fields and tables to the ...
0
votes
0answers
35 views
Best practices in finding nearest features vectors for OpenFace representations
I am trying to implement a face grouping application that will group faces based on similarities using OpenFace.
OpenFace generates a 128D unit hypershpere representation vector that represents the ...
3
votes
1answer
93 views
Should I have a single Microservice Instance when there are several versions of the same database
We have 25 instances of the same database facilitating different production plants in our organization. Basically, location X uses it's own copy of the database, location Y uses it's own copy, etc. ...
1
vote
2answers
110 views
Use (numeric) IDs over names as unique key?
I have a set of data (assume they are objects) with unique immutable names, like this:
class Datum {
final string name
// other fields
}
Considering that:
I don't need to support rename. (...