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
3answers
48 views

What is the hierarchical DB schema for this xml?

As per this link, this is the xml that maintains "BookStore" data. I see that number of occurences of author are varying for any book. xml's hierarchical representation of BookStore looks more ...
-2
votes
0answers
30 views

Databases or Tables for mobile apps [on hold]

Just wondering how many databases an app like Beatthetraffic or Inrix would have? Would each type of entry require separate databases or just different tables?
0
votes
1answer
25 views

Best approach to implement an update operation of a container object?

I have an Invoice object wich may contain several FacturedServices objects stord as a list. In may interface, the user can edit an Invoice object, delete add or edit its FacturedServices list. Whe ...
3
votes
1answer
34 views

(HTML) Form structure storage

In the context of a single-purpose website/application (for instance, based on Symfony2), I wish to have a set of forms fillable by users which then will be sent out as a formatted email (with the ...
0
votes
0answers
72 views

Dealing with several custom getters

I have a data structure with data units containing different types of data. I've wrapped the data in "Field" objects so that each field is able to independently parse user input in a desired way. ...
2
votes
3answers
129 views

Best approach for storing huge data

I'll be handling 300,000+ users. Each user (after logging in) will be able to create lets say "folders", in each folder, users will create "name=value,name2=value2,name3=value3" entry pairs. Each name ...
6
votes
3answers
203 views

Decentralized Data Management - encapsulating databases into microservices [closed]

I've recently been taking a course on Software design and there was a recent discussion/recommendation about using a 'microservices' model where components of a service are separated into microservice ...
1
vote
1answer
45 views

Creating a separate table for images or adding “image fields” to many tables?

I need to create a database in which several tables have images. For example, users have profile pictures and uploaded ones and products have many pictures, as well. Is it better to have one MySql ...
4
votes
2answers
95 views

Using audit trail as time machine?

I would like to do SELECT * TABLE t (using data from 1st of march 2012) I already have a nice audit trail of all tables in the database. It basically makes a copy of all rows that change, storing ...
50
votes
7answers
2k views

Code First vs. Database First

When I design and create the software I work on, I typically design and create the back-end SQL tables first and then move on to the actual programming. The project I'm currently working on has me ...
3
votes
2answers
73 views

Database design for polymorphic data

I have an application that needs to log communications with users over several different mediums: Email, SMS, Voice, Website Announcements, etc.. in a traditional database. I have considered 3 ...
0
votes
0answers
29 views

I have two applications… use NoSQL or RDBMS? [duplicate]

I have two applications in the making: one is a budget management tool; the other is a article based places/restaurant guide. The budget management tool works where users create accounts (e.g. bank ...
4
votes
3answers
114 views

How to track temporal changes in a database?

Imagine a software for theater owners. You can accept reservations for the different cinema halls. Each hall has a different number of seats. Say the owner wants to know how many people visited the ...
2
votes
2answers
116 views

Should I use relational or noSQL databases for this problem

I'm working on a project where one part is to save data of different people. A typical person might have the following structure: Email: Multiple values possible City: Multiple values possible ...
2
votes
1answer
51 views

How to represent an optional-to-optional relationship in a database

I have two types of users: a CRM user and a system user. We have a record of every CRM user, thanks to a nightly sync that we run (so we don't have to hit the CRM API every time). We have system users ...
0
votes
1answer
40 views

user verification value - where to store [closed]

Quick question as relates to database. Where would you store the value of "UserVerified"? (The one that occurs after the user has checked his email and clicked on the "Verify" link with the hash ...
0
votes
2answers
55 views

How to Design Database with User-Contributed Content

I'm building an application where there are different "Locations". There are Stores, Bars, Schools, and Churches (and so on) all of which are geocoded and defined by existing data sets. While not ...
-1
votes
1answer
99 views

Best way to track 200 boxes [closed]

I have a php/mysql application that needs to track a simple on or off setting for 200 boxes. I use it for a fundraising application. Basically there are 200 buttons. A user selects a button numbered ...
0
votes
1answer
21 views

Looking for advice for the following MS SQL Schema

We currently have the following SQL Schema: Projects Budgets BudgetTabs BudgetSections BudgetTasks BudgetTaskDetails ...
1
vote
1answer
32 views

Proper tree NoSQL structure with focus on full-text searching

I developing an app with tree(folder-file) structure, on which I should perform full-text searches with MongoDB. I did a research on the best tree structure practices and found this great article, but ...
0
votes
4answers
91 views

Is there an accepted design pattern for storing a few global variables in a NoSQL database?

I'm wanting to create an admin dashboard for my app, and to show new events there. In order to know which events are new, I'll need to store at least one extra datapoint to the server: the last date ...
3
votes
2answers
92 views

Integrating Holidays and Attendance in an HR Management System

I'm developing a small HRMS system for my company, and am currently thinking of how to integrate attendance and holidays. We currently have an in_time/out_time based daily attendance system, but the ...
2
votes
3answers
162 views

What are the advantages/disadvantages of creating a new set of tables for each user?

I'm working/playing on an app where individual users' data will be completely independent from each other. Of course, there will be common tables for other parts of the app (e.g. "users"), but for the ...
0
votes
1answer
79 views

Would it make sense to have a database table with only one record for tracking site summary stats?

I'm creating a web site that deals with monetary transactions. Users can deposit funds into a wallet and use them on the site. I'd like to keep track of some stats for the web site, like revenue and ...
2
votes
2answers
129 views

Designing a system to archive databases with referential integrity

I have a very large Oracle database, with many many tables and millions of rows. I need to delete some of the rows end-to-end. By end-to-end, I mean, if I want to delete a row from a table then I must ...
0
votes
0answers
26 views

Managing allocation calendars for an employee set [duplicate]

IN view of creating a MIS (Management Information System) one architectural/design issue that's confronting us is managing allocation for set of employees. Scenario: Employees get allocated to ...
0
votes
1answer
51 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 ...
0
votes
2answers
52 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 ...
13
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
52 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
383 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
156 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
93 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
63 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
248 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
210 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 ...
3
votes
2answers
95 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
33 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
46 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
57 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
292 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
89 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 ...
0
votes
2answers
94 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
87 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
49 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
65 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
187 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
57 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
155 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
90 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 ...