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

learn more… | top users | synonyms (1)

12
votes
4answers
4k views

How to handle Real Time Data from a database perspective?

I have an idea in mind, but it still confuses me the database area. Imagine that I want to show real time data, and using one of the latest browser technologies (web sockets - even using older ...
10
votes
5answers
3k views

Writing Web “server less” applications [duplicate]

TL;DR What are the prospects of writing applications which are completely based on a REST database server (CouchDB) and web applications which directly access the DB instead of having a web server in ...
1
vote
0answers
26 views

Offsetting high usage in a multi-tenant database environment?

I'm writing a research essay over distributed cloud-based systems, and one of the topics that I'm trying to touch on is potential solutions to high database utilization in a single-database multi-...
0
votes
0answers
20 views

Is having a singleton collection in Mongo (i.e. equivalent of an SQL table with one row) an anti-pattern?

I've been looking for ways to implement this, and haven't found it anywhere, so wonder if I'm doing something silly. Essentially I have a set of information which is relevant to the entire database/...
1
vote
1answer
44 views

Should arbitrary numbers be stored as strings in a database?

I'm using Google as a login system for my latest project. So, my users table has a column named googleid, which stores Google's unique user id, which is a number, with a few dozen digits. For example, ...
1
vote
1answer
179 views

How should I implement a full text search into my meteor web app?

I am making a web application using the javascript framework Meteor, which runs with mongodb. In the web app I have a db set up that holds individual video games in the documents. An example of this ...
6
votes
3answers
121 views

Handling retroactively adjusted data that is reported hierarchically

Several of our customers have come to us with an interesting problem that involves adjusting data that occurred in the past which is rolled up and reported based on an org hierarchy. For example: If ...
0
votes
5answers
388 views

How is it possible to log a user into a system with billions of similar data without delay?

Taking for instance Google mail and Facebook, they both have a huge database of users. It would be easy to search through a database of 100 similar logins and find a match in a second, but not in the ...
0
votes
0answers
28 views

Should I use weak entity instead of regular to describe my kind of components?

First time trying to make a E/R model of my database. Trying to understand weak entities and regular entities. Should I make the CPU, RAM, Mainboard, etc. entities weak instead of regular?
3
votes
1answer
88 views

Managing a development database in a group project

I'm working for a small webdevelopment company and we want to set up development environments. We'll be using the Laravel framework in combination with Homestead. Now, Homestead has its own database ...
4
votes
1answer
85 views

In a master-slave replication mechanism, how do you avoid / cope with the fact that the master is a single point of failure? Is there a solution?

So master-slave replication is great, but it leaves the master as a single-point of failure. What is the strategy to solve this problem, if there is one? I'm looking for the computer science theory ...
5
votes
3answers
61 views

What are the theory behind implementing two mirrored HashMaps that can accept write operations? Do I need a broker to mediate conflicting writes?

So imagine two HashMaps that need to be mirrored across two different machines, A and B. Whenever I make a modification to machine A, machine B sees it and vice-versa. Problem is: These two hash maps ...
4
votes
6answers
229 views

Sharing database interface functionality among multiple applications

I am currently refactoring some old code and I am facing some architectural problems. Currently 3 applications are working with the same Database (as follows): Content inserted by user Content ...
8
votes
6answers
9k views

Is MongoDB the right choice in my case? [closed]

I'm going to build my first real project in Rails that consist in a web app made of 3 main parts: The static part where no database is used The User registration part which will require a database ...
-2
votes
1answer
2k views

Connecting a native iOS app to backend and database

I have a good amount of experience working with objective-C and making iOS apps that work locally and with BaaS providers (Parse.com). However, I'd like to take my mobile development to the next level ...
19
votes
7answers
3k 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 ...
0
votes
1answer
69 views

Is it a bad practice to use external files for storing SQL templates?

I am working on a report system which aggregate a lot of data from multiple sources (databases and internal APIs). Among other things I communicated with another departaments and told them I need some ...
2
votes
0answers
136 views

Speed: Named Shared Memory vs Memory Mapped File vs Normal Memory

Let's say I have a server, where clients who connect are constantly updating their inventory. I could simply save the changes in to the database after an item has been updated, or I could update the ...
42
votes
8answers
6k views

Is the use of NoSQL Databases impractical for large datasets where you need to search by content?

I've been learning about NoSQL Databases for a week now. I really understand the advantages of NoSQL Databases and the many use cases they are great for. But often people write their articles as if ...
5
votes
3answers
198 views

Use of booleans in a database

I'm using Visual Studio 2013, .Net 4.5 and SQL Management Studio 2012. I have a table that tracks offices in my database. On the application side there are a some display rules regarding the layout ...
3
votes
7answers
10k 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 ...
1
vote
1answer
85 views

Manual reload of Java classes static block

I have a static block which fetches data from database. This data is then being used by instance method. Since static block will be loaded once I fear that the data won't change in its lifetime. How ...
-4
votes
1answer
78 views

Migrating MYSQL functions and stored procedures to SQL Server

The company i'm working for is selling HRIS management software. It was built using ASP and mysql. But one of our client's demand is for it to be based on MS SQL Server. our team is made up mostly of ...
0
votes
1answer
131 views

Best way to flatten an XML document

Say you have a document like this: <names> <first>Joe</first> <last>Smoe</last> <phonenumbers> <phonenumber type="home">123-567-9876</...
0
votes
1answer
61 views

Database searching for string across different tables

Scenario: application will search in database almost all columns across about 8 tables/views for defined string and return all rows containing that string (will return collection of objects or JSON). ...
3
votes
1answer
580 views

Reading from a file and inserting into a database, a good practice

I am making an Android application which reads several JSON files and inserts the read information into tables in my database. For instance, there are three files: countries.json { "countries"...
7
votes
3answers
4k views

Models per database table?

I am using codeigniter, and have found myself in a similar situation where I have repeated Model methods. I am creating a Model per Controller. But I would creating a Model per database table be ...
1
vote
0answers
58 views

Creating duplicate instances of objects for timeline functionality

I am working on a Spring-MVC based project, in which I would like to add Timeline functionality. The most important object in our project is the Note, there are objects associated with it like ...
1
vote
0answers
46 views

Converting our B2B application to SaaS need architecture advice

We have developed a small ERP application and the architecture right now is a 1-1 deployment/codebase for each client. We are now trying to convert it to a SaaS solution and we have the following ...
5
votes
1answer
268 views

Who communicates with the database in MVC/MVP?

I am building a small application and want to save my business objects to a database. I have my business objects and a model that acts as a container for my business objects and provides methods for ...
17
votes
3answers
431 views

Relational databases and iterative development

In many approaches to software development like agile methodologies, Domain-Driven Design and Object Oriented Analysis and Design, we are encouraged to take one iterative approach to development. So ...
43
votes
14answers
8k views

Is there any reason not to go directly from client-side Javascript to a database?

Possible Duplicate: Writing Web “server less” applications So, let's say I'm going to build a Stack Exchange clone and I decide to use something like CouchDB as my backend store. If I use ...
2
votes
2answers
71 views

How to perform summary analytics on production databases?

I want to use production data to generate "user activity" metrics. My thought is to set up a cron job that regularly reads production databases to summarize user activity and then stores the results ...
6
votes
3answers
116 views

Storing hours a merchant is open in postgres

In postgres, I need to store the hours a merchant is open each week. Essentially, the information you'd see posted on a sign in the merchant's door: Mondays: Closed Tuesday-Friday: 9am-1pm, 2pm-6pm ...
15
votes
0answers
723 views

Is there a reason for not using JavaScript for direct database connections on a web site? [duplicate]

I am thinking about using JavaScript for direct connection to our database server. I think I have solutions to all the possible problems about it. Security: Modern database management systems ...
3
votes
1answer
79 views

Correctness of ERD diagrams

I am new to database modeling.Here is a problem I was trying to solve: Information about movies,stars and studios.Movies are shot in studios that own them.A movie is shot in only one studio.Stars are ...
-1
votes
1answer
69 views

Considering the testing software issues when designing software [closed]

When designing the software, must we consider how much this code could be testable? for example, if we used X technology/Class/Interface instead of Y, based on that X can be tested more easily than Y, ...
0
votes
0answers
37 views

Migrations and DynamoDb

For folks who have built applications using DynamoDb, is it a common practice to use a migrations-like library to create tables / indexes in DynamoDb? I had assumed so, but can't seem to find any ...
1
vote
2answers
206 views

Is it viable to copy contents of a database into a program's memory, if multiple queries take time?

The task: I have a database with 4 tables with 200 rows, 800 rows, 50 rows and 30 rows respectively. Just to simplify it, let's assume the tables are these sets: A = [Ar1, Ar2, Ar3], B = [Br1, Br2], C ...
1
vote
0answers
30 views

Splitting the application into two different hosting providers

Due to cost I am currently thinking of using AWS for scalable hosting of the node.js backend of the application that would be nice to have monitoring,load balancing and all the goodies of the AWS ...
51
votes
2answers
48k views

Creating database connections - Do it once or for each query?

At the moment I create a database connection when my web page is first loaded. I then process the page and run any queries against that conection. Is this the best way to do it or should I be creating ...
4
votes
1answer
483 views

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

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 ...
0
votes
1answer
141 views

Relationship between REST APIs and Databases [duplicate]

I've been studying databases and rest APIs lately and I have a question about the relationship between the two. Imagine I have a database with three tables, STUDENTS, ENROLLED, and CLASSES. STUDENTS ...
2
votes
0answers
64 views

Suggestions for Storing large collection of related words

I am trying to create a simple sentence generator that uses templates and a database of words. It will be a website where essentially a user could click a button to generate a sentence. For example: ...
4
votes
1answer
63 views

What's the advantage of storing database transaction changes in the log as well as data pages?

I know the basics of why a database uses a transaction log - fulfilling ACID properties, ability to rollback/restore, etc. The basic algorithm that I see for a transaction is as follows: ...
1
vote
2answers
57 views

DB Design for non static front-end

I have a question about best practices to design a database which have to hold the following data: There is a page with a questionnaire which has default questions like Firstname, Lastname, Street... ...
30
votes
4answers
12k views

Achieving Zero Downtime Deployment

I am trying to achieve zero downtime deployments so I can deploy less during off hours and more during "slower" hours - or anytime, in theory. My current setup, somewhat simplified: Web Server A (....
0
votes
0answers
31 views

Best way to create “attributes” for Neo4j node?

I have this node labeled "Person" and these various items from what would be a class, in a conventional DB. For example: Teacher, Lumber, Magician, Artist and Painter. They should all fit in the same ...
6
votes
5answers
596 views

How to design a complex REST API considering DB performance?

I've been following some tutorials on how to design REST APIs, but I still have some big questions marks. All these tutorials show resources with relatively simple hierarchies, and I would like to ...
3
votes
1answer
65 views

How to delete user data that is referenced by another user?

Lets say a user has a set of data. This data is stored in user_data table. This user_data table is referenced by other users in some way. In case the user wants to delete a row from the user_data ...