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

learn more… | top users | synonyms (1)

2
votes
1answer
40 views

Log to file or to SQL?

I'm developing a web application which uses MS SQL for various data: including users, user accounts, user licenses, license prices, invoices. I need to log users' real-time usage of the system, and ...
0
votes
1answer
88 views

Designing a scalable schema for college database [closed]

I am trying to build back end for college ERP system. The system will be based on LAMP. These is the scenario: Colleges have 5 branches There are 4-6 classes in each branch. There are 80 students ...
7
votes
3answers
157 views

How to model and store an entity which has “one or more” values

I'll use C# to design the model to be persisted Let's suppose I have the following entity: public class Episode { public int Id { get; set; } public string Title { get; set; } public ...
4
votes
2answers
95 views

Using audit trail as time machine?

I would like to do SELECT * TABLE t (using data from 1st of march 2012) I already have a nice audit trail of all tables in the database. It basically makes a copy of all rows that change, storing ...
1
vote
1answer
68 views

More than 20 Records Inserted in a Span of 1 Sec

Well, this is not specific to any programming languages. I came across this situation in Android, iOS, PHP and .NET. The problem is many times I come across a situation while building IoT apps, where ...
0
votes
0answers
70 views

Dealing with several custom getters

I have a data structure with data units containing different types of data. I've wrapped the data in "Field" objects so that each field is able to independently parse user input in a desired way. ...
0
votes
2answers
225 views

Database Handler and SQL injection prevention

I've written a database model class in PHP and have written a controller class that specifically validates the data before sending it to db. I'm getting criticism that I should handle the data in ...
-2
votes
0answers
11 views

Mysql fulltext match character limit [migrated]

I'm using following query to select most relevant 10 keywords for an article. I use this weird approach because there are 50 million keywords in the table. It's slow but it works good enough for my ...
-1
votes
1answer
75 views

What should my approach be to tagging 10 million articles based on relatedness? [closed]

I have 50 million tags and 10 million articles in mysql db. I want to tag each article with 5 related tags. Tags have 1 to 6 words. Mostly there are 3 words in a tag. I think most accurate and ...
2
votes
1answer
143 views

Matching algorithms in context of data quality problems

I work for an organization that has lots of databases containing person information. The data quality is poor. One case was a surname I found like this (this is the worst-case scenario): Mark ...
1
vote
1answer
31 views

Proper tree NoSQL structure with focus on full-text searching

I developing an app with tree(folder-file) structure, on which I should perform full-text searches with MongoDB. I did a research on the best tree structure practices and found this great article, but ...
2
votes
3answers
126 views

Best approach for storing huge data

I'll be handling 300,000+ users. Each user (after logging in) will be able to create lets say "folders", in each folder, users will create "name=value,name2=value2,name3=value3" entry pairs. Each name ...
0
votes
1answer
20 views

online database with partial access for clients

I'm trying to come up with an online database that my clients would have partial access to. This is for an artwork storage company. We have about 40 clients and would like each to have access to their ...
2
votes
0answers
69 views

is there a way to tell JDBC I am about to execute a transaction? [migrated]

when setting AutoCommit to false; is this means that I have to commit after executing every sql command in my application. here is a scenario SQL1 doesn't need to be a transaction. SQL2 needs to ...
1
vote
1answer
44 views

Creating a separate table for images or adding “image fields” to many tables?

I need to create a database in which several tables have images. For example, users have profile pictures and uploaded ones and products have many pictures, as well. Is it better to have one MySql ...
2
votes
2answers
128 views

Designing a system to archive databases with referential integrity

I have a very large Oracle database, with many many tables and millions of rows. I need to delete some of the rows end-to-end. By end-to-end, I mean, if I want to delete a row from a table then I must ...
0
votes
1answer
79 views

Would it make sense to have a database table with only one record for tracking site summary stats?

I'm creating a web site that deals with monetary transactions. Users can deposit funds into a wallet and use them on the site. I'd like to keep track of some stats for the web site, like revenue and ...
19
votes
6answers
5k 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
1answer
415 views

Organising data access for dependency injection

In our company we have a relatively long history of database backed applications, but have only just begun experimenting with dependency injection. I am looking for advice about how to convert our ...
4
votes
3answers
2k views

Is the ADO.net Entity Framework appropriate when all you do is insert records in bulk?

My department develops software to migrate databases for our customers from their old CRM software to ours. In this process we could be inserting up do millions of rows, processed one at a time as we ...
0
votes
1answer
57 views

How can I iterate over two loops of mismatched sizes, keeping them in sync?

I have a database table in which each row is one movie (with fields like 'title', 'director' and 'writer'), and a related table where each row is one screenshot from a movie (with the fields ...
2
votes
2answers
108 views

Communication/Updates between units of works/entity framework contexts, colliding with user changes

I'm developing a WPF application using Entity Framework for my database communication. The application has a hierarchy of tabs where each tab has a db context. Each tab allows the user to view some ...
3
votes
2answers
211 views

implementing dynamic query handler on historical data

EDIT : Refined question to focus on the core issue Context: I have historical data about property (house) sales collected from various sources in a centralized/cloud data source (assume info ...
2
votes
2answers
160 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
2answers
187 views

SOA, Java EE and data organization

At the company I work for, we're currently splitting up our monolith solution into a number of small services (SOA). The purpose of this is to make the developers working on each chunk of code ...
1
vote
1answer
124 views

Best approach for a server configuration data collection and reporting solution from a legacy script?

I have a project which involves collecting config data from windows servers in our (very large) server estate. My manager wants me to collect over 150 data items across all configuration areas ...
2
votes
1answer
67 views

Which approach would be better for persisting these overridable configuration keys and values? A simple key-value store, or a graph database?

I'm creating a system where there are config keys and values. So for example: config.key = 10 Is an example of a configuration key and a value. These keys can also have overrides based on ...
1
vote
1answer
93 views

Normalization 3NF and BCNF

If I have the following relation R = (A, B, C, D) And the functional dependencies: A -> B, B -> A, CDB -> A, CDA -> B The candidate keys are CDA and CDB. The third normal form says that ...
3
votes
0answers
87 views

Why there is a drop of interest in DBMSs? [closed]

I was playing around with google trends explorer when I tried to compare three major DBMSs: MySQL, Oracle and MS SQL Server. As you can see there is a drop in the interest in these database ...
2
votes
2answers
188 views

architecture of database heavy application

A program I'm currently designing is extremely database heavy, almost anything the user does will alter the database, or read from it. Now I have one interface which defines all these operations, and ...
2
votes
1answer
87 views

Multiple websites and applications using one user database

I've got several applications and websites that will be built around one main application. In a perfect situation users will be able to register once and be able to log into the different applications ...
4
votes
4answers
202 views

How to prevent race conditions in a web application?

Consider an e-commerce site, where Alice and Bob are both editing the product listings. Alice is improving descriptions, while Bob is updating prices. They start editing the Acme Wonder Widget at the ...
4
votes
3answers
114 views

How to track temporal changes in a database?

Imagine a software for theater owners. You can accept reservations for the different cinema halls. Each hall has a different number of seats. Say the owner wants to know how many people visited the ...
2
votes
1answer
67 views

Managing Database version controlled migrations using a list/table

I'm not much of an expert in the area but I am aware that solutions already exist to managing database migrations in version control, e.g. sqitch and liquibase. However I'm currently planning a small ...
3
votes
4answers
309 views

Organise C++ classes around SQL database

My question is about how best to organize C++ classes around a database model, and I understand this may appear very elementary. The software I propose to create will do the following. It is intended ...
3
votes
2answers
205 views

Why Do B+ Trees Have a Minimum Occupancy of 50%?

As far as I can tell, the basic operations (add, delete, search) on a B+ Tree would function the same if minimum occupancy was 1, or 1/3, or any other function on node size. All the sources available ...
2
votes
0answers
46 views

String comparison equivalence between mysql database and php code [migrated]

I wonder if it is possible to compare two strings using mysql and php and obtain the same results. In mysql I have a = b collate utf8_general_ci For PHP I found a promising way to do it with the ...
0
votes
1answer
121 views

calculating the average of a value over a month [closed]

I am working on a project right now that is having me calculate monthly interest on a bank account. The way the interest is supposed to be calculated is as follows: Use the daily average to calculate ...
0
votes
0answers
135 views

Properly design program database to reflect organization structure

I'm having trouble setting up my program's database the 'right' way. I was hoping you guys could give me suggestions on doing it properly. I am creating a database+client for a non-profit organization ...
-1
votes
0answers
21 views

Does a database update force index rebuild regardless of updated field? [migrated]

With MySQL (InnoDB), I understand that having indexes slow down UPDATE queries. I would like to know if this happens regardless of what fields are updated. For example, if I have a table with 20 ...
0
votes
0answers
33 views

Entity Framework Lookup Tables

I am coming from working with ADO.net DataSets and feel fairly comfortable with how they work. Mainly, I usually have a DATA table with a large number of REF tables for lookups. In DataSets it was ...
2
votes
2answers
38 views

Bulk update in client-server application

Sometimes when coding a client-server application, the client needs to make a bulk update. For example: "mark all pending orders as dispatched". To implement these I typically write specific ...
0
votes
0answers
21 views

Syncing structured data and files in Android App with an ORM?

I am developing an Android App which I have developed for iOS before. The app requires that structured data and files are synced across android devices. In iOS, I was using Core Data and synced to ...
0
votes
0answers
9 views

compare different approachs for saving related records whose values may change

On a web application for accounting services, I have the good old Invoice. To keep this example as simple as possible, each Invoice has many rows, and each row has its item with its price. At the ...
0
votes
0answers
45 views

Automatically verifying INSERTs when building a PHP(5.3.3) application

I am building a form in PHP. I would like to automatically verify that INSERT queries are successful, and populate data correctly, as opposed to running queries in Workbench or MySQL with every code ...
2
votes
2answers
110 views

Combine union with distinct

Situation: I need distinct results from two tables, that both have duplicates. I would like to know if I should combine UNION and DISTINCT. Example 1 - Only use distinct SELECT DistinctValue FROM ...
2
votes
3answers
162 views

What are the advantages/disadvantages of creating a new set of tables for each user?

I'm working/playing on an app where individual users' data will be completely independent from each other. Of course, there will be common tables for other parts of the app (e.g. "users"), but for the ...
0
votes
0answers
62 views

When to use a message queue as a web service database?

Does it make sense to implement a message queue system such as RabbitMQ or Kafka for the purpose of storing data in a queue? For example, this could be done in order to handle things such as ...
1
vote
0answers
70 views

Entity Framework Code First Centralized database deployment

I originally posted this on stack overflow but was told that here is a better place to ask this kinda stuff. I couldn't find any other similar answered question but if there is one please give me a ...
2
votes
3answers
108 views

What is a Database Environment?

I am going through Relational Database Design by JLM. I have come across words like database, data model, DBMS etc. which I am able to understand. But, I get confused when the author tries to use ...