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
10 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 ...
0
votes
1answer
14 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 ...
1
vote
3answers
239 views

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

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
2answers
49 views

Portable (No)SQL-database, pure XML or something else? [on hold]

I'm currently planning out a desktop-application that is used to organize stuff. I want to open source it on one point and I want to use and embrace open standards for everything. There is just one ...
1
vote
1answer
35 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
0answers
54 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
1answer
36 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 ...
2
votes
4answers
85 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 ...
4
votes
1answer
97 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 ...
-1
votes
0answers
61 views

Database design in Python? [closed]

I need to design a teaching staff timetable database. The times for all subjects are fixed: my job is to assign staff to classes. There are plenty of database modules and staffing apps available, ...
0
votes
0answers
15 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
3answers
108 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 ...
1
vote
1answer
90 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
86 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 ...
0
votes
0answers
94 views

Should I ask for the state in a registration form for new clients who live in the USA? [migrated]

Basically, on almost every international site, they ask for the united state you live in, once you selected that you live in the USA. Right now I'm programming a registration form for an Austria ...
0
votes
2answers
114 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
101 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 ...
1
vote
3answers
50 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
248 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 ...
-2
votes
0answers
34 views

PHP mysqli adding multipe entries for one insert [migrated]

the following short PHP code should be adding 1 entry into the database table. however when I run this I find 3 identical entries. MySQL Server version: 5.5.39 - MySQL Community Server PHP/5.4.31 ...
4
votes
1answer
35 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 ...
1
vote
0answers
42 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
44 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 ...
0
votes
1answer
54 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 ...
-4
votes
1answer
48 views

Connect to MS SQL database from client side [closed]

I had a software that was written on VB .Net and used Crystal Report to print out reports. It was a pain to maintain in my case, so I want to move the report to webpage version. I did some ...
1
vote
4answers
198 views

Java desktop app with mysql database

I'm currently in the process of learning Java and swing and in doing so am trying to create a desktop app. As part of this app I have set up a mysql database which the app is connected to, however ...
1
vote
1answer
43 views

Is it a good practice to write distinct queries in a single stored procedure based on input parameters

I am going through the stored procedures written throughout our project and see that multiple distinct queries are written inside a single stored procedure and are called by passing different values ...
0
votes
0answers
65 views

Best approach for an android local database-based application containing non-sensitive data

What's the best approach to design an android application with the question title specification? The application will show a first list of buttons with an alphabetical classification (like button1: ...
-5
votes
1answer
51 views

confused with ms sql nomenclature [closed]

Question 1. What is the language used in Microsoft SQL Server? Question 2. I get confused with the name Microsoft SQL Server since its a RDBMS why its name ends as "Server". Because server is used to ...
0
votes
2answers
137 views

Best way to synchronize data between two different databases

I have to implement data synchronization between two big databases which have completely different structures. Basically, I need to grap some data about products in different tables in the first ...
2
votes
0answers
55 views

How to handle complex calculated fields in an ORM

In our API we've got a few central datatypes which need to be "decorated" (so to speak) after retrieval from the database with calculated values. The database is accessed through an ORM which follows ...
2
votes
3answers
63 views

Table design for holidays

I'm creating a system to store holidays and events. I have a basic understanding of the schema for the static dates (every 23rd of march for instance). My trouble lies with the relative dates (i.e. ...
3
votes
2answers
40 views

How should I handle test services not connecting to Production DB?

I want to verify that my services (used to collect data from database and handle it according logic) are not connecting to production database which can cause data loss. my first idea was to mark the ...
2
votes
1answer
58 views

Updating a video's view count. Should this happen client-side or server-side?

I built an iOS app similar to Vine, where a user can scroll a feed of videos that auto play. All of these video have a View_Count field in the backend to keep track of how many times the video has ...
1
vote
3answers
112 views

DB Schema design : single table with more columns vs multiple tables with fewer colomns

What would be better DB design for a social network website. A single table with more columns and less rows or multiple table with fewer columns but more rows. For example: User can post an update on ...
0
votes
2answers
145 views

Why should I use lookup tables at all?

This question confirmed, what I was already aware of -- instead of directly storing strings in table, I should rather use integers or enums and join them with lookup table, to get, as a result, ...
1
vote
2answers
88 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, ...
2
votes
3answers
121 views

At which point using string-based enums can become a real problem?

This is a direct follower to this question. An answer given to that questions says (my understanding), that nowadays using string-based enums instead of integers isn't a much problem, because hosting ...
1
vote
3answers
85 views

Using auto-increment clustered key and guid primary key together

My boss is the db administrator in a new software project and he came up with that design where every table will have both a auto-increment clustered key and a guid primary key (or possibly composite ...
0
votes
0answers
34 views

What are some common patterns for managing a polyglot persistence layer?

I am pretty interested in the idea of using multiple datastores to support a single application and understand the benefits in theory but would like to know a little more about how things are done in ...
0
votes
1answer
28 views

How to scratch database that query faster for cloud computing

We are planning to develop a cloud based database driven web application which we would like world to use. Till date at the database side we have used fully normalized way to store the data and use ...
4
votes
3answers
284 views

Java & REST API: How do I check for duplicate before inserting record?

I am developing an application in Java to parse and upload records from a CSV to an online database, via a REST API. While I know for sure that there are no duplicate records in each CSV file, I ...
1
vote
1answer
113 views

The correct way to use Sessions (PHP)?

I am making a website that requires logins, and would like to know what a good approach is. Right now, I am thinking of the following: User sends username and password to server, where it is ...
2
votes
6answers
472 views

What is faster? Using REST API or querying a database directly?

What is faster performance wise? Creating a REST API and having your web app use the REST API to do all interactions with your database OR querying your database directly (i.e. using whatever typical ...
2
votes
3answers
64 views

Find all circles that cover one point

I'm not sure if I've been searching using the wrong keywords, but I've tried so many different ways of wording this and I can't find a relevant answer. Basically, given a set of circles defined by ...
1
vote
2answers
197 views

NoSQL or MySQL? [closed]

I'm developing an app that requires to save data that is not consistent across all rows. These database entries represent different kind of sport activities. Let's take an example: In football the ...
0
votes
0answers
62 views

Application/Database Design: using a table for workflow/content approval logic

Probably a poor choice of title but can't think how else to word it. I am developing an app for a company using CakePHP (MVC Framework). I have built a "Status" model which essentially has an an ID ...
0
votes
0answers
16 views

One Enum vs Multiple Enums [duplicate]

I am developing an application where a user submits a mission and other users accept the mission. Pretty simple. I want to keep a track of the mission progress status and store it into a database. ...
1
vote
2answers
129 views

Composite Primary Key drawbacks

For website that I maintain (eCommerce) I now need to make a table that seems to require Composite Primary Key of 5 columns. I never used 5 column as primary key before, only 2 and rarely 3. I ...
22
votes
5answers
3k views

Why don't Windows/Linux use relational Databases (RDBMS)?

Why don't Windows/Linux use relational databases (RDBMS)? I know they use file systems to store all data but don't you think it is more efficient to use databases like we use in web sites/web apps? ...