For questions about structuring the data within a database. How to lay out tables, whether to use a relational DB or not, etc.
0
votes
2answers
38 views
Representing category splits in a personal finance database
I'm working on developing a personal finance applications (e.g. Quicken/Mint.com/etc..). I plan to store the data in a SQLite database. I'm stuck trying to determine how I want to represent splits in ...
11
votes
3answers
2k views
Database schema for a ToDo list
I am trying to make a very simple todo list application with PHP, MySQL, Jquery templating and JSON... However, my schema seems to complicate things in JSON.
What's the best way to do it?
A new ...
2
votes
1answer
30 views
Architecture: Storing all properties as JsonProperty in NDB?
I am storing the data for my app in Google's NDB, but am confused as to what architecture to use. The app data is mostly text based, but has some non-text properties like DateTimeProperty, ...
6
votes
4answers
309 views
Heterogeneous Associations - Data Modeling When an Object that Must Relate to One of Many Classes
Suppose you have 3 classes: ClassA, ClassB and ClassC. Now suppose you have a class Message. You want a one-to-many relationship between each one of those three classes and the Message.
The goal is ...
1
vote
3answers
67 views
Database design: 4 types of users but have different functionality , separate or one table?
I have 4 types of users:
Admins ,
normal user ,
company ,
service provider
admins and normal user share some attributes (id .first name ,last name ,phone ,mail)
company and service provider share ...
0
votes
1answer
49 views
RDBMS (MySQL) logic question. How to join multiple “FRIENDS”
so this is a logic question as to creating the proper relationships in a MySQL database.
What logic would you choose for the following scenario?
This is a back-end for an app where people can have ...
1
vote
1answer
52 views
How to associate both a collection and one item of this collection to an entity
I'm working on a project in which I have an entity, we may call Users and another entity Address.
I want to define the entity User in a way that an user would have a collection of addresses ...
5
votes
2answers
237 views
Database Normalisation - stuck with “categories”
Context:
I'm working on a database of museums and Categories will be one way the user will be able to search. e.g click on "Music" and a list of music related museums turn up. Pretty simple.
...
3
votes
1answer
197 views
How to store a potentially large amount of optional properties of objects?
I'm using Entity Framework Code First with ASP.NET MVC. This handles my database design based on the domain models within my application.
As it stands, the engine I'm writing will have a website ...
2
votes
2answers
94 views
Database Design for Inheritance
In my project I have an object Player (attr example: pl_id, pl_data1) that is one of these types:
Its GoalKeeper (attr example: gk_data1)
OR Defender (attr example: df_data1)
OR Forward (attr ...
0
votes
1answer
30 views
is there anything called logical schema and the conceptual schema of a database table?
i want to know whether there is anything called logical schema and the conceptual schema of database table. if so what is it.i searched lot of places for this specific two words, but did not find ...
0
votes
2answers
37 views
combining user data from user table and user_profile table to just one table [closed]
We are using two table to manage user data. A user table that has a username, email, password. Then a user profile that has first name, last name, bio, etc. Due to some other requirements it has been ...
1
vote
0answers
49 views
Best approach for displaying a price from a product according the “setup”? [Designing the DB table and relations]
I'm basically building a reseller website, in which people can buy (users) from a predefined product list and sell them at a higher price (clients).
I will show you some images to explain better ...
2
votes
3answers
159 views
Best approach for an online store which changes its product’s price over time? [Designing the DB Table]
I am currently creating a website which will allow people to buy consumer products (deodorant, shampoo, toothpastes, etc…) from a store. Those products tend to change price and other details twice per ...
1
vote
1answer
86 views
Representing list of polymophic objects in db
Let's suppose I have a list of derived objects from some base:
class Circle : public Shape;
class Rectangle : public Shape;
There is object, which has vector of Shape * as member variable:
class ...
2
votes
0answers
59 views
CouchDB and document versioning [migrated]
I'm currently working on a wiki-esque application using CouchDB and am trying to implement a document versioning scheme. The way I see it there are two ways of doing this:
Store each version as a ...
0
votes
2answers
66 views
Optimal Database design for 3-way relationship
All right, I know this sounds complicated, but all relationships are, lemme clarify. Well, I have three entities in my database which are tied to each other in a string of relationships, the app is ...
1
vote
2answers
72 views
How to minimize networking cost of distributed game database?
We've been working on a networked online game project which will run in near future and
looking for a satisfying solution for our distributed game database. We didn't take networking costs
into ...
0
votes
0answers
43 views
Best solution for future maintenance of a website with hardcoded ids, custom CMS using bad database design
Recently I was put into a position of a tech-lead on a very interesting project that I have been partially working for two years. This project carries a lot of legacy stuff with it even though we try ...
-1
votes
1answer
55 views
Naming a recursive association entity [closed]
For my current project, I need to create a database table to store a recursive association. I've done a lot of searching and have read answers on questions, such as Naming convention for associative ...
1
vote
1answer
168 views
Data model for persisting queries to database
I have been asked to build what is essentially a query builder for a reporting application.
The variety of objects to query, potential modifiers, number of conditions, and so forth to be reported on ...
0
votes
1answer
45 views
Multi-lingual support implementation in a website
I'm developing a Multi-lingual website which is being developed in custom PHP and using MySql. To implement the multi-language support, I've come to think of this approach (steps below). Please ...
1
vote
5answers
135 views
Database design with performance issue and use of views
I am designing database for a school system. I am having to create a lot of tables and a lot of link tables to maintain a structure in the system.
I am trying to maintain foreign integrity and trying ...
1
vote
1answer
86 views
How to save appointments in database?
There are 2 entities. One is admin. The task of admin is to define slots for appointments which will be taken by applicants.
The admin will choose a default time for the appointments like 10am to ...
4
votes
3answers
316 views
Is MongoDB appropriate for systems that will be likely to change?
I've been using MongoDb (mainly with Meteor) and for me, it has been a great way to mock up prototypes and proof of concepts quickly.
I'm just wondering, after building the initial product, if your ...
0
votes
1answer
26 views
Storing and presenting custom table data
I have a web site upon which I want to provide users the ability to create tables of data. These tables will come from a predefined list of table definitions of which I will be adding to myself. This ...
0
votes
1answer
92 views
Single database, multiple system dependency
Consider an environment where we have a single, core database, with many separate systems using this one database.
This leads to all of these systems have a common dependency, which ultimately ...
0
votes
1answer
51 views
Does this Relational Database Model make sense?
Here is a flat version of my datamodel. It is sensor readings for various data acquisition equipment.
...
3
votes
2answers
154 views
Would these two scenarios be good candidates for a NoSQL database?
I've checked a few other threads around the topic and search around, I am wondering if someone can give me a clear direction as to why should I consider NoSQL and which one (since there are quite a ...
0
votes
0answers
27 views
Implementing multiple tables for the same entity due to processing power on Client apps
I reached a design/architectural issue on the large application I'm working on, at the point of writing possibles solutions on a chalkboard. Our product consist of a client-server information system ...
0
votes
0answers
28 views
Product Configuration with conditional options
Suppose you need to create a website where you can choose a Widget, and then configure all of the various options to go with that widget.
The options have many interactions. For example, if you ...
1
vote
1answer
74 views
Entity-Attribute-Value table vs single table for storage of posts, events and pages
I am trying to decide whether to just use individual tables with more fields for storing posts, pages and events or using tables with basic fields plus having EAV tables as well for fields that are ...
1
vote
2answers
63 views
Patterns for undo in multi-user applications on relational data
I want to build a web application that will allow multiple users to collaboratively populate the contents of a fairly conventional relational database. (The database will have a fixed schema, which is ...
0
votes
0answers
48 views
Extending database model of ORM in subproject
I have a maven project which contains some entities which are stored in a database. The purpose of this project is to manage personal information, users, locations, etc. This project can work on its ...
0
votes
0answers
23 views
how to reduce or stop duplication of relation's entry in treeview
I want to create tree-view for display or show family member's relation. For this I created 3 tables i.e following.
familyDetails->[f_id,fname,lname]
relations -> [r_id,relation] .....//e.g ...
0
votes
2answers
55 views
Data model - inheritance
I just started working on a project where I am trying to implement some backend logic which includes creating a data model for the given problem. Here is a problem I came across and I am curious what ...
0
votes
2answers
49 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
61 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
77 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 ...
2
votes
2answers
79 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 ...
3
votes
5answers
253 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 ...
1
vote
4answers
129 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 ...
2
votes
4answers
330 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 ...
0
votes
2answers
78 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 ...
2
votes
1answer
124 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
2answers
101 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
103 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 ...
0
votes
0answers
54 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
100 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
1answer
47 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 ...