Linked Questions

3 votes
1 answer
4k views

Database Normalization: A Case Of The NULLs [duplicate]

I'm trying to learn about proper database management and am having a hard time with designing a database that doesn't rely on NULLs. If you think I'm crazy for embarking on this, it is because of SQL ...
jeffjenx's user avatar
  • 131
2 votes
1 answer
2k views

Alternatives to NULL for missing data [duplicate]

I am using PostgreSQL and trying to write value constraints. Is it possible to record missing data as distinct from NULL values in a numeric field without using an arbitrary numeric value? For many ...
David LeBauer's user avatar
1 vote
1 answer
2k views

How to handle null value number DataWarehouse [duplicate]

I have a question. I'm developing a Data Warehouse, I retrieve the data from my reconciled level, this in order to keep updated my Data Warehouse, but i am not sure how to handle some numeric fields ...
traveller's user avatar
1 vote
1 answer
2k views

Filling not applicable fields with N/A rather than leaving them empty or Null [duplicate]

I have a database of few million records, many of the fields (call them Ec1 to EcN) have either Null or empty string in them. When I looked at them more closely, I found that for many records, several ...
Espanta's user avatar
  • 173
-2 votes
1 answer
413 views

Table normalisation and empty values [duplicate]

Here are two ways I can optimise mapping of a text field with several other attributes to question and answer. First approach is, creating a map table with both question_id and answer_id in which ...
Vishal Kumar Sahu's user avatar
3 votes
0 answers
343 views

To NULL or not to NULL? [duplicate]

Possible Duplicate: Why shouldn't we allow NULLs? I've heard that it's a bad idea to do database design such that nullable fields exist. However, eliminating nullables often cause much more ...
Billy ONeal's user avatar
2 votes
0 answers
74 views

Better performance to have nullable columns or an extra table? [duplicate]

There are many ways to get rid of nulls in tables, and I have heard of various reasons to get rid of them, but can anyone show me some real numbers as to how your database might perform differently ...
ADJenks's user avatar
  • 121
1 vote
1 answer
30 views

How to structure a listings table [duplicate]

Say I have a table called listing and it has the following columns: id | name | description | price | created_date| 0 | iPhone | A phone | 1000 | 7/4/2020 | Since I want to track when a ...
Matthewj's user avatar
  • 113
7 votes
3 answers
24k views

Storing NULL versus storing '' in a varchar column

I realize this may be marked as duplicate, but I'm specifically asking in relation to SQL Server 2005 I have read conflicting advice on the internet so I'm asking here. Specifically in SQL Server ...
MrVimes's user avatar
  • 629
15 votes
2 answers
8k views

What is the purpose of SET NULL in Delete/Update Foreign Keys constraints?

I am probably being narrow minded, but if I create a foreign key constraint and a row gets updated or deleted, I lose that connection if the child table's column gets set to NULL. What is the purpose ...
Derek Downey's user avatar
  • 23.5k
3 votes
3 answers
34k views

Questions about handling NULLs and empty strings in nvarchar and numeric fields

I understand that questions similar to these pop up often around here. I have searched before posting these but I didn't find any QA threads that completely answer my questions. In a table, I ...
Anonymous Maximus's user avatar
4 votes
2 answers
27k views

Using scope_identity() to get ID "during" insertion of row?

I have a column that has an ident_current constraint on it to populate another column, like so: alter table dbo.Employee add constraint dbo_Employee_D1 default ident_current('dbo.Employee') for ...
aliensurfer's user avatar
4 votes
2 answers
2k views

Using sp_BlitzIndex - Diagnosed as "Index Hoarder: Addicted to nulls"

Context: MS SQL Server 2012 In using Kendra Little's awesome tool, sp_BlitzIndex, a number of tables were diagnosed as "Index Hoarder: Addicted to nulls". I'm not looking for a debate over NULLs and ...
Matthew Clemente's user avatar
2 votes
3 answers
3k views

How can I create 3 tables with references On SQL Server

I started using SQL Server recently and I think this is simple to resolve. I need to create one table with a country list, and two tables that will use the country list in a column. Here is the code:...
Flávio Augusto's user avatar
5 votes
3 answers
3k views

Is it better to create another table to possible null values in relational databases?

I'm designing a relational database to use in MySQL. I have the next situation: In one table there are fields that in the most of situations are NULL. The fields would be like: Table name: tabla ...
andreshg112's user avatar

15 30 50 per page