For questions about structuring the data within a database. How to lay out tables, whether to use a relational DB or not, etc.

learn more… | top users | synonyms

1
vote
1answer
218 views

Best way to structure many-to-one allocation of users to projects in NoSQL

I apologise if this is a bit of a stupid or broad question, but I'd like some general feedback please! Say I have this DB structure for users (in Mongo/JS, but really it's all pseudocode- and the IDs ...
1
vote
1answer
47 views

Database Object That Reads From Two Tables and Writes to One

I am updating a database design that must be compatible with old and new applications. My goal is to make a design change which minimizes impact on the existing code. The Design Change Currently our ...
0
votes
1answer
32 views

DB Data structure for .Net sequenced list with insert, delete, move

The problem is maintaining in .net a list of rows that have a specific sequence where rows can be inserted, moved and deleted, and being able to save and restore that sequence from disk. In memory ...
0
votes
1answer
34 views

Should we sanitise and clean data or only display it in the expected format?

So my problem is, I have users entering their data(names, address) in a mixed form- some with first letter in caps and some without, some inserting more than necessary spaces and so forth. Also, ...
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,...
0
votes
1answer
30 views

designing a data warehouse: action or status based

I am designing a data warehouse for a sales platform. There exists a group of users that offers and group of users that demands entities. The production data base holds two sources of information: ...
1
vote
1answer
51 views

How to model the database tables for calculating on peak and off peak usage data

I am using MS Sql Server and my system contains power usage data in one table as timestamp and values for KW(two columns). This data is collected at 1 hour interval. At the end of the month I need to ...
3
votes
1answer
98 views

Getting posts from users that are being followed: two different implementations

I have two different implementations for retrieving posts from the users someone is following and I want to know which one you would recommend using. First I'l show you the tables, and then the two ...
1
vote
1answer
206 views

Best Multiple tables product with categories

I was looking to create an EAV structure for an inventory management system. But I read this answer and decided against it. I am looking to create multiple tables for all my products. But the trouble ...
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 ...
0
votes
0answers
33 views

Strategies to manage approvals of orders together with a log

Backgound I need to develop a system that handles orders that needs to be approved by supervisors (or users with more privileges). A log have to be implemented to show who created the order and when, ...
6
votes
5answers
130 views

DB design: what is a good way to handle properties for game?

I must persist handful of properties for several games in relational DB. No other type of DB can be used. Number of games will be around 4-5, and number of properties is (for now) kind of small, but ...
0
votes
1answer
47 views

The best approach to make a report based in dynamic data

I have an Asp.Net MVC application where I need to create a report. This report will show some data about an entity (activities), but only activities of ONE specific type that will be inserted in the ...
1
vote
2answers
38 views

Creating a web application with full text search on dynamic data

Even after thorough requirements engineering we end up with users wanting to attach 'notes' to their otherwise well-structured data records, in other words: arbitrary key-value pairs. Their primary ...
3
votes
2answers
67 views

Micro-service database management?

Most people say when building micro-services, that it's best to have seperate databases for each of the microservices. E.g: User-microservice: DB - User userId name Etc... Review-microservice:...
0
votes
1answer
32 views

User, user Role and user Info, data base design problem

I am creating an application that will manage job interviews and help the employers to choose the job seekers based on a ranking system that's based on some user info. I've created a database that has ...
2
votes
1answer
54 views

Design activities / events logging (ex: fields update) in RDBMS

