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
0answers
14 views

String comparison equivalence between mysql database and php code

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
78 views

calculating the average of a value over a month

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
129 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
25 views

How to add premium (featured ) user in an Entity–relationship diagram?

I have a table 'User' in my database. When the user makes a payment after placing an order for a package, he is considered a Featured(Premium) user of a company. How do I add this Premium (Featured ...
-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 ...
-1
votes
0answers
44 views

Database and (micro) ORM for new .NET desktop app? [on hold]

I hope my long story with more than one question fits in Programmers stackexchange. I tried to make make questions simple and not speculative. Thanks in advance. Introduction I plan to write a ...
0
votes
0answers
24 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
34 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
5 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
8 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 ...
-1
votes
2answers
71 views

Should I go with MongoDB Free Version? [closed]

We are assembling a system where we will be storing several million documents in the range of 1 - 2KB each. My first instinct was to use SQL Server because that's just what I've done for many years. I ...
1
vote
1answer
44 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 ...
0
votes
0answers
46 views

Passing values from custom columns

This question is a bit subjective so the intention is to get some feedback on a problem I'm experiencing and ways around it. The kind of answer I'm expecting will answer the question "what are good ...
0
votes
2answers
178 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 ...
0
votes
0answers
44 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 ...
1
vote
1answer
20 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
2answers
107 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
151 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 ...
2
votes
2answers
100 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
59 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 ...
0
votes
0answers
57 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
61 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 ...
1
vote
1answer
374 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 ...
2
votes
2answers
96 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 ...
2
votes
3answers
102 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 ...
6
votes
4answers
373 views

Heterogeneous Associations - Data Modeling When an Object that Must Relate to One of Many Classes

Suppose you have 3 classes: ClassA, ClassB and ClassC. Now suppose you have a class Message. You want a one-to-many relationship between each one of those three classes and the Message. The goal is ...
1
vote
1answer
39 views

Reduce Operations on Distributed Databases

I would like to ask you about optimizing reduce operations (e.g. count) on multiple databases. Let's say there is a user table that is stored in various countries and sharding is made based on the ...
3
votes
2answers
203 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
95 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 ...
13
votes
3answers
2k views

Database schema for a ToDo list

I am trying to make a very simple todo list application with PHP, MySQL, Jquery templating and JSON... However, my schema seems to complicate things in JSON. What's the best way to do it? A new ...
0
votes
2answers
181 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 ...
3
votes
1answer
87 views

Fixing bad data in a database - redo or incremental

I have pseudo-ownership of a fairly old db (original data from 30 years ago; current design is >15 years old). In my opinion, the schema is pretty broken, and one of the implications of this is that ...
1
vote
1answer
113 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
61 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
72 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 ...
0
votes
2answers
74 views

SaaS model, 1DB per client

The context we're building a web-based system and one of the design decisions (database related) was whether to have 1 main DB manage all client data VS having 1 DB per client. After reading a lot ...
1
vote
3answers
102 views

Database design: 4 types of users but have different functionality , separate or one table?

I have 4 types of users: Admins , normal user , company , service provider admins and normal user share some attributes (id .first name ,last name ,phone ,mail) company and service provider share ...
2
votes
5answers
80 views

Using DDL commands in programming language [duplicate]

Hello I am a student with no industry experience. My question may sound dumb, but, me and my friends were having discussions on use of DDL directly in programming language (any language may be Java, ...
1
vote
1answer
63 views

How to associate both a collection and one item of this collection to an entity

I'm working on a project in which I have an entity, we may call Users and another entity Address. I want to define the entity User in a way that an user would have a collection of addresses ...
1
vote
2answers
214 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 ...
15
votes
7answers
1k views

Does it make sense to standardize including a created date and last updated date field on all DB tables?

My boss is currently attempting to apply some development standards to our team, so we had a meeting yesterday to discuss the standards which was mostly going well until she brought up: All DB ...
1
vote
1answer
104 views

What is the point behind building an abstraction layer PDO Adapter class instead of using native PDO?

I have built a PDO adapter class because I thought, at the time anyway, it would be a good idea. After fighting with it, it makes no sense to me. Isn't the design of PDO the way it is to keep you ...
1
vote
1answer
78 views

Transferring information between a web server and a Python backend?

I have been Googling my problem but haven't been able to come up with anything; here's the situation: I have a PHP / MySQL website hosted with 1and1.com. I also have a Python program that runs on a ...
-1
votes
1answer
60 views

Stored procedure in asp.net webforms [duplicate]

Previously while working on database in asp.net I was using stored procedure with no tier architecture. So I was including connection string, crud query etc in every button click event. Then I was ...
0
votes
1answer
65 views

Three-Phase Commit (3PC) question

I've been reading about 3PC in a text book, but there aren't any diagrams or examples, so I found one on wikipedia that I posted below. My question is, what does it mean by "cohorts?" There is no ...
1
vote
3answers
223 views

Pattern / methodology for representing large database records as objects

A bit of background information: We have an old database application written in Access that lets users monitor their workload, and the code is... 'procedural' might be too kind. The vast majority of ...
1
vote
0answers
70 views

Three phase commit protocol

I'm trying to understand the three phase commit protocol by reading the wiki page (http://en.wikipedia.org/wiki/Three-phase_commit_protocol#Motivation). In the description for the diagram I posted ...
12
votes
8answers
684 views

When does one hard-code actual data values into the code as opposed to using a DB?

A long-standing question for me has been: when do I store data (actual values) in a database table, and when do I store them right in the code? The untold consensus (*) has typically been as such: ...
-1
votes
1answer
103 views

SQLDatabase: Read a lot of data at once and process in memory or read the data when I need it?

I'm not sure how to approach this problem. I require a big chunk of data records from the SQL server. This chunk is based on variables, so I don't know before what records I need. I need to do a large ...
1
vote
1answer
61 views

How can I share a managed DBConnection across various objects?

I am implementing what I thought was a simple object wrapper around a database where one object "PartRecord" represents one row of a database table. I want a client to be able to request a given ...