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

Can this be further normalized? [migrated]

I have to define a system where we will be storing Image data and which can have an arbitrary number of attributes for the Image added per client. I have designed the following table Image ImageID ...
1
vote
0answers
45 views

How should I store usernames and passwords for user login using php/cassandra?

I am new to NOSQL and Cassandra. I am not sure if I should store usernames and password in Cassandra. If I should, what is the best way to do that? I am getting lots of conflicting ideas from ...
1
vote
2answers
48 views

DB Design for non static front-end

I have a question about best practices to design a database which have to hold the following data: There is a page with a questionnaire which has default questions like Firstname, Lastname, Street... ...
0
votes
0answers
19 views

Best way to create “attributes” for Neo4j node?

I have this node labeled "Person" and these various items from what would be a class, in a conventional DB. For example: Teacher, Lumber, Magician, Artist and Painter. They should all fit in the same ...
0
votes
1answer
23 views

User account model with two or three possible profile

My application will have at least two types of users: clients and companies, these are the types of profiles. Because each type of profile requires different additional information, it will be ...
1
vote
2answers
39 views

Difficult design with multiple associations between two entities

I'm trying to design the data schema and the restful api for a specific case. In my system I have several users and several books. Every book can have several users as authors and at the same time ...
2
votes
3answers
130 views

How can I store incomplete records but enforce data correctness?

I'm in the planning/design stages of a new project, and I'm having trouble coming up with a good way to handle one of the requirements: Users must be able to create a new record and save it as ...
2
votes
2answers
92 views

Database Design - lots of small tables or fewer, bigger tables?

So I'm designing a database for a project which is going to enable beauty businesses to create a profile, clients to create a profile and for the client's to be able to book appointments and for the ...
5
votes
2answers
65 views

Junction table related to another junction table

I'm defining a DB structure, and I have a strong feeling I'm not doing it right. I have hotels that can be configured to offer some optional services (airport pickup, massage), that can in turn be ...
-1
votes
1answer
61 views

Is there a generally accepted definition of “Secondary Index” independent of DB product? [closed]

Is the definition for "Secondary Index" anything more specific than just "Any index that is not the primary index"? EDIT: Here is some research I have done: Search Google. I evaluated the first 20 ...
40
votes
8answers
5k views

Isn't the use of NoSQL Databases impractical in a large number of use cases? [closed]

I've been learning about NoSQL Databases for a week now. I really understand the advantages of NoSQL Databases and the many use cases they are great for. But often people write their articles as if ...
9
votes
8answers
778 views

Designs and practices to guard against erroneous null entries from database

One part of my program fetches data from many tables and columns in my database for processing. Some of the columns might be null, but in the current processing context that is an error. This should ...
-1
votes
1answer
93 views

Efficient way to query thousands of records by ID from a Mongo document with hundreds of thousands of IDs - or is that infeasible? [closed]

I have a web application that registers users from Twitter. When someone logs in I want to fetch his list of friends and compare it with all the registered users ids in my database to see which of his ...
-2
votes
1answer
123 views

Which database could quickly query on different columns of a billion records database ? (See the scenario) [closed]

I wonder which NoSQL technology i should use to do this scenario ? And how to design it (hash-partition, indexes, partition, BTree ...) ? I'm working for a phone company which have to store billions ...
-2
votes
1answer
59 views

Should I be using XML to store configuration values in a database?

There are a couple of answers on SE comparing single-row table vs. name-value-pair table used for config settings, but I haven't seen anyone arguing for using XML (or JSON) as a name-value pair ...
1
vote
1answer
50 views

BigData: time-based word count

What we are trying to do: We're trying to build a system that will count the number of unique entries for a certain timeframe. It's working ok until the data grows up or the timeframe increase, then ...
3
votes
3answers
95 views

Relational table design for data ownership

Setup (schema simplified for clarity) Suppose I have a table called resource: +---------------+--------------+------+-----+ | Field | Type | Null | Key | ...
2
votes
1answer
37 views

Design activities / events logging (ex: fields update) in RDBMS

