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

learn more… | top users | synonyms (1)

0
votes
5answers
103 views

Best approach to write on a database with two webservers

I have an architecture/performance problem. The problem: One voting based application with: 1 loadbalancer, 2 webservers and a database 10 candidates and 200k voting users. There may be more than ...
1
vote
0answers
14 views

How to deal with weekly schema updates on database production server? (ASPNet MVC and Entity Framework)

I'm working with scrum methodology. thus weekly schema updates are performed to the final product. However our customer is already populating the database. How can I update the database without ...
1
vote
1answer
132 views

What is the correct reusable architecture using Entity Framework for common database tables and services?

Context I have a line of business application "MyApp" in C# using EF. Layers are separated as MyResusableLib.DataAccess // Class Lib: EF based utils, extension methods, MyApp.DataAccess // Class ...
3
votes
5answers
105 views

Is it unnecessary to learn the kind of data structures and objects inside sql only because we are using another language to access db indirectly?

Suppose we are using java or python to access the database. Then is it considered a wastage of time and unnecessary to learn the kind of data structures and objects being used inside sql? Please ...
4
votes
3answers
3k 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 ...
-1
votes
0answers
27 views

Principles for secure user login/authentication

Backstory: In my from-scratch PHP/MySQL web development projects, I often start (and end) working on a secure user authentication. I'm self-taught and never certain that my site is adequately ...
0
votes
1answer
25 views

Design question to best option for storing data in file or DB

I am working on a feature where I need to store some data and I am not sure what should be my best option to store this data. I am sending data to some third party and want to show some part of that ...
-3
votes
0answers
39 views

How to connect user input in HTML with an SQL database? [on hold]

I'm creating an e-commerce site where I need users to log in with a username and password, and also add stuff like credit card information and address. How can I take the user input in HTML and ...
34
votes
8answers
5k views

Why would you store an enum in DB?

I've seen a number of questions, like this, asking for advice on how to store enums in DB. But I wonder why would you do that. So let's say that I have an entity Person with a gender field, and a ...
1
vote
0answers
57 views

Saving tabular, spreadsheet-like data in a relational database?

I'm hoping this question isn't too broad or too prone to opinionated answers, since I could really use some pointers. I'm trying to come up with a way to persist tabular, spreadsheet-like1, data in a ...
6
votes
4answers
210 views

Is it too verbose to always have 'modified' time stamps on all entities within a database?

The question can be summarized as: In a database (regardless of type), would it be considered a good practice to always include updated, created (and possibly deleted) properties, for all entities,...
2
votes
1answer
139 views

Reporting and handling asynchronous process errors to a client

I have a product with two separate applications. The core of the product lives in the database (oracle) and runs according to a schedule. The other is a client application (currently ASP.NET MVC3) ...
7
votes
5answers
687 views

How do I balance 100 clients checking the same database table in a loop?

What I have This is a prototype. I have a pool of 100 clients connected to the server via websockets reporting things and awaiting for commands. The server polls the commands database table of type ...
1
vote
0answers
39 views

how to store state, cities and countries in Neo4j

I'm a building a registration form for my website and need to populate the country, state and city field. All these fields are inter-linked i.e depending on country, state field will be set and ...
-1
votes
0answers
65 views

Which datastore would work best for application

I'll be building an application with the following requirements on the data side: Records will be flat, 20-30 fields. No relational components, can work in a single table. Fields will be mix of ...
0
votes
0answers
15 views

managing database update effectively

I developed a small app using sqlite starting from version 1. From time to time, new features are added to the app which requires database modification in the dev machine. On the client side however, ...
0
votes
0answers
21 views

ERD for a Lab Database

Question: In a database for a clinical reference lab a specimen, when taken, triggers a test order (for testing obviously) creation.If that test order produces a failure, the specimen is given a new ...
0
votes
1answer
69 views

What's the best way to popullate a new row in a database?

Is it possible to add a new row to a database using DataSet, because when I created a new dataSet and dragged the table from the database I could see that in the dataSet methods there was one called ...
0
votes
1answer
37 views

js spa rest backend business logic vs presention logic

I am very confused about what should a SPA's REST backend do and expose. In most blog posts and books I read they depict the backend pretty much like a direct access to the DB, practically CRUD ...
1
vote
1answer
60 views

Implement pagination which memorizes where we left off?

Let's pick a relation database table (say an audit table) with high write rate. We can display 100 records at a time. But as a user don't want to see some the records on page 1 on page 2 when a couple ...
0
votes
1answer
20 views

Terminology for partial offline database synchronization

I am looking for solutions for a field where I think I don't know the adequate terminology. The problem is that I have a central SQL database in the cloud. Then I have child databases only containing ...
2
votes
2answers
182 views

Configurable tables in SQL database

I have the following tables in my database: Configuration Table: ====================================== Start_Range | End Range | Config_id 10 | 15 | 1 ============================...
4
votes
3answers
435 views

OOP and relational databases [duplicate]

I see a lot of talk in the OOP world about principles and laws such as Open/Close and Loose Coupling, I can understand how they are so high valued, However I seem to have ran into a problem with ...
18
votes
6answers
3k views

Advantages and disadvantages of using bit masks in database

