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
12 views

Connecting desktop APP directly to DB or through a proxy (WCF)

First of all, I am not a programmer anymore but like to stay in touch with development. I would like to develope a simple system for my teammembers to log their work and additional data. Basically, I ...
0
votes
0answers
14 views

How to store full dates & year-only dates in the same field in Microsoft Access?

In my database I have a field that for some records has a full date but for others has only a year. Right now I've defined it as a number so I can at least store the year-is there a way I can store ...
57
votes
10answers
6k views

Is it premature optimization to add database indices?

A colleague of mine today suggested that we go through all of the queries in our application and to add indices accordingly. I feel this is premature optimisation because our application is not even ...
3
votes
1answer
77 views

Do you still need created_by and updated_by attributes with dedicated auditing?

For as long as I have been writing database-backed websites, I have included created_by, created_at, updated_by, and updated_at in every single table. As you can guess, whenever a record gets created ...
0
votes
1answer
85 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 ...
-3
votes
0answers
70 views

Database Design: How do multilingual sites store product data? [on hold]

First, I would like to specify that I take Amazon as an example but the question could be the same with others big websites (wikipedia, facebook...). It is more a design question. Amazon is available ...
1
vote
2answers
36 views

How to handle inmutable data on Databases

I'm working on a quotation software. It basically creates quotations for customers based on certains ProductModel that contains n Plan that contains n PriceRange Edit: Here's a ER diagram of the ...
1
vote
3answers
60 views

Chat-service database design

I have an android/desktop application that I'm now releasing on the web, and as there are some social aspects I thought of adding a chat-service so users can IM as well. For this chat service, I want ...
2
votes
4answers
2k views

Best approach for a database of long strings

I need to store questions and answers in a database. The questions will be one to two sentences, but the answers will be long, at least a paragraph, likely more. The only way I know about to do this ...
1
vote
1answer
184 views

Is this database design good? What JPA Entities should I create for this design?

I am trying my hands on JPA. For this I am thinking of using the example of a student admission process as shown in the diagram below. Is this design good ? Any suggestions for improvement are ...
0
votes
0answers
24 views

ER Diagram Multiplicity (UML)

Schema: #=PK Employee (#NIN, fName, lName, address, DOB, sex, salary, taxCode, deptNo) Department (#deptNo, deptName, managerNIN, businessAreaNo, regionNo) Project (#projNo, projName, contractPrice, ...
0
votes
1answer
74 views

Laravel relationships and database schema

I am playing around with Laravel and came across something in the documentation for defining 1 to 1 relationships between tables that I would like to get feedback on. The example in the docs is ...
0
votes
0answers
20 views

Database data Bucketing Report Design

Here's the scenario: I have item x (item_id, customer_number, cost) which can be submitted to another system multiple times over months which may or may not reject item x before finally accepting it ...
1
vote
2answers
38 views

Performing data operations that involve separate applications and data sources

I'm designing an enterprise application that produces output based on some input data from another application. In this case, I happen to have also built and thus do control the source application ...
4
votes
3answers
3k views

Storing menu items with user permissions

I'm creating a menu system in PHP and MySQL. I will have several different menus and each menu will have a set of menu items connected to it. On the site, I also have different user permissions, some ...
0
votes
2answers
75 views

Implement a virtual tag on the database level

I have a set of objects, for which users manually applied tags, whatever they invented. I'd like to implement a task engine, where each task might be applied to objects from a tag. For convenience, ...
0
votes
2answers
34 views

DB Schema for a questionnaire - Different output from different combinations of responses

A user is required to complete a questionnaire - answering the questions in various categories. Depending on the responses from the user, the user will be presented with a number of recommendations. ...
0
votes
1answer
129 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. ...
0
votes
3answers
71 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 ...
1
vote
1answer
202 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 ...
10
votes
12answers
21k views

Using XML as data storage

I was thinking about the XML format and the following quote: “XML is not a database. It was never meant to be a database. It is never going to be a database. Relational databases are proven ...
4
votes
3answers
7k views

When should we use weak entities when modelling a database?

This is basically a question about what are weak entities? When should we use them? How should they be modeled? What is the main difference between normal entities and weak entities? Does weak ...
1
vote
1answer
51 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
0answers
14 views

Zerofill Auto Increment - mySql [migrated]

Ok, So I'm working on an app and I can't remember, for the life of me, why I set a zerofill on an Auto_Increment column when I created the database. And I couldn't exactly find any compelling info ...
0
votes
1answer
39 views

Database structure for links between objects of same class

I have seen elsewhere that it is a nice design to implement links between objects in a database as a separate object. This makes a clean way to have multiple objects of one class to be linked to an ...
3
votes
2answers
191 views

S3 image urls in database

