From: James Harvard
At 7:28 pm +0100 14/3/06, Martijn Tonies wrote:
Given that NULLs basically means the absence of a value (eg: unknown),
you shouldn't be storing NULLs.
At 1:49 pm -0500 14/3/06, Rhino wrote:
A null means unknown or not applicable and is a perfectly valid value
to use in
Martijn Tonies wrote:
We're arguing about whether or not your database design
(as stored on disk) should contain NULLs.
IMO: no, or at least as few as possible.
I believe the answer really is - *it depends*.
You are both right, really. Martijn, yes, according to academia and
proper
From: Mark Leith
Martijn Tonies wrote:
We're arguing about whether or not your database design
(as stored on disk) should contain NULLs.
IMO: no, or at least as few as possible.
I believe the answer really is - *it depends*.
You are both right, really. Martijn, yes, according to
But (in at least some situations) is not appropriate to record that you know
that you don't have a value?
I think the words of Donald Rumsfeld are appropriate here:
There are known knowns. These are things we know that we know. There are known
unknowns. That is to say, there are things that we
But (in at least some situations) is not appropriate to record that you
know that you don't have a value?
Sure it would. It it's needed.
But the answer doesn't have to be a NULL. Remember
the example about recording the fact that a student did
not make a test for whatever reason?
It was
Martijn Tonies [EMAIL PROTECTED] wrote on 16/03/2006 11:02:32:
Well, the question still is if you should store unknown at all ;)
Not according to Date: you should store what is known. See the remarks
about the true propositions, from which relational databases are
derived
(but you probably
Ah well, SQL (these days) provides plenty of functions to avoid
the problems. Coalesce being one of them...
How often do people write:
(probably not valid MySQL)
select firstname || coalesce(middlename || ' ', ' ') || lastname
from ...
Your syntax isn't quite correct; coalesce
From: [EMAIL PROTECTED]
Martijn Tonies [EMAIL PROTECTED] wrote on 16/03/2006 11:02:32:
Well, the question still is if you should store unknown at all ;)
Not according to Date: you should store what is known. See the remarks
about the true propositions, from which relational databases are
Martijn Tonies [EMAIL PROTECTED] wrote on 16/03/2006 11:32:45:
From: [EMAIL PROTECTED]
Martijn Tonies [EMAIL PROTECTED] wrote on 16/03/2006 11:02:32:
Well, the question still is if you should store unknown at all ;)
Not according to Date: you should store what is known. See the
in order to retrieve all the information about them. Replacing a
theoretically ugly null flag with a 10 way join strikes me, as an
engineer
rather than a theoretician, the wrong side of the
elegance/practicality
trade-off.
Using NULLs as well as de-normalization brings the risk
Also, surely if you left join to a table then if there's no matching row you
get a null value in your result set. So I'm not sure what the difference is
between getting that null because you store it in a column in the primary
table, and deriving it by left joining to a related table with no
James,
Also, surely if you left join to a table then if there's no matching row
you get a null value in your result set. So I'm not sure what the difference
is between getting that null because you store it in a column in the primary
table, and deriving it by left joining to a related table
Read the literature on how to design databases. What you do
is storing true propositions. That is, each attribute defines a
certain true proposition. For example:
Employee Martijn has Employee# 14.
You should be able to derive these sentences from every row.
Putting a NULL
magazine. In the end I believe they agreed to disagree.
-Original Message-
From: Martijn Tonies [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 16, 2006 5:33 AM
To: mysql@lists.mysql.com
Subject: Re: Accountability with MySQL
From: [EMAIL PROTECTED]
Martijn Tonies [EMAIL PROTECTED] wrote
Hello Gordon,
And now we are down to reality. This is a MySQL list. Views are a
wonderful
thing for creating an isolation layer between the application and the
database. However, MySQL's current implementation makes it extremely
difficult in many cases to avoid full table scans when you
- Original Message -
From: Martijn Tonies [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Wednesday, March 15, 2006 2:53 AM
Subject: Re: Accountability with MySQL
Basics of database design: store what you know.
Given that NULLs basically means the absence of a value
(eg
Hello,
(please read all before replying)
Basics of database design: store what you know.
Given that NULLs basically means the absence of a value
(eg: unknown), you shouldn't be storing NULLs.
Nonsense!!
That's a bold statement ...
That's simply wrong. A null
- Original Message -
From: Martijn Tonies [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Wednesday, March 15, 2006 10:47 AM
Subject: Re: Accountability with MySQL
Hello,
(please read all before replying)
Basics of database design: store what you know.
Given that NULLs
A commonly used example (at least at my last 3 jobs) would be a table of
demographics for people (whether they be employees, clients, whatever).
You can have one table and allow NULLs for some of the fields (id,
LastName, FirstName, MiddleInitial, Title, NameSuffix, AddressLine1,
At 7:28 pm +0100 14/3/06, Martijn Tonies wrote:
Given that NULLs basically means the absence of a value (eg: unknown), you
shouldn't be storing NULLs.
At 1:49 pm -0500 14/3/06, Rhino wrote:
A null means unknown or not applicable and is a perfectly valid value to use
in many, many situations.
Hello Bruno,
I am designing a simple accountability system so all the partners can have
direct access to it by intranet.
I was designing the data model, and came up with this:
CREATE TABLE `moviments` (
`moviment_id` int(20) NOT NULL auto_increment,
`moviment_date` date NOT NULL
Hi Martijn,
well about the date default value being invalid, well it´s working here in
my system (MySQL 4.1.16, Mac OS X 10.4.5), and all my systens work with
this...
About the business logic I was thinking about showing the current month by
default, and if the user wants he can select diferent
Bruno B B Magalháes [EMAIL PROTECTED] wrote on 03/14/2006 12:41:35
PM:
I am designing a simple accountability system so all the partners can
have
direct access to it by intranet.
I was designing the data model, and came up with this:
CREATE TABLE `moviments` (
`moviment_id` int(20)
Hello Bruno,
well about the date default value being invalid, well it´s working here in
my system (MySQL 4.1.16, Mac OS X 10.4.5), and all my systens work with
this...
Yes, it's a valid value in MySQL, but it's an invalid date,
that's what I'm trying to say. Why have an invalid date
as the
Martijn Tonies [EMAIL PROTECTED] wrote on 03/14/2006 01:16:11 PM:
Hello Bruno,
well about the date default value being invalid, well it´s working
here in
my system (MySQL 4.1.16, Mac OS X 10.4.5), and all my systens work
with
this...
Yes, it's a valid value in MySQL, but it's an
Should you have a flag for the status movement complete ? I would say
yes but instead of a simple checkbox, you could store a date value. That
gives you two pieces of information
a) if the date is null then the movement is not complete.
b) if the date is NOT null then the movement is complete and
- Original Message -
From: Bruno B B Magalháes [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Tuesday, March 14, 2006 12:41 PM
Subject: Accountability with MySQL
I am designing a simple accountability system so all the partners can have
direct access to it by intranet.
I was
Hello Shawn,
well about the date default value being invalid, well it´s working here
in
my system (MySQL 4.1.16, Mac OS X 10.4.5), and all my systens work with
this...
Yes, it's a valid value in MySQL, but it's an invalid date,
that's what I'm trying to say. Why have an invalid date
as
- Original Message -
From: Martijn Tonies [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Tuesday, March 14, 2006 1:16 PM
Subject: Re: Accountability with MySQL
Hello Bruno,
well about the date default value being invalid, well it´s working here
in
my system (MySQL 4.1.16, Mac
- Original Message -
From: Martijn Tonies [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Tuesday, March 14, 2006 1:28 PM
Subject: Re: Accountability with MySQL
Should you have a flag for the status movement complete ? I would say
yes but instead of a simple checkbox, you could
I am designing a simple accountability system so all the partners can
have
direct access to it by intranet.
I was designing the data model, and came up with this:
CREATE TABLE `moviments` (
`moviment_id` int(20) NOT NULL auto_increment,
`moviment_date` date NOT NULL default
Should you have a flag for the status movement complete ? I would say
yes but instead of a simple checkbox, you could store a date value. That
gives you two pieces of information
a) if the date is null then the movement is not complete.
b) if the date is NOT null then the movement is
- Original Message -
From: Bruno B B Magalháes [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Tuesday, March 14, 2006 2:07 PM
Subject: Re: Accountability with MySQL
I am designing a simple accountability system so all the partners can
have
direct access to it by intranet.
I
- Original Message -
From: Martijn Tonies [EMAIL PROTECTED]
To: Rhino [EMAIL PROTECTED]; mysql@lists.mysql.com
Sent: Tuesday, March 14, 2006 2:16 PM
Subject: Re: Accountability with MySQL
Should you have a flag for the status movement complete ? I would
say
yes but instead
At 7:48 pm -0500 14/3/06, Rhino wrote:
Ah, so now things become clear, a NULL actually can mean
two things? So much for clarity then...
Come on; that's not fair. Unknown and not applicable are more like
different senses of the same thing, not two opposite things.
IIRC (but please don't ask for
At 7:48 pm -0500 14/3/06, Rhino wrote:
Ah, so now things become clear, a NULL actually can mean
two things? So much for clarity then...
Come on; that's not fair. Unknown and not applicable are more like
different senses of the same thing, not two opposite things.
IIRC (but please don't
Basics of database design: store what you know.
Given that NULLs basically means the absence of a value
(eg: unknown), you shouldn't be storing NULLs.
Nonsense!!
That's a bold statement ...
That's simply wrong. A null means unknown or not applicable and is a
Ah, so now
37 matches
Mail list logo