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

learn more… | top users | synonyms (1)

13
votes
3answers
3k views

Store images in the database, or in files with a database link?

Is it appropriate to store the image files in the database? Or it would be better to store only the path of the file in the database, while keeping the file itself on the server? Are there any other ...
3
votes
2answers
576 views

Is a bad practice create database structure on the runtime?

I'm creating a crawler app that will always, in the beginning, when the Class constructor, ensure that the basic database structure exists. Is this a bad practice? What is the advantage OS creating ...
1
vote
3answers
76 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 = ========================...
0
votes
1answer
31 views

Read/Write third party SQL Server database

One of my customers has a licensed software for business management and uses a SQL Server as database server (The database is open and I can run queries). They have a need that the current software ...
-1
votes
4answers
123 views

When should we use MongoDB?

MongoDB is a NoSQL database which I've found quite easy to use. Recently I had to develop a simple application which needed to collect some data using HTTP requests and store some results after ...
3
votes
1answer
69 views

What is the proper way of editing/updating many-to-many items in DB?

I have film's storage (3 tables in database): films{id:int, film:string} genres{id:int, genre:string}, films_genres{film_id:int, genre_id:int, probability:int(%)} (film_id, genre_id) is UNIQUE KEY(...
-1
votes
0answers
24 views

difference between clustered and non clustered indexes

How is clustered index diffrent than non-clustered index. I understand that clustered index will store data in the sorted order of indexed column in secondary memory. Please see below table that ...
-2
votes
0answers
25 views

Need suggestion for decision table/filtering implementation [on hold]

Need SQL suggestion for data filtering. Column count can grow. Decision table A | B | ... | Value ============================= x y ... 1 empty y ... 2 x ...
1
vote
1answer
187 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 ...
3
votes
2answers
103 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. ...
0
votes
0answers
25 views

Database Considerations (Loop vs comparison)

I am working on a project where I am provided a CSV file with around 60k records containing printer usage. The CSV file itself has no primary identifier per row (it's an export from another system). ...
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
23 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 ...
1
vote
2answers
65 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 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
163 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
74 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
45 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
64 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. ...
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
326 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
182 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) ...
2
votes
1answer
44 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
326 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
54 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
77 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
104 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
48 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
82 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
71 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
19 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
384 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
360 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
279 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
72 views

Sql vs nosql important data [closed]

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 ...
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
202 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
145 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
42 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 ...
0
votes
1answer
31 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 ...
38
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
60 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
242 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) ...