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

learn more… | top users | synonyms (1)

-5
votes
0answers
28 views

Help Query eats my server [on hold]

Hi I am facing the problem in my query and its eating a lot on my server whenever a shortened link is visited,Its a url shortener like adfly. select *, count(distinct views.views_id) as ViewCount ...
-3
votes
0answers
27 views

Data base for valid domains not registed in WHOIS [on hold]

I wonder if there is any data base for valid domains but not registed in WHOIS site ?
1
vote
1answer
89 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
223 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
115 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, ...
1
vote
1answer
51 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 ...
2
votes
1answer
91 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 ...
2
votes
2answers
77 views

What is the best approach to update a database field when a corresponding class property changes?

I have a class with several fields. public readonly byte Id; public bool Active { get; set; } public List<Group> Groups { get; set; } public ...
5
votes
3answers
109 views

How do you deal with legacy data integrity issues when rewriting software?

I am working on a project which is a rewrite of an existing legacy software. The legacy software primarily consists of CRUD operations (create, read, update, delete) on an SQL database. Despite the ...
2
votes
1answer
97 views

Django Migrations: Binds data to code?

If you have custom code for models (custom validators and custom fields are examples), Django Migrations will import them directly into the migration files. An example: file web/models.py def ...
1
vote
1answer
277 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) ...
0
votes
0answers
24 views

How does Hibernate Cascade on OneToOne work under the hood

I have the following entities corresponding to tables into DB: User, UserAttempt; User has a FK to UserAttempt, and UserAttempt has no knowledge of User. If I do the following inside a transactional ...
1
vote
1answer
74 views

Database integration of Rails and Laravel apps

I have some very small apps on a VPS running ruby on rails and a co-worker also have some of his own apps running on laravel at another VPS. So far we dont needed to share any data among the apps, but ...
0
votes
1answer
537 views

Like structure table with Laravel and showing the most popular content at top

I am using Laravel to creating a website, my users can post questions and other users can write their comments under the post, each comment have Up vote and Down vote, and users can voting for ...
13
votes
6answers
40k views

what do database programmers do?

Every time I read about Oracle programmers etc, I get confused. I don't know what exactly they do. From my understanding, application programmers need to develop the core functionality. The libraries ...
1
vote
2answers
290 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 ...
2
votes
1answer
68 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 ...
2
votes
0answers
69 views

Logging Database Changes

What is the proper way of storing a changelog, similar to git, for data in a database. Currently, I have it set up so that every line in a table is given a unique string id that is used to ...
1
vote
0answers
44 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 ...
4
votes
1answer
248 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 = ...
1
vote
3answers
95 views

How can one think of a relational schema in terms of storing it in a NoSQL database?

Recently I've been wanting to experiment with NoSQL databases, especially document store ones. After reading, I still don't understand how one might model information that is contained in a relational ...
57
votes
7answers
6k views

Why does the relational model for a database matter?

I am approaching a project where I'll be having to implement a database with my boss; we're a very small start up so the work environment is deeply personal. He had given me one of the company ...
1
vote
1answer
94 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 ...
2
votes
1answer
42 views

Efficient saving of long strings with recurring substrings

following problem: I need to save a lot of xml strings of variable length and structure. As it is with xml, a lot of substrings are the same (some elements, attribute and value combination). Often the ...
23
votes
2answers
14k views

Data Synchronization in mobile apps - multiple devices, multiple users

I'm looking into building my first mobile app. One of the core features of the application is that multiple devices/users will have access to the same data -- and all of them will have CRUD rights. I ...
4
votes
3answers
2k 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 ...
0
votes
2answers
82 views

JSON or XML or other - most time efficient for largely “read” of structured data

Considering that using a relational DB or other hierarchical or such databases is not an option, looking for the alternative approach using a simple (but very fast, efficient, distributed KV-store). ...
1
vote
1answer
53 views

How to associate similar data with different tables in a database?

My application has users and ads. A user has a unique email. An ad belongs to a user (so, the ads table has a user_id FK, that is simple). Every ad can also have multiple emails and phone numbers ...
17
votes
6answers
41k views

How to quickly search through a very large list of strings / records on a database

I have the following problem: I have a database containing more than 2 million records. Each record has a string field X and I want to display a list of records for which field X contains a certain ...
2
votes
1answer
213 views

How is one or more aggregate function implemented in most SQL engines?