I am trying to implement a activity tracking system in Ruby on Rails for an API only application. I have a table named letter with information as follow : id (primary key) sender_id (foreign_key on ...
5
votes
2answers
115 views

How to store ordered information in a Relational Database

I am trying to understand how to properly store ordered information in a relational database. An example: Say I have a Playlist, consisting of Songs. Inside my Relational Database, I have a table of ...
4
votes
2answers
143 views

What is the recommended strategy to deal with a frequently changing database model during development

A lot of projects have a to be determined database model during early development. This could mean that a lot of SQL will have to be rewritten frequently. What is the recommended strategy to deal with ...
5
votes
3answers
139 views

Is it a good practice to have a pre-filled embedded database for development?

I'm currently working on a project which only uses its database for data storage. This means there are no triggers or stored procedure in it, just tables and data to put into it. In this scenario I'm ...
1
vote
1answer
80 views

How to handle multiple “valid after {date}” in a performant way

We work on an Application which displays a duty roster and also some other DateTime related things. So my Database is full of Relations like in this small Example: This results in big ...
1
vote
1answer
26 views

Best Multiple tables product with categories

I was looking to create an EAV structure for an inventory management system. But I read this answer and decided against it. I am looking to create multiple tables for all my products. But the trouble ...
4
votes
2answers
46 views

AutoIncrement Integer Column,Guid or PGuid, which to choose?

Guid has been a Global Unique Identification. Why does "PGuid" (Global Unique Identification) appear? 1) Is Guid NOT PERMENT for unique? (I sometimes wonder whether Guid is REALLY PERMENT generator ...
3
votes
2answers
146 views

One wide table or multiple themed tables?

I'm trying to design a database for a simple text based game where the player characters have a large number of statistics that I want to track. Currently I have a few groups of related statistics, ...
1
vote
1answer
106 views

Elasticsearch and relational database combination

Imagine I have a marketplace application - where users can search for products (we concentrate on clothes). Every product has an ID, name (text), description (text), price (numeric), size (numeric), ...
0
votes
0answers
37 views

Designing how to add multiple items for a user in a database?

I'm relatively new into designing databases so this is my first project and I'm trying to understand better it's structure. I need to create a SQLite database where there will be a simple USERS table ...
8
votes
3answers
251 views

Which data store is best for my scenario?

I'm working on an application that involves very high execution of update / select queries in the database. I have a base table (A) which will have about 500 records for an entity for a day. And for ...
0
votes
4answers
130 views

How to avoid null in primary key? [closed]

I need to make table that seems to require two column primary key with one of the columns nullable. But according to questions I read on Stack Overflow that is undesirable and even against SQL ...
31
votes
5answers
4k views

No central database

I have a client that is looking to get a website/mobile apps/desktop apps built that deal with very sensitive data (more sensitive than bank/card details). Because of the sensitive nature of the data, ...
2
votes
2answers
169 views

Merging two applications into one

Background: My bosses want to merge two application that have two separate purposes. One being for monitoring of equipment and bandwidth for our internal network operations. The other is an ...
0
votes
2answers
58 views

Event places - venue and hotel (database design conceptual question) [closed]

Hope this question is right here. TL;DR Database design for event places (venue and hotel), hotels can be venues. Long Version Introduction I'm developing a software for trainings. Trainings are ...
4
votes
3answers
127 views

How to store records with variable structure?

We have an old system to manage inventory adjustments that is going to be remade. There are different type of reasons to make an adjustment, and each type requires different data to be filled. Some ...
3
votes
1answer
64 views

How far should I abstract my pseudo-database?

I'm building a [Process-Tracker] thing In Excel. I would use Access but I can't guarantee that the End-Users will all have it. So there will be a list of open cases, with a history of the previous ...
3
votes
1answer
64 views

Two tables with similar structure and referential integrity or one table

Overview My question revolves around balancing database and code simplicity using 2 options to design around the following requirement. Background Facts The DB: Sql Server The Code: ASP.NET MVC ...
0
votes
1answer
68 views

SQL Table With A Call To Action?

This is all done in Microsoft Access 2007 and SQL Server. We are creating a way for our users to quickly make notes on a customer. These quick-notes will contain tags that will prompt the user for ...
12
votes
1answer
592 views

Is it wasteful to create a new database table instead of using enum data type?

Suppose I have 4 types of services I offer (they are unlikely to change often): Testing Design Programming Other Suppose I have 60-80 of actual services that each fall into one of the above ...
1
vote
0answers
72 views

Data Store Design for NxN Data Aggregation

I am trying to come up with a theoretical solution to an NxN problem for data aggregation and storage. As an example I have a huge amount of data that comes in via a stream. The stream sends the data ...
1
vote
1answer
221 views

Multi-tenant database design

My boss is currently working on a database design for a multi-tenant capable ERP/CRM system, which will have a Sql Server backend. Some key points of the design: A server instance will host a ...
2
votes
0answers
113 views

PHP Vertical Columns from 3 SQL Tables

I work at a high needs school in which there are several classes that plan their work through Excel spread sheets grading and tracking student progress. We have come to the conclusion that this ...
2
votes
1answer
92 views

Database Structure: A product that will only temporarily be available and then slightly change

I'm trying to migrate lagacy data to a new eCommerce system which I'm building myself and I have full control over (so I can modify it however I want). There is a product that came with a free gift ...
0
votes
1answer
156 views

How to design a database schema for a multi-user To-Do application in Azure?

I want to create a windows 10 universal to-do app with offline sync capability. So I checked out this tutorial which helped me to get started on the offline functionality. But I was wondering how ...
3
votes
1answer
95 views

Storing an all day event in database

I have an event table that should store events (dt_start, dt_end, all_day,etc). I saw that .ical files stores dt_start and dt_end as the same day (without time) for an "all_day" event. Question: ...
1
vote
1answer
53 views

multiple accounts with the same roles represented as one row in the database

Say there is an online hotel management application. One feature is the Receptionist will confirm and cancel bookings made by the customer. So all Receptionists do the same things. Is it bad practice ...
4
votes
2answers
76 views

Storing persistent data that only has a single instance but can change

I'm creating a website CMS in Rails (for fun and learning) and I'm trying to figure out how I'm going to store the data for an "about" page. Due to the nature of this page, the data will only have one ...
10
votes
2answers
508 views

Is there a design pattern for managing deep many-to-many relationships?

I'm having trouble defining this data pattern I've come across working on several applications. It consists of: An object type which is composed of many objects itself A second object type, where ...
4
votes
3answers
106 views

When to load related database data in web request?

I'm trying to determine when a web application should query a database for related data that may or may not be used in the current request. As an example, consider a database that tracks assets for a ...
0
votes
1answer
179 views

Best way to design a database interface [duplicate]

This is my situation I have a website, mobile client and desktop client. They can all pretty much do the same operations (website might be able to do more now but in the future they might have the ...
2
votes
2answers
130 views

Where to put the Country Table?

It might sounds like a silly question but here is my problem. We have 100s of databases and in each of those databases, there is a country table. It was ok this way but we ran into minor problems at ...
6
votes
3answers
524 views

Is using hashes for primary keys a good idea?

The Austrian electronic ID card relies on the so-called sector identifiers. For example a hospital gets to identify a person by getting a sectorId for that person, which is computed roughly as ...