| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Database naming convention (yet another post of it, but a bit different)
> >> I prefer the singular. :) Especially when it comes to cases where
> we have a table with one row. <<
>
> Then use a singlular name and enforce this rule with a constraint:
>
> CREATE TABLE PhysicalConstants
> (lock INTEGER NOT NULL PRIMARY KEY
> DEFAULT 0
> CHECK (lock = 0),
> pi FLOAT NOT NULL,
> e FLOAT NOT NULL,
> ...);
>
> INSERT INTO PhysicalConstants
> VALUES (1, 3.141592653, ...);
Slightly OT but...
Are 1 row tables a good idea for storing settings? I usually set up the
following table(s) to store settings in a database:
Setting(pk) Value pi 3.14159265 maxReportSize 90 case 12
then another (sometimes I store numeric and text values in the same column) for text settings:
Setting(pk) Value companyName Bums&Legs Co.
What are the advantages / disadvantages with this structure compared to a one row table for storing settings. I realise my design is not normalised (at all!) but it seems to work well.
Cheers
Stu
Received on Thu Oct 10 2002 - 03:43:02 CDT
![]() |
![]() |