In the book Database Fundamentals, Silberschatz. It is explained that aggregate functions can be calculated on the march. This make sense. What it means is that for calculating the maximun, average ...
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 ...
0
votes
0answers
28 views

Develop an API within ESB to access a database

I am working with a service provider where I need to get data from their service. The service provider wants to give me access to their database to get the data I need. My question is should I ...
4
votes
3answers
1k views

Let applications share a database or keep them in sync with web services?

We have decided to build separate applications for user authentication and user management. The reason is that the the former is a "this just needs to always work, and do so instantly" style service, ...
0
votes
0answers
12 views

Regional test-of-concept environment, whose database must be merged back to the main server afterwards

My client wishes to launch a specific version of the Rails platform I am developing that will be restricted to a particular group of users (some sort of test-of-concept). I will have another server ...
2
votes
0answers
69 views

Maximising data processing speed: in-memory or write to db first?

Currently working on a system which allows users to upload data files, which we then "clean" (i.e. process in various ways). Speed of processing and return to the user is an important consideration, ...
5
votes
6answers
180 views

Should I add a “boolean meaning” to another column?

Is it a good/bad practice to add a "boolean meaning" to other fields? For instance, let's say I'm modeling events, that might be recurring or not. I can have: A boolean column that holds if the ...
-1
votes
1answer
53 views

Any Non-Singleton PHP PDO Db Connection Examples? [closed]

Are there any good examples of non-Singleton PHP PDO Dbfactory or connection classes people can point me in the direction, or perhaps even briefly illustrate. I am interested in learning both support ...
-1
votes
1answer
56 views

How costly is DB data transfer as compared to data storage?

I've seen a number of answers (1, 2, 3) where they state that storage is cheap. So when designing a DB structure, it shouldn't be a main concern, or at least it doesn't rank very high in the list of ...
0
votes
1answer
63 views

Datagrids vs Databases - what are the differences?

There are some datagrids I had quick look into: Angular UI Grid ag-Grid, one more link Kendo UI Grid Also, previously I had a very small experience with MySQL. What are the differences between ...
1
vote
1answer
133 views

Getting data from a database with the MVC model

I am creating an application which will have a very large database to draw it's information from (a student registration system to be exact). The database is created with Microsoft SQL Server if that ...
0
votes
1answer
41 views

Keeping track of data deleted upstream

I'm building an application that queries several APIs and duplicates some of the data in a downstream, centralized database to make it easier to perform some processing on it. My application will only ...
4
votes
3answers
57 views

Getting the same data in multiple ways

Say I want to get the same data from an SQL database, but want to have multiple ways of getting that data. For example, say I want to be able to search a database for users based on username, real ...
1
vote
3answers
82 views

Are crow feet notation and uml notation same?

Does crow feet lies under the sub category of the UML notation or it is a whole other approaches. As far i have seen only difference between two of them is that crow feet uses crow symbol ...
0
votes
3answers
71 views

Should an audit user column be nullable?

Consider following table structure, for the backend of a website: [Article] ArticleId Text TotalViews AuditModifiedOn AuditModifiedByUserId [User] UserId An anonymous/not authenticated user visits ...
1
vote
1answer
67 views

How to store data from firebase to analyze at some later date [closed]

I am currently using Firebase with my iOS app. I use it to authenticate users and then allow user interactivity during the life of the app session. I would like to be able to save a snapshot of my ...
2
votes
1answer
56 views

How to optimize a bloated entity that causes a huge query

I have an application that exposes a series of Web services. One of my entities has a bunch of one-to-many and many-to-many relations to other entities. My transactionality level is at DAO, and I'd ...
1
vote
3answers
47 views

Archiving data by semester

The problem is similar to this question, but not a duplicate. What I'm looking for is a better solution than my current one. I'm building a web application for a department in my university, and due ...
0
votes
1answer
73 views

How to do an “Automatic DB monitor” and notify the client

Until now I didn't find anything good about monitoring a DB's specific table (or related tables) specific values changed. I want to know: Since most of DB's don't support monitoring changes for ...
-1
votes
1answer
33 views

Defining a DB schema and having existing schema conform to it? [closed]

I see a lot of DB migration tools that have up/down functions that deploy/revert DB schema changes. I have never seen a migration tool where you simply define the schema and it modifies your current ...
2
votes
1answer
168 views

Elasticsearch and relational database combination

Imagine I have a marketplace application - where users can search for products (we concentrate on clothes). Every product has an ID, name (text), description (text), price (numeric), size (numeric), ...