I am trying to implement a activity tracking system in Ruby on Rails for an API only application. I have a table named letter with information as follow : id (primary key) sender_id (foreign_key on ...
1
vote
1answer
101 views

A large Oracle database with no foreign keys [closed]

I am struggling to understand the design of an Oracle database that I have been working with for the past 9 months. The database is for our business management system and I work with it mostly for ...
1
vote
1answer
228 views

how best structure localization of content type category name

I'm working on swift / iOS with a parse.com backend but this question could be applied to any language and is a general conceptual question. I'll use a specific example for illustration purpose. I ...
2
votes
1answer
68 views

Designing Storage for Different Time Systems

I've been considering doing some kind of application that allows users to track events in mythical settings. However, not all mythical settings allow for normal times. What if one user wants star ...
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
0answers
23 views

What is good practice when saving textual data which contains meta information?

This is bugging me for quite a while and even though I decided to do it in a certain way I am still no convinced that I decided well. Here is the background to it: One of the core features of my ...
1
vote
1answer
93 views

What Graph Theory approaches or algorithms are useful for designing a House?

I have a set of data about a family, and I want the software to find a house design that fits the data (which includes stuff like preferences and whether they want a pool. The current way I am going ...
0
votes
2answers
108 views

Create a separate table for employees work hours?

I have a table with employees information: id, active, first_name, last_name, gender, id_number, address, picture, password, comment Every employee has an entrance time and an exit time for each ...
0
votes
0answers
44 views

Which is the best way to manage multi-account multi-user web application?

I am junior web developer, currently I am developing school application with PHP and MYSQL. After finishing the app I would like to distribute to more schools by allowing them to register in the app ...
1
vote
3answers
215 views

How to maintain user relationship when user un-follows another user

I have a table of user relationship which stores who follows whom, the table structure is as follows -id -follower -following when someone follows any other user, I add a record with follower user ...
2
votes
1answer
60 views

Best approach to store huge amount of denormalized/dynamic data with relational database

Here I have a very basic ILS (Integrated Library System) done a long time ago (made with C#/SQL Server), in production for years. But now I have a demand of make this system MARC 21 standard compliant,...
1
vote
2answers
61 views

Conditionally show questions based on previous answers in a database driven survey

I'm trying to design survey-type application that uses user responses to determine what the next question should be. For simplicity's sake, question types can be either combo boxes (they have a set ...
2
votes
1answer
564 views

Designing persistence schema for BigTable on AppEngine

I have tried to design the datastore schema for a very small application. That schema would have been very simple, if not trivial, using a relational database with foreign keys, many-to-many relations,...
1
vote
1answer
176 views

Google Datastore and deep records

I'm in the beginning of creating a website that uses Google Datastore to store information related to clients and I'm curious if the record is too deep for NoSQL or if I'm fine. Essentially I'll be ...
10
votes
3answers
408 views

Which data store is best for my scenario?

I'm working on an application that involves very high execution of update / select queries in the database. I have a base table (A) which will have about 500 records for an entity for a day. And for ...
14
votes
6answers
41k 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 ...
2
votes
0answers
70 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 ...
4
votes
2answers
100 views

Database design, processor vs inconsistency

I was wondering, if I have a table that stores, lets say, a user's transactions, then when I need to fetch the user's current balance I would have to go and use SUM() like SELECT SUM(value) FROM ...
9
votes
3answers
317 views

How to share a code base among 10+ projects and minimize pain?

I have a number of applications that share the same data in the same database. To try and minimize redundancy of code the Data Access Layer is a shared project. This prevents each project from needing ...
4
votes
6answers
10k views

Better way of storing key-value pairs in the database?

I have a C#/SQL Server program that sometimes needs to store data. The data could be a response from a web service, a result of a database query, or any number of other things. There's no way of ...
2
votes
2answers
44 views

How should I structure a DB schema to include multiple market segmentation data?

A client has recently expressed a wish to assign their market segmentation labels to their customers, so that they can sort by market segmentation in their dashboards ("show me all the VIP customers ...
1
vote
1answer
55 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 ...
1
vote
1answer
44 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 ...
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 ...
2
votes
9answers
1k views

Sr. Dev made a database I disagree with. Advice sought [closed]

I need to run to work soon, so this will be brief. I've only been with the company for a couple weeks. It is a good company, this is a contractor who just happens to be twice my age. I am new to ...
0
votes
1answer
88 views

Entity Framework Code First, C# class separation and EAV

I'm in the process of redesigning a portion of my ASP.NET MVC application. I'm currently using Entity Framework 6.1 code first approach. I've been reading as of late that (Correct me if I'm wrong, I ...
1
vote
3answers
91 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
5answers
130 views

Database design - When should a table column actually be a table?

Compare Database #1 and Database #2 below DATABASE #1 POSTS--------------------------------- |___Id________Category_Id______Body__| | 1 "For Sale" "...." | | 2 "Requests" ...
13
votes
2answers
937 views

Is it wasteful to create a new database table instead of using enum data type?

Suppose I have 4 types of services I offer (they are unlikely to change often): Testing Design Programming Other Suppose I have 60-80 of actual services that each fall into one of the above ...
3
votes
2answers
121 views

Proper design for models

I have a class called ReplaceRule this is used by 2 classes DocumentRuleViewModel and SectionRuleViewModel as a List<ReplaceRule> in both Question 1: In my database implementation I have 2 ...
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 ...