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

learn more… | top users | synonyms (1)

1
vote
2answers
45 views

How should I setup a database for school management?

I'm struggling to set up a database to use in my School Academic system that is supposed to record all student's scores and then be able to prepare a report that shows students ranks. The hardest ...
0
votes
0answers
12 views

How Do DB Version Control Systems Lack in Script Semantics When Modeled on Souce/Target Difference Comparisons

There are several database version control solutions out there to assist with controlling not only the versioning of a database, but also deploying and synchronizing databases. These systems are ...
0
votes
0answers
9 views

How do I implement Socket.io Leaderboard using AWS Dynamo DB cost-effectively?

Every time a user submits a score, Socket.IO causes all the users get their leaderboard updated. This causes every single user connected through Socket.IO to read from the Dynamo DB database (every ...
-1
votes
1answer
172 views

What's the best way to populate a new row in a database?

Is it possible to add a new row to a database using DataSet? When I created a new DataSet and dragged the table from the database I could see that in the DataSet methods there was one called insert ...
0
votes
2answers
158 views

How should I architect my back end based on these needs?

I haven't started building my back end yet but I need to now. My needs are the following: Database needs to be holding millions of game information (just info that can be stored in a typical db ...
2
votes
1answer
73 views

Implement pagination which memorizes where we left off?

Let's pick a relation database table (say an audit table) with high write rate. We can display 100 records at a time. But as a user don't want to see some the records on page 1 on page 2 when a couple ...
0
votes
4answers
49 views

Including record data in the ID number

I'm working on a project that requires assigning ID numbers to records about people in a database. Each person may have many records associated with their ID number. There was a discussion about ...
1
vote
2answers
44 views

Multiple local Oracle XE instances

We need separate local databases per developer and per release/subproject on the same remote machine, as we are utilizing it for all the development activities. How is it possible to make it with ...
0
votes
0answers
62 views

Generating reports from large datasets

I'm working on an CRM type application(.NET, SQL Server) that needs to generate reports from large datasets, millions of database rows in a dozen different tables with a lot of aggregation and logic. ...
2
votes
1answer
67 views

Building an abstraction database

The Scenario I have a Classic ASP project with a SQL Server backend that I need to port to ASP.NET MVC. The legacy site makes liberal use of schema definition analysis in the application itself. ...
1
vote
2answers
32 views

Using table record id as an image name

I have a table where each record has a corresponding image (say the table is users and the image is the profile image. I am saving the images in the file system. I am thinking of using the table ...
1
vote
1answer
324 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) ...
4
votes
2answers
175 views

Is it okay to use a non-ID column for foreign key reference?

I have my tables as below Role(Role ID, Name, Other_Columns) Command(Command ID, Name, Other_Columns) I have association table RoleCommand. Is it okay to have RoleCommand(RoleName, CommandName) ...
1
vote
1answer
38 views

How to synchronize data between two web services

I'm currently working on a project consisting of two different web applications. One of the applications is a PHP web server with a website front-end and a MySQL database. It consists of Laravel ...
8
votes
9answers
324 views

Is it unnecessary to learn the kind of data structures and objects inside sql only because we are using another language to access db indirectly?

Suppose we are using java or python to access the database. Then is it considered a wastage of time and unnecessary to learn the kind of data structures and objects being used inside sql? Please ...
-3
votes
0answers
50 views

Status update according to time set in database

I am new to php and phpmyadmin, I am currently working on a project to build a website for employees to update their in/out status. I have created webpages for admin to add users and let users to ...
2
votes
2answers
76 views

How to create an efficient implementation of a dictionary of synonyms?

How do I create a dictionary of synonyms that is efficient in terms of retrieving synonyms of a word? Basically, I want to use some sorts of data storage to store groups of words, and enable an end-...
4
votes
2answers
103 views

Is my database supposed to contain the links to the files, or would it contain the files themselves?

I'm trying to better understand how to use a database in a personal website. I have a set of lists, like my shopping list, to-do list etc. Currently, they are all stored in text files with hard-...
-1
votes
0answers
42 views

C# WPF Application with Entity Framework : How to manage multiple connections

An other developer and me have a C# WPF application which use the Entity Framework for handle the database. The main goal of the application is to manage differents reports that can be created, ...
2
votes
0answers
81 views

Logging Database Changes

What is the proper way of storing a changelog, similar to git, for data in a database. Currently, I have it set up so that every line in a table is given a unique string id that is used to ...
51
votes
6answers
17k views

How much business logic should the database implement?

I've worked in some projects where most of the business logic was implemented on the database (mostly through stored procedures). On the other side, I've heard from some fellow programmers that this ...
1
vote
0answers
70 views

high-dimensional index structures

I'm looking for information on searching (filtering) high-dimensional data. I'm not interested in nearest-neighbour search or clustering, but rather filtering/sorting by subset of dimensions - like in ...
0
votes
0answers
18 views

QSqlDatabase member inside QRunnable - yes or no

I am working on Async multithreaded Tcp Server in Qt and I am wondering, which approach is beeter: To encapsulate QSqlDatabase as member inside QRunnable To create local QSqlDatabase variable inside ...
3
votes
1answer
96 views

Executing queries against multiple separate database instances

Premise I have a number of database servers (different DBMS instances, installations in different physical locations), each of them contains data and uses the same schema. Most of the data is ...
5
votes
4answers
381 views

Is it good practice to use a single database connection?

The PHP codebase I'm working on has an utility class that returns a database connection. The implementation looks like this: class Database { private static $conn; private static $init = false; ...
6
votes
4answers
357 views

Best practice for getting last record inserted in DB

Me and a couple of colleagues are having a discussion regarding the following case: In an OrderStatus table we're keeping track of all the statuses an order goes through in time, including "Pending",...
4
votes
1answer
278 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 = Data.fetch(req.params....
7
votes
2answers
2k views

Database Schema for Pricing Products (packages, promotions, qty based, limited time offer…)

I'm working on a new point of sale for a company that products for different prices depending on the product mix. All products have a base price. To explain my problem, I will use the following info:...
1
vote
1answer
40 views

ERD for a Lab Database

Question: In a database for a clinical reference lab a specimen, when taken, triggers a test order (for testing obviously) creation.If that test order produces a failure, the specimen is given a new ...
-1
votes
1answer
70 views

Sql vs nosql important data [on hold]

In one of youtubes videos about scalling web sites I found the statement that, however, in term of scallability, noSql is easier and more flexible, though it is better to use SQL for data important ...
1
vote
3answers
68 views

Updating all records in MySQL table while still available to the user

I have this 'table A'. It contains two columns; email and email_alias. A sample is below: ===================================== = email | email_alias = ========================...
3
votes
3answers
52 views

Shared development and CI database

I'm just about to set up CI for my web application. I'm using Bitbucket and Pipeline beta as a CI. The web application is strongly coupled to the database, nothing can be tested without data in it. ...
-1
votes
2answers
200 views

Why use using-statements when you want to reopen connections? [closed]

In a Winforms project I've been working on recently, I've been dutifully using using-statements for objects that implement IDisposable. I want to reopen a database connection, however because the ...
0
votes
5answers
144 views

Best approach to write on a database with two webservers

I have an architecture/performance problem. The problem: One voting based application with: 1 loadbalancer, 2 webservers and a database 10 candidates and 200k voting users. There may be more than ...
1
vote
0answers
41 views

How to deal with weekly schema updates on database production server? (ASPNet MVC and Entity Framework)

I'm working with scrum methodology. thus weekly schema updates are performed to the final product. However our customer is already populating the database. How can I update the database without ...
1
vote
1answer
158 views

What is the correct reusable architecture using Entity Framework for common database tables and services?

Context I have a line of business application "MyApp" in C# using EF. Layers are separated as MyResusableLib.DataAccess // Class Lib: EF based utils, extension methods, MyApp.DataAccess // Class ...
4
votes
3answers
3k views

Separation of retrieving data and business objects between DAL and BLL Layers

I did some research before posting this question. Among other questions or post, one of those is provided below. I could not get a clear mind how to determine.. Business Objects within a Data Access ...
0
votes
1answer
30 views

Design question to best option for storing data in file or DB

I am working on a feature where I need to store some data and I am not sure what should be my best option to store this data. I am sending data to some third party and want to show some part of that ...
36
votes
8answers
5k views

Why would you store an enum in DB?

I've seen a number of questions, like this, asking for advice on how to store enums in DB. But I wonder why would you do that. So let's say that I have an entity Person with a gender field, and a ...
1
vote
0answers
59 views

Saving tabular, spreadsheet-like data in a relational database?

I'm hoping this question isn't too broad or too prone to opinionated answers, since I could really use some pointers. I'm trying to come up with a way to persist tabular, spreadsheet-like1, data in a ...
6
votes
4answers
239 views

Is it too verbose to always have 'modified' time stamps on all entities within a database?

The question can be summarized as: In a database (regardless of type), would it be considered a good practice to always include updated, created (and possibly deleted) properties, for all entities,...
2
votes
1answer
139 views

Reporting and handling asynchronous process errors to a client

I have a product with two separate applications. The core of the product lives in the database (oracle) and runs according to a schedule. The other is a client application (currently ASP.NET MVC3) ...
7
votes
5answers
743 views

How do I balance 100 clients checking the same database table in a loop?

What I have This is a prototype. I have a pool of 100 clients connected to the server via websockets reporting things and awaiting for commands. The server polls the commands database table of type ...
1
vote
0answers
43 views

how to store state, cities and countries in Neo4j

I'm a building a registration form for my website and need to populate the country, state and city field. All these fields are inter-linked i.e depending on country, state field will be set and ...
0
votes
0answers
17 views

managing database update effectively

I developed a small app using sqlite starting from version 1. From time to time, new features are added to the app which requires database modification in the dev machine. On the client side however, ...
0
votes
1answer
94 views

js spa rest backend business logic vs presention logic

I am very confused about what should a SPA's REST backend do and expose. In most blog posts and books I read they depict the backend pretty much like a direct access to the DB, practically CRUD ...
0
votes
1answer
22 views

Terminology for partial offline database synchronization

I am looking for solutions for a field where I think I don't know the adequate terminology. The problem is that I have a central SQL database in the cloud. Then I have child databases only containing ...
2
votes
2answers
183 views

Configurable tables in SQL database

I have the following tables in my database: Configuration Table: ====================================== Start_Range | End Range | Config_id 10 | 15 | 1 ============================...
4
votes
3answers
442 views

OOP and relational databases [duplicate]

I see a lot of talk in the OOP world about principles and laws such as Open/Close and Loose Coupling, I can understand how they are so high valued, However I seem to have ran into a problem with ...
19
votes
6answers
3k views

Advantages and disadvantages of using bit masks in database

Not so long ago I talked to my colleague and he was definitely against using bit masks because it is hard to understand all the values that are stored in the database. In my opinion it is not always a ...