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

learn more… | top users | synonyms (1)

4
votes
1answer
27 views

When to load related database data in web request?

I'm trying to determine when a web application should query a database for related data that may or may not be used in the current request. As an example, consider a database that tracks assets for a ...
1
vote
0answers
14 views

Architecture: mobile apps for different clients with their own dbs different servers?

My general feeling is that this is a question which must have been answered but I am struggling to find resources for it. I know little about mobile app dev but my knowledge of web services is pretty ...
0
votes
1answer
60 views

Why do I need to use recursion on the classic employee manager database relationship?

Take the data from the Oracle scott database. I have modified it to have multiple levels of management from the original, select * from scott.emp order by mgr desc; empno ename job ...
-3
votes
0answers
31 views

Querying large number of timestamps [on hold]

I have a list of timestamps in a table (there can be millions) of every time an auto-save event occurs. I want to track the amount of time people spend on a page, so every time they type a word, I ...
3
votes
2answers
306 views

Integration testing and database connection string in app.config

I am working on a project where SqlConnection is created via a static method, lets say it's DatabaseAccess.GetSqlConnection(). This method reads the .config file to get the connection string and ...
5
votes
1answer
386 views

Is this database design good? What JPA Entities should I create for this design?

I am trying my hands on JPA. For this I am thinking of using the example of a student admission process as shown in the diagram below. Is this design good ? Any suggestions for improvement are ...
1
vote
3answers
113 views

Abstracton layer to control services access to denormalized db entity

Our db is optimized for minimum join count (partially denormalized). E.g. our User entity contains account data (nickname, facebook id, etc), user numerical statistics (total games played, total wins, ...
4
votes
1answer
280 views

Is this a good implementation of the builder pattern? [on hold]

I'm trying to design an SQL builder in PHP. I'm trying to make it so that the system could work with different database systems (e.g. Oracle, MySQL, MSSQL). Here's what I've got so far. First, I have ...
-4
votes
0answers
19 views

how to design dynamic database for website form maker like google form ? [closed]

I want to design a database for a site like google form , The question,can I make my answers table to dynamic table ? Because there is more than one type of answers To impose example:text answer ...
-3
votes
0answers
16 views

Database and packages for create investment model [closed]

I have a question concerning the package " XTS ". What is the optimal databases format for cooperation with "XTS"? More precisely - what is the recommended database format used for cooperation eg ...
2
votes
2answers
166 views

matching usernames with their password

We are working on a simple login/registration form. Our login script checks to see if the username and password exist in the same row of the database. If it does exist, we bring the user to a welcome ...
1
vote
2answers
245 views

How do you sync changes to the data in your database? [closed]

I am new to a team developing a very large web application. Prior to my start, the team had 0 automation in place and just did everything by hand. This was possible because they were only a team of 2. ...
0
votes
1answer
86 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) ...
1
vote
0answers
62 views

Using a distributed system as an alternative to disk storage

So, one of the differences between "main memory" and disk storage is durability -- the data on hard disks will stay accessible and unaffected even if the host machine crashes or loses power. One can ...
3
votes
1answer
5k views

Why would I use ElasticSearch if I already use a graph database?

I don't find any deep explanation on the web about a comparison between ElasticSearch and the graph databases. Both are optimized to traverse data. ElasticSearch seems to be optimized for analytics. ...
0
votes
1answer
214 views

How to get real time notifications, when a database change (insert, update, delete) occurs?

I'm creating a dashboard which should monitor a database table. I have only database access (no application layer). The table is rather large (10 million rows), however not changing rapidly (100 ...
2
votes
2answers
63 views

Database + Java Design for a scenario

Overview A central web application to supports other web applications(A) for user and its role/permission management. Applications (A) call the central application via API to get the user ...
1
vote
1answer
27 views

Table with 2 columns that are foreign keys. Only one can be set for every record

I have a table that is connected with 2 other tables like so: Main table ID_1 | ID_2 //Foreign key of table1 //Foreign key of table2 Table1 ID | Some ...
2
votes
4answers
153 views

Normalising a database table with 30+ columns [closed]

I'm in the process of restructuring a database I designed about 2 years ago for an organisation. Now most of these tables have a reasonable amount of columns, however there are a few tables which are ...
0
votes
1answer
73 views

Algorithm to maintain a blog sign up page

I have a functional sign up page for a blog that updates a database with a users name, email, profile picture and a short bio. The General information page and the profile picture upload/bio page are ...
0
votes
1answer
317 views

Like structure table with Laravel and showing the most popular content at top

I am using Laravel to creating a website, my users can post questions and other users can write their comments under the post, each comment have Up vote and Down vote, and users can voting for ...
0
votes
0answers
14 views

boiler-plate/pattern for a db patch script

I'm looking for a pattern to follow for a database patch script. We've had problems with customers not running patches, or running them in the wrong order, patches failing etc. and we'd like to get on ...
3
votes
4answers
370 views

Where to store average value in db?

