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
35 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 ...
1
vote
1answer
155 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 ...
4
votes
3answers
67 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 ...
-3
votes
0answers
35 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 ...
2
votes
2answers
169 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
246 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. ...
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 ...
1
vote
1answer
29 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
154 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
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
373 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 ...
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 ...
0
votes
3answers
288 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
48 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 ...
4
votes
0answers
85 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 ...
2
votes
2answers
64 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
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 ...
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
20 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
131 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
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
106 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
2answers
117 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
108 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
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
270 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
40 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
49 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
49 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
74 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 ...
-2
votes
1answer
85 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
341 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
51 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
90 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
59 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
201 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
59 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
76 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
42 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
65 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
136 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
175 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
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, ...
2
votes
3answers
131 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
93 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
45 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
29 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
390 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
119 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
691 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 ...