Not so long ago I talked to my colleague and he was definitely against using bit masks because it is hard to understand all the values that are stored in the database. In my opinion it is not always a ...
0
votes
3answers
30 views

Including record data in the ID number

I'm working on a project that requires assigning ID numbers to records about people in a database. Each person may have many records associated with their ID number. There was a discussion about ...
3
votes
4answers
218 views

Multiple many to many relations or one option table?

Let's say I have a database of persons who have some properties. For the sake of this problem let's say all of these properties relate as N-N. I can either create two tables for each property (one ...
3
votes
2answers
93 views

How should I refer to data bound columns?

I work often with data-bound applications with WinForms; records are pulled from a database and updated in a client application that I write. Stored procedures are used for all database transactions ...
0
votes
1answer
29 views

Multiple local Oracle XE instances

We need separate local databases per developer and per release/subproject on the same remote machine, as we are utilizing it for all the development activities. How is it possible to make it with ...
2
votes
0answers
73 views

Are there downsides to writing PDO/mysqli statements into my code directly vs using my own redirect wrapper methods?

TL;DR: To access DB functionality in my codebase I currently use a custom layer throughout the code. The layer needs an upgrade in order to begin accepting prepared statements, which it currently ...
1
vote
1answer
301 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
3answers
89 views

Storing Business Logic in Tables rather than Stored Procedure or Application

The requirement is that once the product has been delivered, user can update the logic as he wants. An example of logic I have is follows- An institute teaches English has following requirements - ...
88
votes
8answers
56k views

When would someone use MongoDB (or similar) over a Relational DBMS?

Im a bit confused......the whole NoSQL and such. When would you choose to use something like MongoDB over something like Oracle or MYSQL? I dont really understand....the "difference" as far as usage ...
6
votes
2answers
107 views

Seeking benefits of both SQL and binary files in a data storage scheme

I'm looking for some input on how to keep certain benefits of both a binary file and a SQL database in an interesting data storage problem. I have a legacy custom binary file format that is ...
1
vote
1answer
32 views

How to implement searchable persistent queues?

We will implement a system , which will receive quite a lot of requests through web service interface. We will have to queue the requests and process them asynchronously. Consequently we will have to ...
0
votes
1answer
112 views

Ruby best practices for Data Access layers

I'm starting my way into Ruby development and have some questions that I hope you can give your best opinion to better design some command line applications I'm developing. What are the best patterns ...
19
votes
4answers
527 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 ...
2
votes
1answer
81 views

Executing queries against multiple separate database instances

Premise I have a number of database servers (different DBMS instances, installations in different physical locations), each of them contains data and uses the same schema. Most of the data is ...
0
votes
0answers
36 views

Design a System to save a data that will be missed from another system

I'm building a middleware system where I'm saving the data from VERY slow API, The system behind this API works like this It produce a data blocks, lets denote a datablock by A. While A is used by ...
0
votes
2answers
144 views

Should I use a plain text database, or SQLite? [closed]

I'm creating a point of sale system for a small shop. I am particularly interested in finding patters from all items purchased, which I will log in their entirety. I'm thinking of even making queries ...
4
votes
1answer
261 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 = Data.fetch(req.params....
-2
votes
0answers
78 views

How to add and use a database in a C# project in Visual Studio 2015? [migrated]

I'm learning C# for about 7 months now, and currently I'm studying LINQ. I worked with local collections, but I'd like to use it with databases too, and learn how to use a database in a program. The ...
1
vote
1answer
42 views

Updating all records in MySQL table while still available to the user

I have this 'table A'. It contains two columns; email and email_alias. A sample is below: ===================================== = email | email_alias = ========================...
13
votes
3answers
4k views

Is inline SQL still classed as bad practice now that we have Micro ORMs?

This is a bit of an open ended question but I wanted some opinions, as I grew up in a world where inline SQL scripts were the norm, then we were all made very aware of SQL injection based issues, and ...
0
votes
1answer
91 views

What are the consequences of eliminating the ORM/ODM in a NoSQL based system?

In Martin Fowler's article OrmHate, he states the following: If you have an application problem that maps well to a NoSQL data model - such as aggregates or graphs - then you can avoid the ...
4
votes
3answers
542 views

Database design, how to handle freelancers

The context I'm modeling a database for a small ERP system. However I've recently hit a difficult spot that I'm having a hard time wrapping my head around. The logic of it involves a few special ...
2
votes
1answer
120 views

What functionality to expose in a database abstraction layer?

I'm trying to design a simple way of abstracting away data persistence behind an interface, but I'm having a hard time figuring out how much fine grained control should be exposed to higher layers. ...
3
votes
4answers
227 views

From the perspective of OOP, taking performance into account - should a database connection be a static field, an instance field, or a local variable?

When methods use a database connection, should the connection be a static field, an instance field, or a local variable? Here are my doubts. I dithered which are correct and which are baseless. I ...
2
votes
1answer
122 views

How experts program their databases?

Let's say I create my own website and design a discussion forum in that. Now, I have multiple types of users in my system, and millions of accounts per type of user. Since the website is very popular, ...
2
votes
1answer
104 views

Is it better to pull all data immediately or as needed?

I have a program that needs information from a database but it doesn't need all of the information at once, although it WILL need it at some point. Would it be better to pull all of the information ...