I have a restaurant review app which stores reviews in a db, MySql. There's 2 tables. 1 for Restaurant. Another for reviews. To increase the performance, I am considering to store the avg review of ...
2
votes
1answer
243 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 ...
1
vote
1answer
20 views

Creating a specific table for shared columns among other tables (models)?

I'm creating a webapp that has a variety of models: Product, Category, ProductOption, etc. All of these models have a set of shared attributes: name, description, image, etc. There are two options I ...
2
votes
1answer
94 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 = ...
0
votes
3answers
286 views

Is it bad to store data in JSON form or should I use mySQL? [closed]

I've been building an application and the whole thing is built around a simple data storage system. Create an array. Convert it into JSON. Add <?php die() at the beginning to prevent access. ...
1
vote
1answer
77 views

Should MVVM models contain complex objects

Let us say that I have a Book class, a book can have an object of another class like an Author or other complex objects like a list of Genres. My question is, in an MVVM model should I make the ...
1
vote
1answer
45 views

Qt/QML/C++ Application database connection object visibility

I am working on some Qt/QML/C++ app and I've got myself into some kind of dead end. Namely, this app uses mysql database and here is my questions: Is performance hurt if I instantate new database ...
3
votes
2answers
218 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 ...
4
votes
0answers
83 views

What is the correct place to put checking of conditions in this use case?

Here is the situation: I have a database and a class that is basically a representation of a set of fields of different tables in it. Let's call it Message. "Message" does not know of the database ...
1
vote
2answers
232 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
4answers
97 views

How to share data between web applications?

I have two web applications, say Application_1 and Application_2. Application_2 has a database table named table_2, which changes infrequently, and needs to be accessed by Application_1. Does it ...
1
vote
3answers
113 views

Help me design this use case

I have following entities: Data: User_id Categories: Interests, Disinterests, Categories A, B C... Each categories have sub categories: Interests=Gaming, Physics, Programming etc.. Now each user ...
2
votes
1answer
995 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 ...
12
votes
8answers
1k 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(*): If ...
4
votes
1answer
104 views

Message queue vs database for delayed tasks

I need to build a system that can handle a fairly high amount of delayed tasks (e.g. scheduled emails). For non-delayed tasks I would go for something like RabbitMQ. But, is it ok to let tasks ...
0
votes
0answers
18 views

Database search results by deviation from query in Java

When every i try something new, I always 'throw myself in the deep end'. I'm in the initial stages of an android app build (my first android app, and first attempt at anything java) I want to know ...
1
vote
1answer
97 views

Database Design: Rules for students and student groups

I am new to databases. I am using MySql. What I have is a student system which stores rules for students in a school. Each student may or may not be a part of a group (Soccer, Guitar, etc). ...
2
votes
1answer
99 views

What is the best way to store a formula in a database for a table driven formula? [closed]

So I am changing my code over to a table driven formula system to make it sustainable in the long term. So basically I have 5 foreign keys that will get me to a single formula to use. However I'm ...
1
vote
1answer
243 views

Complex knowledge management system with CRM..written internally

We've all heard of salesforce and sugarcrm and the likes of systems like this. Unfortunately at my workplace we have been asked to write a similiar system (rather then license or purchase). Basically ...
0
votes
2answers
116 views

Is using up 'too much' storage space a practical concern when storing only text in a database in 2015? [closed]

I originally started writing a question on StackOverflow about a clever way to optimise keeping a version history of large text fields in a relational database table, possibly by using deltas instead ...
2
votes
1answer
106 views

How, in Three Tier Architecture is Database Access Achieved

So I am attempting to make an application based on the architecture proposed by this image; [1] However, I am getting very confused with how data access is achieved between the data access layer ...
5
votes
6answers
2k views

Are HSQLDB unit tests an anti pattern?

HSQLDB is great. It (also) has an embedded mode (no dedicated server needed), which allows for quick prototyping of stuff like Proof of Concepts, and it can also be great in production-ready ...
1
vote
3answers
55 views

Store generated image in database or generate it on server/client

I have been thinking what could be the fastest way to show base64/img data to the user, i could generate the data when the user is registered and then store it to database, or generate it every time ...
0
votes
1answer
268 views

Accessing database from static and non-static methods

I'm currently building a REST API in PHP & MySQL, and now I'm stuck at how I should structure the classes and the database connection. Let's say I have a table in my database for movies. How ...
4
votes
1answer
39 views

Config files for database-level business rules

In my application, I have a lot of SQL queries that have business logic embedded in them. For example, in searches I 'hide' results that are low ranked, less than -5 'community rating' because those ...
0
votes
0answers
48 views

How to write class libraries that work with DB

I have programmed a library in C#, which process some EDI into meaningful data based on the DB structure of a table. I have used a typed dataset in the class library project. Now I run into an issue ...
1
vote
2answers
48 views

Partial Update of Database Table

I have a database table with numerous fields including "category". The source of this table is an xml file which the system receiving occasionally. Each xml file contains data for one category. The ...
2
votes
1answer
81 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 ...