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
84 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 ...
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
387 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 ...
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 ...
18
votes
4answers
451 views

Using flat files vs database/API as a transport between a frontend and backend

I've got an application which has generated a rather heated discussion between a couple of the developers. Basically, it's split into a web layer and a backend layer. The web layer collects ...
3
votes
1answer
86 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 ...
0
votes
1answer
68 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 ...
1
vote
1answer
166 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 ...
2
votes
0answers
114 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 ...
5
votes
3answers
180 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 ...
1
vote
1answer
80 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 ...
3
votes
1answer
115 views

Is it good practice to access database in mapping between object

Situation I receive message from a 3rd party, and these messages are use to create or update database information. Message and data to be updated can be de-serialize in object form, but are not ...
4
votes
6answers
228 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 ...
1
vote
2answers
291 views

Multiple instance of the same class?

I have a class named "Category" to handle all the operations and data about my categories. Now, my class is created however I need to find a way to build an object for each of the categories in my ...
1
vote
0answers
57 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 ...
0
votes
1answer
127 views

Database vs. Pickle (Python) [closed]

I'm writing a small application in Python that stores data via pickle. Initially, I was trying to decide between pickle and a database solution, and went with pickle to try something new. What I want ...
1
vote
0answers
45 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 ...
4
votes
1answer
245 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
422 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 ...
2
votes
2answers
64 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 ...
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 ...
6
votes
3answers
112 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 ...
3
votes
1answer
75 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
32 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
201 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
28 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 ...
0
votes
1answer
127 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
62 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: ...
0
votes
1answer
116 views

Best way to flatten an XML document

Say you have a document like this: <names> <first>Joe</first> <last>Smoe</last> <phonenumbers> <phonenumber ...
0
votes
1answer
59 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). ...
4
votes
1answer
60 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
56 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... ...
-4
votes
1answer
71 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
0answers
27 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 ...
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 ...
1
vote
1answer
43 views

User account model with two or three possible profile

My application will have at least two types of users: clients and companies, these are the types of profiles. Because each type of profile requires different additional information, it will be ...
6
votes
5answers
554 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 ...
2
votes
2answers
113 views

Database Design - lots of small tables or fewer, bigger tables?

So I'm designing a database for a project which is going to enable beauty businesses to create a profile, clients to create a profile and for the client's to be able to book appointments and for the ...
0
votes
0answers
40 views

Project that has no network involve, how can I update multiple databases?

I am working on a project that involves a very large area, for example this area is a big subdivision with 10 gates, because it is so big and we are aiming on producing a low-cost product and creating ...
5
votes
1answer
70 views

How can I better document these data relationships/transformations?

I'm working on a project that uses RxJS to perform data transformations on varying sources of data, and I'm in the process of writing some documentation for it. I want to find an effective way to ...
4
votes
4answers
252 views

Best practice for getting last record inserted in DB

Me and a couple of colleagues are having a discussion regarding the following case: In an OrderStatus table we're keeping track of all the statuses an order goes through in time, including ...
2
votes
2answers
77 views

Retrieving an incorrectly stored tree data structure

Way back in the hazy origins of our platform it was decided that we were going to need some hierarchical data structures stored in the RDBMS. The relationships between nodes were stored via a ...
5
votes
2answers
82 views

Junction table related to another junction table

I'm defining a DB structure, and I have a strong feeling I'm not doing it right. I have hotels that can be configured to offer some optional services (airport pickup, massage), that can in turn be ...
1
vote
0answers
28 views

Correlating Search Classifiers in a Database Scan for Sensitive Information

Problem Description I am working on an enterprise data discovery project that is designed to scan databases for sensitive information. The basic search unit is called a classifier and covers things ...
-1
votes
1answer
63 views

Is there a generally accepted definition of “Secondary Index” independent of DB product? [closed]

Is the definition for "Secondary Index" anything more specific than just "Any index that is not the primary index"? EDIT: Here is some research I have done: Search Google. I evaluated the first 20 ...
4
votes
1answer
77 views

How can we rollback a database synchronized over multiple systems?

On a mobile device, a set of operations has been saved in the local DB with a wrong date (because the system date was set in the future). Then the device regularly doing synchronisation with a server ...
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 ...
0
votes
1answer
99 views

What is the significance of database host name while configuring database?

The name database host, how the name indicates "the server that hosts the database", should be the server ip, that hosts that database. I don't see any relation of it with the scripts that try to ...
2
votes
1answer
229 views

How to Manage Privileges in C# WPF applications

I'm writing my first "large" program in C# and WPF. It's a Database system (MySQL) that has three main items, Contracts, Companies and People. I have the main UI down for the Companies section of the ...