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

0
votes
0answers
8 views

Changing an int to be a string in PHP / MySQL Schema

Background I'm trying to decide the best way to manage a change in requirements. Currently when an admin is assigned to a ticket, the ticket header record is given an owner and the ownerID field is ...
1
vote
0answers
37 views

What's the canonical way to store translations of user data?

I've developed some software that allows my users to attach a blurb to some non-language specific information: Pseudocode model: item(): ID creationdate byline //Only one byline for the object ...
1
vote
2answers
53 views

Creating menu structure using DB - is that fine?

Also I have an application that basically consists of a lot of screen so user needs to navigate a lot (like go from A>B>C>D) etc. I have been thinking how to implement this (mainly hold the structure ...
-1
votes
0answers
10 views

Schema models for hierarchical relational databases to cater for Assembly,SubAssembly,…Component

I have been looking at various schemas for a hierarchical relational database to describe items, and their make up suitable for use in MS Access. Items must be described once as a template. Instances ...
1
vote
4answers
106 views

Are there any benefits in not having referential integrity keys in database?

So Referential integrity is good, but are there scenarios where not having constraints is better? For example when all the logic of relationships is kept in code? or when the database upgrade is ...
12
votes
3answers
1k views

General thought process for “How would you build this website/app” interview questions

I've collected a bunch of interview questions like "Describe how you would design a photo album application", "Describe how you would design this particular feature of this particular website" (e.g. ...
3
votes
5answers
232 views

Is it useful to keep 'definition' entities in a database vs using an enum?

In a project that I have started working on, the database has a lot of FooDefinition tables which act like an enum. It's a C# project using Entity Framework although that is not central to the ...
2
votes
3answers
67 views

Database design with “draft” version of data

The database I'm currently building is pretty traditional relational database stuff, but there is one requirement that is not clear to me how model appropriately. There are many business rules which ...
1
vote
3answers
125 views

How should I approach this from a problem-solving point of view?

I'm currently working on a project to replace some excel worksheets. There is a lot of industry specifics that change quite often and nobody really knows how things should be but every sure enough ...
2
votes
2answers
701 views

Database model for keeping track of likes/shares/comments on blog posts over time

My goal is to keep track of the popular posts on different blog sites based on social network activity at any given time. The goal is not to simply get the most popular now, but instead find posts ...
13
votes
4answers
728 views

Is it bad practice to allow user defined fields?

Generally speaking, is it considered bad practice to allow for user created fields in a database for a webapp? For example, I am making a home inventory webapp for my wife, and she is going to want ...
0
votes
3answers
91 views

Are Data Warehouses bespoke products that are tailored towards the specific needs of one single organisation?

Are Data Warehouses bespoke projects that are developed to meet the needs of a specific organisation or can you buy off the shelf products that would meet the needs of many organisations? I am ...
0
votes
1answer
22 views

Help with database design with a strict and structured subset of clinical data

I'm developing an application to keep some of the data in chronic patients, the data came from a very strict subset of data, vital signs, exams, ecc. On a first glance I thought to create a Patient ...
0
votes
1answer
127 views

Keep user and user profile in different tables?

I have seen in a couple of projects that developers prefer to keep essential user info in one table (email/login, password hash, screen name) and rest of the non essential user profile in another ...
2
votes
1answer
106 views

How to model a one-mandatory-of-many relationship

I have following class model that I'm quite happy with: A Whole has a special mandatory Part. Furthermore it has a collection of parts, that contains at least the mandatory part, but may contain ...
1
vote
1answer
121 views

Design Application to “Actively” Invite Users (pretend they have privileges)

I am designing an application where users message one another privately, and may send messages to any Entity in the database (an Entity may not have a user account yet, it is a professional database). ...
1
vote
2answers
93 views

Databases and the single responsibility principle

Can the single responsibility principle be applied to databases? relational databases I mean. I'm asking this because a typical database will have several tables and we may find something like that ...
2
votes
1answer
71 views

How to define item level permissions in a relational database

I need to model a database design to provide item level permissions to users based on the user's role access. I am using asp.net with sql server 2012 I am looking at similar experience on how ...
5
votes
1answer
2k views

Database Application Design Best Practices [duplicate]

Once upon a time it was common practice for both the business logic and database logic to be written in the same language (eg PL/SQL, Transact SQL, etc), more recently the practice is to separate the ...
0
votes
2answers
98 views

Should all foreign table references use foreign key constraints

Closely related to: Foreign key restrictions -> yes or no? I asked a question on SO and it led me to ask this here. If I'm faced with a choice of having a circular reference or just not enforcing ...
0
votes
0answers
18 views

Seeking Mongoose schema design advice

I'm having some trouble deciding on a proper way to layout some of my schemas in Mongoose. I have a User schema currently as: { name: { type: String, default: "" }, phoneNumber: {type: String, ...
2
votes
2answers
94 views

Should I be using a composite key for this table?

My database is going to store words, so the Word table is the most important. The Rhyme table lists which words a particular word perfectly rhymes with. It consists of three fields: RhymeID - primary ...
0
votes
2answers
96 views

Whats a good structure to save and retrieve locations of images?

I got a java-ee application, where I collect informations about movies. Im my backend I provide data like the name, description, genre and a random uuid. I also got lots of related files, which are ...
0
votes
1answer
22 views

Store Arbitrary values related to mysql record

I have created an app that manages a Data cleansing workflow. Each row imported needs to store an arbitrary number of key value pairs in addition to our standard mysql schema. The key values need to ...
0
votes
1answer
161 views

Best way to implement database design for a set of entities

Lets say I have a scenario like so: I have many claims to get money from another entity and this claim has to go through two gateways. This claim is sent from an origin system and can possibly be ...
0
votes
1answer
81 views

Relationships in a Chen ERD

I am working on a Chen ERD to model our organizations merchandise. Our central entity is a Style. We have supplemental entities of Color and Season. I am defining our assortment as the ...
0
votes
1answer
46 views

What's the best way to store options with multiple/boolean choices in an Android app?

I'm working on an Android social app which connects to a Postgresql database for up-to-date user data and is going to use lookups for dropdown menus, and these lookups will either have multiple ...
3
votes
4answers
720 views

Is this database design sound and fully normalised?

I'm creating a database to store words. The intended usage is to query the database to find a word matching a set of filters. E.g. if I wanted to find a word with < 10 letters, < 3 syllables, ...
2
votes
1answer
71 views

When deciding a Primary Key, can I use Date part of a DateTime field

I'm designing a payroll system I have designed a database with several tables and this question is related to following tables EMPLOYEE (Employee_ID [pk], Name,... etc) LOCATION (Location_ID [pk], ...
0
votes
2answers
152 views

Examples of designing a database that handles point tracking?

I'm attempting to expand my knowledge of how database designs and concepts work. I'm working on a hobby web/mobile app for practice that will challenge me. However, I am running into an issue. What ...
3
votes
2answers
122 views

Refactor an old model of a LastUser Modification on every Object?

I have a software requirement, that needs to store the user that made the last modification to another object, for every object (assume that all objects are already mapped and into a BD). So we have ...
1
vote
0answers
53 views

Serialized values or separate table, which is more efficient?

I have a Rails model email_condition_string with a word column in it. Now I have another model called request_creation_email_config with the following columns admin_filter_group:references ...
4
votes
5answers
1k views

Structuring database for multi-object “activity” and “following” functionalities

I am working on a web application which operate with different types of objects such as user, profiles, pages etc. All objects have unique object_id. When objects interact it may produce "activity", ...
6
votes
1answer
343 views

How do I efficiently store all OpenStreetMap data in an indexed way?

I have a PBF file that contains the following information about a country: Nodes, each with their own longitude, latitude and properties; used to store points in a 2D space. Ways, each with their ...
1
vote
1answer
48 views

How to Structure a Trinary state in DB and Application

How should I structure, in the DB especially, but also in the application, a trinary state? For instance, I have user feedback records which need to be reviewed before they are presented to the ...
1
vote
2answers
83 views

How can you predict the time it will take for two processes in two different machines in a cluster to communicate?

I am trying to develop a computing application which needs a lot of memory (>500gb). Buying a single machine for that is overly expensive. I can, though, buy ~100 small instances on Digital Ocean or ...
10
votes
4answers
4k views

EAV - is it really bad in all scenarios?

I'm thinking to use EAV for some of the stuff in one of the projects, but all questions about it in stackoverflow end up to answers calling EAV an anti pattern. But I'm wondering, if is it that wrong ...
1
vote
3answers
101 views

How to design database having multiple interrelated entities

I am designing a new system which is more of a help system for core applications in banks or healthcare sector. Given the nature of the system this is not a heavy transaction oriented system but more ...
22
votes
13answers
2k views

How To Deal With Terrible Design Decisions [duplicate]

I'm a consultant at one company. There is another consultant who is a year older than me and has been here 3 months longer than I have, and a full time developer. The full-time developer is great. ...
-1
votes
4answers
85 views

Does semi-normalization exist as a concept? Is it “normalized”? [closed]

If you don't mind, a tldr on my experience: My experience tldr I have an application that's heavily dependent upon uncertainty, a bane to database design. I tried to normalize it as best as I could ...
1
vote
1answer
47 views

storing map template in database

I am working on an application that displays choropleth maps. These maps are of all different types, some display state by county, country by state/province, or world by country. How should I ...
1
vote
1answer
71 views

How does I/O work for large graph databases?

I should preface this by saying that I'm mostly a front end web developer, trained as a musician, but over the past few years I've been getting more and more into computer science. So one idea I have ...
0
votes
1answer
948 views

Practical mysql schema advice for eCommerce store - Products & Attributes

I am currently planning my first eCommerce application (mySQL & Laravel Framework). I have various products, which all have different attributes. Describing products very simply, Some will have a ...
0
votes
1answer
97 views

Can I use access used by Visual Basic for building a database [closed]

I am the only programmer where I work (summer job) and I am a student with only a few years of programming experience. So I was asked to build a database and I am very excited about this project ...
0
votes
0answers
75 views

Large invoice database structure and rendering

Our client has a MS SQL database that has 1 million customer invoice records in it. Using the database, our client wants its customers to be able to log into a frontend web site and then be able to ...
1
vote
2answers
135 views

How to represent a tree structure in NoSQL

I'm new to NoSQL and have been playing around with a personal project on the MEAN stack (Mongo ExpressJs AngularJs NodeJs). I'm building a document editor of sorts that manages nodes of data. Each ...
1
vote
1answer
41 views

Ticket/Raffle DB schema

I'm working on a project that, when all boiled down, is essentially a raffle. The twist is that due to the way we've set the ticket value, a user may be casting 10,000+ tickets. Essentially, a user ...
1
vote
3answers
100 views

Store history in SQL database column

We have a database that stores the process/history of particular machines. What I mean by that is that we have "started", "updating", "shutdown", and so on for all the computers in the company. The ...
4
votes
4answers
122 views

How to handle unexpected schema changes to production database

Is it a common or normal practice to encounter schema changes, especially renamed or removed columns, in a production database, without having been notified of the change? If unexpected schema ...
1
vote
2answers
239 views

Can I create a query which allows me to do this?

I have a table which stores user information, one column stores their ID. I had implemented four different attributes in the same table which stored a bit indicating which file operations that user ...