Showing posts with label zero. Show all posts
Showing posts with label zero. Show all posts

Friday, February 24, 2012

Celko's Netsed Sets vs Adjacency List Models

I am currently modelling a db to store geneaology information (family tree)
Each node on the tree will always have zero, one or two parent nodes,
depending upon whether the details of both parents are known.
I have been initially modelling this using a simple adjacency list model
however I would appreciate any feedback on the advantages and
implementation of a nested set model for this application.
CREATE TABLE persons (
PersonID INT,
MotherID INT,
FatherID INT,
Surname VARCHAR(50),
Firstname VARCHAR(25)
)
In this scenario both the MotherID & FatherID would relate back to PersonID.
Thanks
MurphHi
I'd go with below design
CREATE TABLE Parents
(
[ID] INT NOT NULL PRIMARY KEY,
[NAME]CHAR(1) NOT NULL
)
INSERT INTO Parents VALUES (1,'A')
INSERT INTO Parents VALUES (2,'B')
INSERT INTO Parents VALUES (3,'C')
CREATE TABLE Child
(
[ID] INT NOT NULL PRIMARY KEY,
ParentId INT NOT NULL FOREIGN KEY REFERENCES Parents([ID])ON DELETE
CASCADE ON UPDATE CASCADE,
[NAME]CHAR(2) NOT NULL
)
INSERT INTO F VALUES (1,1,'AA')
INSERT INTO F VALUES (2,1,'AA')
INSERT INTO F VALUES (3,2,'BB')
INSERT INTO F VALUES (4,2,'BB')
INSERT INTO F VALUES (5,2,'BB')
INSERT INTO F VALUES (6,3,'CC')
--OR
CREATE TABLE Persons
(
Child_Id int NOT NULL,
Parentid int NULL,
ChildName varchar(25) NOT NULL,
CONSTRAINT PK_Persons_Childid PRIMARY KEY(Child_Id),
CONSTRAINT FK_Persons_Parentid _Child_Id
FOREIGN KEY(Parentid )
REFERENCES Persons(Child_Id)
)
"Murphy" <m@.urphy.com> wrote in message
news:_jO1e.15253$C7.5562@.news-server.bigpond.net.au...
> I am currently modelling a db to store geneaology information (family
tree)
> Each node on the tree will always have zero, one or two parent nodes,
> depending upon whether the details of both parents are known.
> I have been initially modelling this using a simple adjacency list model
> however I would appreciate any feedback on the advantages and
> implementation of a nested set model for this application.
> CREATE TABLE persons (
> PersonID INT,
> MotherID INT,
> FatherID INT,
> Surname VARCHAR(50),
> Firstname VARCHAR(25)
> )
> In this scenario both the MotherID & FatherID would relate back to
PersonID.
> --
> Thanks
> Murph

Tuesday, February 14, 2012

Catalog size up and down ??

Is that normal?
I am populating my catalog, and i see the catalog size growing 45MB,
47MB, 52MB..1MB
and suddenly it goes to zero and starts again
Is that normal?
thanks
Alberto
The final size should be about 900MB , but is only 70MB...what is
happening:?
please help!!
|||Gordowey,
Could you post the full output of -- SELECT @.@.version -- as this will be
helpful info in troubleshooting SQL FTS or FT Indexing issues. How many rows
in your FT-enabled table? Did you run a Full or Incremental population? If
the latter, does the FT-enabled table have timestamp column?
You should review your server's Application event log for "Microsoft Search"
or MssCi souse events. What I suspect that is happening is normal & expected
and caused by either a Shadow merge or Master Merge of FT Catalog files
usually in 50K increments being merged into a single compressed Master
catalog file. Note, the FT Catalog files are compressed so it will not be
the same size as the text in your FT-enabled column.
Thanks,
John
SQL Full Text Search Blog
http://spaces.msn.com/members/jtkane/
"Gordowey" <albertoiriarte@.gmail.com> wrote in message
news:1130630141.116174.71820@.g49g2000cwa.googlegro ups.com...
> The final size should be about 900MB , but is only 70MB...what is
> happening:?
> please help!!
>
|||Hi John, thanks for your answer..I have sent you by email some info
about my problem..please take a look and help me..
thanks a lot
Alberto