I have an application where users will be able to upload multiple images for one Product (via something like Ryan Bates nested fields, so you'd click "Add Image", and a file upload would appear on the ...
1
vote
3answers
151 views

Is self referencing tables a good idea for geographical data?

I am creating a design for different Geographical types where each type is just a little "place holder" in over all heirarchy. One example is Zip code Belongs to Territory Belongs to District ...
5
votes
2answers
207 views

Hard Coded File Paths - Solution?

Say you have an application that saves image(.jpg, .png etc) and text(.txt, .xml) files, and the application has all of the files paths hard coded throughout code, per the example below. Assuming the ...
2
votes
1answer
161 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). ...
3
votes
2answers
59 views

Encrypting stored data for multiple unique users to access information

Developing a database for many users, and thousands more "people" in the database, one section requires we encrypt the personal data - Youth's information, medical information, etc. We have users who ...
0
votes
2answers
102 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 ...
0
votes
1answer
30 views

Merging user activities into one stream with a common representation

My social network website currently has forum threads and posts gallery pictures albums on the users' profiles group discussions classifieds I would like to create one "stream" of activity. It ...
0
votes
1answer
62 views

Application with really dynamic data structure [closed]

Well, I'm on the verge of this project that really puzzled me. The situation is, in our office, we have a department that collect data about the corporate performance indicators from all across the ...
0
votes
1answer
44 views

Is there an established pattern for associating a database entry with a Java class that executes on that data?

I have a behavior tree with different leaf nodes that execute tasks. When building out the tree relationship in the database I need an association between the leaf node entry and the Java class that ...
1
vote
2answers
61 views

Structuring data to represent a tree with squirrels

What I want to represent Let's assume I have several schemas of the following kind: It is a tree on which positions of squirrels are represented by a blue dot. The number of bifurcations differ ...
3
votes
3answers
239 views

Do I need use really INNER JOIN?

Imagine a coiffeur, with his services: +----+-----------------+--------+ | id | name | amount | +----+-----------------+--------+ | 1 | hair cut | 40 | | 2 | shampoo | ...
2
votes
1answer
88 views

What should be the structure of a person to person store database?

I am going to create a person to person store with Laravel, a website where its users can share and sell their product or their mobile, TV, Computer, Shoes, Shirts, Books, Cars, Bags, Animal, etc. I ...
7
votes
3answers
1k views

How should I represent an enumerated type in a relational database?

I am working on developing a relational database that tracks transactions that occur on a device I'm working on for my company. There are different types of transactions that could occur on the ...
0
votes
1answer
45 views

Class Table Inheritance: do child tables need a primary key?

I'm using the Class Table Inheritance architecture with my application and have read Fowler. When mapping my database tables to classes in code, I've realized I have no need for an "ID" property on ...
1
vote
0answers
89 views

Is this a good implementation of mongodb for a money management tool?

I have a money management tool which has users. Each user may have several accounts/funds (e.g. bank account). For each account/fund there may be thousands of transactions. Users may only view their ...
2
votes
4answers
178 views

Are NoSQL databases the best choice for more efficiently querying large amounts of data?

We are planning to build a travel website in which we will be integrating multiple APIs (eg. DOTW, GTA, Expedia) for Hotels. I have initially tried to use MySQL but since there are huge amounts of ...
1
vote
4answers
129 views

Database design for objects with multiple states

Context I'm designing a database which, simplified, should be able to handle users sending job requests to each other, and after that a job can be started, finished, and reviewed. The design should ...
2
votes
3answers
165 views

Effect of denormalizing

Here's a scenario where I'm wondering whether to denormalize a relational database (MS SQL). Text description of the requirement I have users (stored in a users table). Users belong to Accounts: ...
1
vote
1answer
46 views

Looking for advice for the following MS SQL Schema

We currently have the following SQL Schema: Projects Budgets BudgetTabs BudgetSections BudgetTasks BudgetTaskDetails ...
0
votes
1answer
121 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 ...
3
votes
1answer
157 views

What is exclusive arc in database and why it's evil?

I was reading most common database design mistakes made by developer Q&A on stackoverflow. At first answer there was phrase about exclusive arc: An exclusive arc is a common mistake where a ...
1
vote
2answers
195 views

many to many relation in database schema and oop class diagram

I have Student and Group entities. Student can have many groups and Group can have many students too. so in database I should have middle class and change many-to-many relation to one-to-many and ...
1
vote
1answer
114 views

A very simple database system with JSON

If we need to store some data in a database, but without the need of advanced SQL features, can we use this scheme (written here in Javascript / node.js) : // the DB will be in RAM ! var myDb = {}; ...
8
votes
3answers
434 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 ...
0
votes
3answers
71 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 ...