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

2
votes
1answer
93 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
87 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
65 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
11 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
87 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
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 ...
3
votes
4answers
711 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, ...
0
votes
1answer
45 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 ...
2
votes
1answer
69 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], ...
-2
votes
0answers
44 views

Any composite keys limitations with EF? [migrated]

Some ORM for .NET have limited support for composite keys. Stuff like relations, variant types and LINQ queries may or may not work depending on the case. I've even seen one ORM that doesn't even ...
0
votes
3answers
74 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 ...
1
vote
1answer
45 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
80 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 ...
1
vote
3answers
98 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 ...
-1
votes
4answers
82 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
0answers
52 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 ...
0
votes
1answer
94 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
64 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 ...
0
votes
1answer
106 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 ...
1
vote
2answers
126 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
99 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 ...
1
vote
1answer
69 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 ...
1
vote
2answers
237 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 ...
0
votes
2answers
96 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 ...
1
vote
1answer
124 views

Eventual consistency in Banking systems

I keep hearing people say Banking systems like ATM use Eventual consistency model for data synchronization, but I am wondering if it is true. Definitely the amount you withdraw might be delayed ...
0
votes
0answers
34 views

Charts, SQL and REST?

We have created a REST API for a voting game. Now we are jumping into creating analytics/graphs/charts for moderators and users to watch how are they doing in the game. The game has a certain group ...
1
vote
5answers
174 views

object model and data model

I have heard/read mixed things on whether to start with an object model or a data model. And more people say to starting with an object model as it will ease your data modelling. My question is, ...
0
votes
1answer
57 views

DATABASE design for storing specifications? [closed]

I am creating , a site like gsmarena , can any one help me with database design to store mobile specifications like here "http://www.gsmarena.com/asus_padfone_infinity_lite-6120.php" as user can add ...
1
vote
3answers
100 views

what are the things to take in consideration when designing a database that likely will be distributed after some time? [closed]

We are small start-up now, we don't have a DBA. if our project succeed, it will have a lot of data that will likely need to be distributed over several machines. So we want to make that step easier, ...
0
votes
2answers
84 views

Multi-Branch Retail System,how to control items quantity for various branches? [closed]

Currently I am developing Multi-Branch Retail software. All branches have the same set of items. However, each one has its own stock quantity. My question is, what is the best practice to apply in ...
2
votes
1answer
190 views

Inventory Management System Design Problem “Items Packages”

I am developing a retail management system with inventory management module, I am facing a logic design problem and I don't really know how to address the problem in an easy way, so I wrote an example ...
1
vote
1answer
68 views

Designing tables for recording rounds in a game

I'm working on website for the game of bridge and I am process to designing the table to store the bidding. Shortly about the bidding. 4 people at a table will bid clockwise until 3 players has ...
4
votes
4answers
119 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 ...
0
votes
3answers
85 views

Maintaining indices for location in a sorted list in database rows

I have a fairly simple data structure like this: create table project (id int auto increment primary key, name text); create table item (id int auto increment primary key, name text, project_id ...
1
vote
0answers
54 views

Redmine - Database Structure/Normalization

I am using redmine for project management and issue tracking. I was looking at the database tables and the underlying structure and was wondering if anyone who is experienced with database ...
0
votes
1answer
23 views

Place measurement data in database (access)

In a software I use records of measurement data. Each record contains basic information like a name, some parameters and the actual measurement data in the form of three arrays of double values that ...
1
vote
1answer
87 views

Database Schema Data Independence [closed]

I'm currently reading about database schemas about how the three-level ANSI-SPARC architecture works and i'm a bit confused about a concept it's talking about. My question is what would happen if an ...
1
vote
1answer
82 views

How to choose data storage method for user generated data?

In a program I am writing, I have 3 different ways to store user generated data: (a) XML Files for each object (.Net Serialization) (b) SQL Database (MSSQL) (c) Massive terrifying blob of data in 1 ...
0
votes
1answer
80 views

Dividing database between MySQL and NoSQL

Mine is a typical website developed with LAMP stack. Due to scalability issues we are planning to incorporate NoSQL for the application. For the implementation, we are planning to implement hybrid ...
-1
votes
1answer
106 views

Should We Use Surrogate Primary Keys for Every Table? [duplicate]

We are developing a data model for a marketing database that will import transaction, customer, inventory, etc. files and the directive is ONE process that works for every client. We have been told ...
0
votes
0answers
38 views

What is a good way to store geographical data for distance calculations

What would be the best way to store data in a database for geographical calculations? Say I have an ItemsForSale table paired to a Users table which holds their geo location. I know I can use latitude ...
0
votes
0answers
8 views

Globalizing geographical information in data design

I am building my database/models/viewmodels right now and can't think of a good variable name to define for the equivalent of a "state" in other countries. I currently have Country and City which are ...
1
vote
1answer
102 views

Database design: circular reference but dynamically created

I am trying to design database for this case: Assignments have vectors, relation is 1:N Assignments have submissions, relation is 1:N Submissions have executions, relation is 1:N Every execution ...
0
votes
2answers
146 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 ...
1
vote
3answers
66 views

What are the use cases for these relationship types?

Use Case What are the use cases for creating a one-to-one relationship where the parent points to the child compared to a child pointing to the parent? If there is no difference, is one preferred ...
1
vote
1answer
70 views

Database Design for Web based RSS Feed Agreegator

I am working on an open source application which can allow users to add RSS feeds. All users of the site can read the content of those RSS feeds. It's not just for user's own feeds. Using PHP and ...
3
votes
2answers
165 views

Is it right to persist a computed property to the DB?

I would like to know what do you think about persisting an "autocomputed property" to the database. For example I have these properties decimal Price {get;set;} decimal Tax {get;set;} decimal ...
1
vote
1answer
68 views

Design: Mixed XML / Relational or Pure Relational?

Is it acceptable to model a very complex object graph using XML in the database, but leave the rest of a system in relational tables? I'd like to gauge opinion on this as I've hit a bit of a ...