tagged [database-design]
What are database normal forms and can you give examples?
What are database normal forms and can you give examples? > In relational database design, there is a concept of database normalization or simply normalization, which is a process of organizing column...
- Modified
- 8 Feb at 10:8
What's the longest possible worldwide phone number I should consider in SQL varchar(length) for phone
What's the longest possible worldwide phone number I should consider in SQL varchar(length) for phone What's the longest possible worldwide phone number I should consider in SQL `varchar(length)` for ...
- Modified
- 27 Feb at 10:28
Persisting Enums in database tables
Persisting Enums in database tables I have an order which has a status (which in code is an Enum). The question is how to persist this. I could: 1. Persist the string in a field and then map back to e...
- Modified
- 23 Mar at 16:22
Should a many-to-many relationship define anything other than the relationship
Should a many-to-many relationship define anything other than the relationship Taking the typical products / categories many-to-many relationship you'd typically have a relationship like follows: Is i...
- Modified
- 6 Mar at 18:12
Primary key or Unique index?
Primary key or Unique index? At work we have a big database with unique indexes instead of primary keys and all works fine. I'm designing new database for a new project and I have a dilemma: In DB the...
- Modified
- 30 Aug at 13:59
Database, Table and Column Naming Conventions?
Database, Table and Column Naming Conventions? Whenever I design a database, I always wonder if there is a best way of naming an item in my database. Quite often I ask myself the following questions: ...
- Modified
- 29 Sep at 14:40
INSERT INTO if not exists SQL server
INSERT INTO if not exists SQL server I have a database structured as follows: The first time a user logs in I would like their info to be added to the users table. So essentially the logic I would lik...
- Modified
- 10 Mar at 18:54
Why use multiple columns as primary keys (composite primary key)
Why use multiple columns as primary keys (composite primary key) This example is taken [from w3schools](http://www.w3schools.com/sql/sql_primarykey.asp). My understanding
- Modified
- 19 Jan at 11:47
Accounting Database - storing credit and debit?
Accounting Database - storing credit and debit? When you store a transaction into a database 1) Do you store Credit and debit in the same record under two different columns? (without the positive or t...
- Modified
- 2 Nov at 02:1
Database model for storing expressions and their occurrence in text
Database model for storing expressions and their occurrence in text I'm doing a statistical research application. I need to store words according to 2 initial letters which is 676 combinations and eac...
- Modified
- 6 Jun at 00:10
mysql query speed
mysql query speed I just want to ask which out of the two ways of storing data would give my better results A. Storing data in a single table with over 20+ columns OR B. Distributing the data into two...
- Modified
- 31 Jul at 13:39
Best method to store Enum in Database
Best method to store Enum in Database What is the best method of storing an Enum in a Database using C# And Visual Studio and MySQL Data Connector. I am going to be creating a new project with over 10...
- Modified
- 15 Apr at 15:8
Is the usage of stored procedures a bad practice?
Is the usage of stored procedures a bad practice? We have an application that is written in C# that is connected to a ms sql server. We use to make a stored procedure for every database call, but then...
- Modified
- 19 Nov at 09:28
Calendar Recurring/Repeating Events - Best Storage Method
Calendar Recurring/Repeating Events - Best Storage Method I am building a custom events system, and if you have a repeating event that looks like this: Event A repeats every 4 days starting on March 3...
- Modified
- 3 Mar at 20:32
What does principal end of an association means in 1:1 relationship in Entity framework
What does principal end of an association means in 1:1 relationship in Entity framework I was trying to do this in Entity Framework when I got the error: > Unable to determine the principal end of an ...
- Modified
- 3 Feb at 09:53
What if analysis on multi dimensional cubes (OLAP)
What if analysis on multi dimensional cubes (OLAP) I have a multi dimensional OLAP cube with a number of dimensions. Some of these dimensions have hierarchies. The users would like to perform 'what-if...
- Modified
- 29 Aug at 11:1
How entity framework works for large number of records?
How entity framework works for large number of records? I see already a un-answered question [here on](https://stackoverflow.com/questions/14205033/entity-dealing-with-large-number-of-records-35-mlns)...
- Modified
- 21 Jan at 13:23
Why asp.net Identity user id is string?
Why asp.net Identity user id is string? I want to use type as an id for all of my tables in asp.net web api application. But I also use Asp.net Identity, which using a -type id (to store guids as well...
- Modified
- 4 May at 11:37
When is it better to store flags as a bitmask rather than using an associative table?
When is it better to store flags as a bitmask rather than using an associative table? I’m working on an application where users have different permissions to use different features (e.g. Read, Create,...
- Modified
- 18 Apr at 20:4
Challenge!! Example of a valid 4th normal form relation that can perform 5th normal form decomposition
Challenge!! Example of a valid 4th normal form relation that can perform 5th normal form decomposition According to my professor in Intro. to Database Theory, there are NO examples in existence to sho...
- Modified
- 8 Aug at 12:21
What is the best way to represent "Recurring Events" in database?
What is the best way to represent "Recurring Events" in database? I am trying to develop a scheduler- and calendar-dependent event application in C#, for which a crucial requirement is to represent re...
- Modified
- 16 Oct at 18:52
Core Data Deletion rules and many-to-many relationships
Core Data Deletion rules and many-to-many relationships Say you have departments and employees and each department has several employees, but each employee can also be part of several departments. So ...
- Modified
- 4 Jun at 12:20
Storing sex (gender) in database
Storing sex (gender) in database I want to store a user's gender in a database with as little (size/performance) cost as possible. So far, 3 scenarios come to mind 1. Int - aligned with Enum in code (...
- Modified
- 1 Oct at 10:50
What does ON [PRIMARY] mean?
What does ON [PRIMARY] mean? I'm creating an SQL setup script and I'm using someone else's script as an example. Here's an example of the script: ``` SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO C...
- Modified
- 4 Dec at 22:48
Strings as Primary Keys in MYSQL Database
Strings as Primary Keys in MYSQL Database I am not very familiar with databases and the theories behind how they work. Is it any slower from a performance standpoint (inserting/updating/querying) to u...
- Modified
- 16 Feb at 11:0