For questions about structuring the data within a database. How to lay out tables, whether to use a relational DB or not, etc.
3
votes
2answers
53 views
Is it a good idea not to embed certain one-to-one relationships in a Mongo database?
I'm designing a NoSQL database schema - MongoDB in particular - and I'm wondering if it's a good idea not to embed certain one-to-one relationships.
For one example, I have an accounts collection, ...
1
vote
0answers
35 views
How many vertices/nodes are too many in a graph and stop being beneficial?
Background
I'm working on a project that requires me to keep track of transactions as well as the flow of items in a game.
In order to do that, I'm storing those transaction in a graph db ...
4
votes
3answers
142 views
Use of booleans in a database
I'm using Visual Studio 2013, .Net 4.5 and SQL Management Studio 2012. I have a table that tracks offices in my database. On the application side there are a some display rules regarding the layout ...
0
votes
0answers
22 views
Which is the best way to manage multI-account multi-user web application ?
I Am junior web developer, currently I developing school application with PHP and MYSQL, after finishing the app I would like to distribute more schools by allowing them to register in the app and use ...
3
votes
5answers
162 views
Is it a bad practice to have a “record status” column in a database table?
I have to clarify first that the status column is not intended to reflect the status of a real-world item represented by the record (row) in the table. Rather, it is intended to show the status of the ...
0
votes
1answer
42 views
How to uncouple and reuse persistence logic, user interface logic and business logic amongs embedded software projects
I have been working in embedded devices business more than 5 years as a software engineer. Most of the times our hardware manufacturers provide a Software Development Kit for their reference boards. ...
2
votes
2answers
33 views
SQL - Design concepts - Relationships - Referential Integrity - Cascading
THE SCENARIO
I learned about basic database design concepts such as basic CRUD operations, referential integrity, relationships, etc., years ago. I've messed around with databases and used this ...
1
vote
2answers
56 views
Database error prevention
Im designing a database structure and I would like that it's design could prevent erroneous connections.
I'll make a simple example, that I think it will be easy to understand, bellow are the tables:
...
2
votes
1answer
65 views
How to handle db authentication in multi tenant application with separate databases?
In a multi tenant application with separated databases for each tenant, what would be the best way to authenticate connection to each of these separate databases. My goal is to:
Main security ...
0
votes
1answer
38 views
Recursive partitioning example
I am trying to understand an example in Chapter 12 (Query Processing) of Database System Concepts, Sixth Edition.
A relation does not need recursive partitioning if M > nh +1, or
equivalently M ...
2
votes
1answer
114 views
Should I store cryptographic hashes as a blob or as a string?
I'm new to MongoDB and am wondering how to decide to store some cryptographic hashes. Should I store the binary data itself, as a blob, or should I store its string representation as a string?
My ...
2
votes
1answer
37 views
How to store 1:n self reference (dependencies) in relational database
What is a clean way to store items that reference multiple other items of the same type in a relational database?
Say I have a list of jar files and their dependencies:
package1 depends on ...
6
votes
3answers
95 views
Storing hours a merchant is open in postgres
In postgres, I need to store the hours a merchant is open each week. Essentially, the information you'd see posted on a sign in the merchant's door:
Mondays: Closed
Tuesday-Friday: 9am-1pm, 2pm-6pm
...
0
votes
0answers
23 views
Unifying database interface for multiple authentication methods
I'm working on a project with Mongo as the db. Currently, we only allow users to sign up with email and we look them up in the db by email address.
But now we're moving to allow users to sign up ...
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 ...
2
votes
0answers
82 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
51 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
22 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
29 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
45 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
137 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
101 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
67 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
62 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 ...
42
votes
8answers
6k views
Is the use of NoSQL Databases impractical for large datasets where you need to search by content?
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
789 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 ...
-2
votes
1answer
65 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
59 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
102 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
40 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
125 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
146 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
150 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
55 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
48 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
151 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, ...
2
votes
1answer
130 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
38 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 ...
9
votes
3answers
312 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
132 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
194 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
68 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
137 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
67 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
67 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
69 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
624 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
73 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 ...