Maxim Grinev | 3 Jul 09:11 2006
Picon

Re: Attribute value problem

Hi Marko,

Thank you for the report and sorry for the delay with the answer.

We have fixed this. Now it works as follows. If you load 
<foo attr="&quot;value&quot;"/>, the result of a query will be the same:
<foo attr="&quot;value&quot;"/>.

Download Sedna 1.0 with the fix.

Best regards,
Maxim Grinev

> -----Original Message-----
> From: sedna-discussion-bounces@... [mailto:sedna-
> discussion-bounces@...] On Behalf Of Marko Bozikovic
> Sent: Tuesday, June 13, 2006 5:54 PM
> To: sedna-discussion
> Subject: [Sedna-discussion] Attribute value problem
> 
> Hi team,
> 
> I have encoutnered a small problem with attribute values containing double
> quotes. If I create document with a node:
> 
> <foo attr="&quot;value&quot;" />
> 
> And query for that node, the result string will be:
> 
> <foo attr=""value""/>
(Continue reading)

Raymond, Jocelyn | 6 Jul 18:31 2006
Picon
Picon

Index

 

Hi Sedna Team,

My question is regarding index and data type.

What data type would be faster when I query using an index for an id e.g. <event id=’123’>

CREATE INDEX ‘idx_string’ collection(‘events’)/event BY <at> id AS xs:string

OR

CREATE INDEX ‘idx_integer’ collection(‘events’)/event BY <at> id AS xs:integer

 

So I would need to do:

index-scan(‘idx_string’,’123’,’EQ’)

OR

index-scan(‘idx_integer’, xs:integer(‘123’),’EQ’)

 

I tried to use se_term with –show-time on but does not show me the “time” of execution.  (I am using sedna-1.0.19).

In your mind, would one be more beneficial than the other?

 

Thank you,

Jocelyn Raymond

 

From: Raymond, Jocelyn
Sent: Thursday, April 27, 2006 8:54 AM
To: sedna-discussion-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: deleting or droping database

 

Hi Everyone,

This is actually not a request to solve a problem but a comment regarding deleting or dropping a database in Sedna which may help other to avoid some of the problems that I have encountered.  I have been using Sedna for quite some time now (about a year) and it has been proven to be quite good for my use.  However, during the development, you may encounter few problems here and there.  One of the things I had to do during the development is to prototype some of my document models and XQuery using Sedna.  As a consequence, I often deleted the database and recreated it from a script.  The way I deleted a Sedna database was to simply delete the following files from the file system (Linux):

rm /var/lib/sedna/cfg/database-name.cfg

rm –r /var/lib/sedna/data/database-name_files/

As it turns out, this may (not always) cause some problem as it is NOT the proper way of deleting a database in Sedna.  Instead, you should use the Sedna command:

se_smsd database-name  // stop the database

se_ddb database-name    // drop the database

 

which will drop the database properly. 

I noticed this because in my latest database I created several indexes and most XQuery worked and appeared to be fine.  However, some use of the indexes did cause an error (Bus Error).  At that time, I was deleting the database by deleting the files manually from the file system. Then I tried this on a new Server where Sedna was freshly installed and did not encounter the problem.  I then learned the proper way of deleting a Sedna database and tried it on my “older” server and found the problem was gone. 

This is also the same if you upgrade Sedna with a new release.  If you upgrade Sedna, you need to re-create the database and migrate your data in order to avoid potential problems. 

 

Hope this will help you during any development using Sedna. 

 

Jocelyn Raymond

Raymond, Jocelyn | 6 Jul 23:11 2006
Picon
Picon

several updates in one xquery

Hi Sedna Team,

Is it possible to construct several UPDATE inside one xquery?

 

I would like, if possible, to avoid network traffic for each update that I need to do.  For instance, my Java program loop through a collection, construct the xquery, send it over the network and process the next one in the collection.  However, would it be possible to loop through the entire collection first, building one xquery then send it over the network (thus one network call)?

 

Something like:

((UPDATE insert <individual id="2003" role="attandant"/> into index-scan("idx_event_id", "1000","EQ")/individuals),(UPDATE insert  <individual id="2003" role="attandant"/> into index-scan("idx_event_id", "1002","EQ")/individuals),(UPDATE insert  <individual id="2003" role="attandant"/> into index-scan("idx_event_id", "1005","EQ")/individuals),(UPDATE insert  <individual id="2003" role="attandant"/> into index-scan("idx_event_id", "1006","EQ")/individuals))

 

Note that the above is one string.  To make it clear it can be broken down to:

 

((UPDATE insert <individual id="2003" role="attandant"/> into index-scan("idx_event_id", "1000","EQ")/individuals),

 (UPDATE insert  <individual id="2003" role="attandant"/> into index-scan("idx_event_id", "1002","EQ")/individuals),

 (UPDATE insert  <individual id="2003" role="attandant"/> into index-scan("idx_event_id", "1005","EQ")/individuals),

 (UPDATE insert  <individual id="2003" role="attandant"/> into index-scan("idx_event_id", "1006","EQ")/individuals))

 

This is a sequence of Update but it does not work.  If such a xquery is possible or any other xquery tricks, let me know, it would be very much appreciated.

 

Jocelyn Raymond

 

Raymond, Jocelyn | 7 Jul 00:12 2006
Picon
Picon

several updates in one xquery

Hi Sedna Team,
I previously sent a post asking how to make several updates in a single xquery (see below).  I would like to
share what I found (there is a way).  Please let me know if you have something better or if you have any
comments regarding the efficiency of the xquery below.  Note that there are two variations.

Variation One:  One document fragment to be inserted into several documents.
UPDATE
insert
  <individual id="2003" role="attandant"/> 
  into 
  ((index-scan("idx_event_id", "1000","EQ")/individuals), 
   (index-scan("idx_event_id", "1002","EQ")/individuals),
   (index-scan("idx_event_id", "1005","EQ")/individuals),
   (index-scan("idx_event_id", "1006","EQ")/individuals))

Variation Two: Several document fragments to be inserted into one document.
UPDATE
insert
for $fragment in ((<individual id="2003" role="attendant"/>),
                  (<individual id="2004" role="guide"/>),
                  (<individual id="2007" role="attendant"/>))
return $fragment
into 
index-scan('idx_event_id','1000','EQ')/individuals

This means that instead of sending several network calls to the sedna database, only one is needed
therefore reducing network traffic.  Hope this can help others.

Thank you,
Jocelyn Raymond

________________________________________
From: Raymond, Jocelyn 
Sent: Thursday, July 06, 2006 3:12 PM
To: 'sedna-discussion@...'
Subject: several updates in one xquery

Hi Sedna Team,
Is it possible to construct several UPDATE inside one xquery?

I would like, if possible, to avoid network traffic for each update that I need to do.  For instance, my Java
program loop through a collection, construct the xquery, send it over the network and process the next one
in the collection.  However, would it be possible to loop through the entire collection first, building
one xquery then send it over the network (thus one network call)?

Something like: 
((UPDATE insert <individual id="2003" role="attandant"/> into index-scan("idx_event_id",
"1000","EQ")/individuals),(UPDATE insert  <individual id="2003" role="attandant"/> into
index-scan("idx_event_id", "1002","EQ")/individuals),(UPDATE insert  <individual id="2003"
role="attandant"/> into index-scan("idx_event_id", "1005","EQ")/individuals),(UPDATE insert 
<individual id="2003" role="attandant"/> into index-scan("idx_event_id", "1006","EQ")/individuals))

Note that the above is one string.  To make it clear it can be broken down to:

((UPDATE insert <individual id="2003" role="attandant"/> into index-scan("idx_event_id", "1000","EQ")/individuals),
 (UPDATE insert  <individual id="2003" role="attandant"/> into index-scan("idx_event_id", "1002","EQ")/individuals),
 (UPDATE insert  <individual id="2003" role="attandant"/> into index-scan("idx_event_id", "1005","EQ")/individuals),
 (UPDATE insert  <individual id="2003" role="attandant"/> into index-scan("idx_event_id", "1006","EQ")/individuals))

This is a sequence of Update but it does not work.  If such a xquery is possible or any other xquery tricks,
let me know, it would be very much appreciated.

Jocelyn Raymond

Flávio Sousa | 7 Jul 22:43 2006
Picon

XML Schema


Hi ALL,

    I am developing a replication mechanism for  Sedna and I am with the following doubts. My unit (level) replication is a document XML.  

     1- Sedna has suport the XML Schema?

     2-  Replicated Relational Databases uses a "schema" to get information about the tables (copies) . However, generally, data XML  doesn't have a "schema".  It has some way to identify data XML when does not have a "schema" ? 
          Summarizing, I need to know information on the documents XML (copies) to develop Catalog  Service, that it will identify where the copies (documents XML) are located.     


      Thanks,

--
Flávio Sousa
Federal University of  Ceará - Brazil
www.lia.ufc.br/~flavio
Raymond, Jocelyn | 12 Jul 18:07 2006
Picon
Picon

Stack overflow for simple xquery

Hi Sedna team,

I am using Sedna 1.0.19 on Linux kernel 2.6.9.34 (most recent Red Hat
Enterprise Linux).  When I do the following:

<events>
{ for $event in
index-scan-between('idx_event_date_time_from',xs:dateTime('2005-01-01T00
:00:00'),xs:dateTime('2005-02-01T00:00:00'),'HINTL')
  return $event
}
</events>

I get:
SEDNA Message: ERROR SE1001
Stack overflow.

However, if I simply do:
for $event in
index-scan-between('idx_event_date_time_from',xs:dateTime('2005-01-01T00
:00:00'),xs:dateTime('2005-02-01T00:00:00'),'HINTL')
 return $event

There is no problem.  So wrapping the xquery into "<events>" makes it to
have a stack overflow.  Is this a bug?

Thanks,
Jocelyn Raymond

Maxim Grinev | 13 Jul 15:34 2006
Picon

Re: Index

Hi Jocelyn,

 

Theoretically, it is hard to say which should be faster but some of us believe that the first way might be faster a bit.

We have conduct a number of experiments (using Unix “time” command) and the speed was the same for the both ways.

Did you do your own experiments?

 

As concerns show-time, it is a bug which we have fixed. Thank you. If you need the new version, you can take it at

www.modis.ispras.ru/FTPContent/sedna-1.0.23-bin-linux.sh

www.modis.ispras.ru/FTPContent/sedna-1.0.23-src-linux.tar.gz

 

Maxim

Sedna team

 

 

From: sedna-discussion-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org [mailto:sedna-discussion-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of Raymond, Jocelyn
Sent: Thursday, July 06, 2006 8:32 PM
To: sedna-discussion-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: [Sedna-discussion] Index

 

 

Hi Sedna Team,

My question is regarding index and data type.

What data type would be faster when I query using an index for an id e.g. <event id=’123’>

CREATE INDEX ‘idx_string’ collection(‘events’)/event BY <at> id AS xs:string

OR

CREATE INDEX ‘idx_integer’ collection(‘events’)/event BY <at> id AS xs:integer

 

So I would need to do:

index-scan(‘idx_string’,’123’,’EQ’)

OR

index-scan(‘idx_integer’, xs:integer(‘123’),’EQ’)

 

I tried to use se_term with –show-time on but does not show me the “time” of execution.  (I am using sedna-1.0.19).

In your mind, would one be more beneficial than the other?

 

Thank you,

Jocelyn Raymond

 

From: Raymond, Jocelyn
Sent: Thursday, April 27, 2006 8:54 AM
To: sedna-discussion-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: deleting or droping database

 

Hi Everyone,

This is actually not a request to solve a problem but a comment regarding deleting or dropping a database in Sedna which may help other to avoid some of the problems that I have encountered.  I have been using Sedna for quite some time now (about a year) and it has been proven to be quite good for my use.  However, during the development, you may encounter few problems here and there.  One of the things I had to do during the development is to prototype some of my document models and XQuery using Sedna.  As a consequence, I often deleted the database and recreated it from a script.  The way I deleted a Sedna database was to simply delete the following files from the file system (Linux):

rm /var/lib/sedna/cfg/database-name.cfg

rm –r /var/lib/sedna/data/database-name_files/

As it turns out, this may (not always) cause some problem as it is NOT the proper way of deleting a database in Sedna.  Instead, you should use the Sedna command:

se_smsd database-name  // stop the database

se_ddb database-name    // drop the database

 

which will drop the database properly. 

I noticed this because in my latest database I created several indexes and most XQuery worked and appeared to be fine.  However, some use of the indexes did cause an error (Bus Error).  At that time, I was deleting the database by deleting the files manually from the file system. Then I tried this on a new Server where Sedna was freshly installed and did not encounter the problem.  I then learned the proper way of deleting a Sedna database and tried it on my “older” server and found the problem was gone. 

This is also the same if you upgrade Sedna with a new release.  If you upgrade Sedna, you need to re-create the database and migrate your data in order to avoid potential problems. 

 

Hope this will help you during any development using Sedna. 

 

Jocelyn Raymond

Volkov, Mikhail | 14 Jul 05:14 2006
Picon

Re: Index

    Good day,
 
   Where I can find detailed changelog of new version of sedna without downloading archive? Because of I have some errors in version 1.0.19 with database recovering and after upgrade to version 1.0.22 they was cleared and so on. So I'd like to be up-to-date and maybe help you with testing of bugs or features.
 
---
Volkov Mikhail
LLC EDN Sovintel, kemerovo branch
Golden Telecom
----- Original Message -----
Sent: Thursday, July 13, 2006 9:34 PM
Subject: Re: [Sedna-discussion] Index

Hi Jocelyn,

 

Theoretically, it is hard to say which should be faster but some of us believe that the first way might be faster a bit.

We have conduct a number of experiments (using Unix “time” command) and the speed was the same for the both ways.

Did you do your own experiments?

 

As concerns show-time, it is a bug which we have fixed. Thank you. If you need the new version, you can take it at

www.modis.ispras.ru/FTPContent/sedna-1.0.23-bin-linux.sh

www.modis.ispras.ru/FTPContent/sedna-1.0.23-src-linux.tar.gz

 

Maxim

Sedna team

 

 

From: sedna-discussion-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org [mailto:sedna-discussion-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of Raymond, Jocelyn
Sent: Thursday, July 06, 2006 8:32 PM
To: sedna-discussion-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: [Sedna-discussion] Index

 

 

Hi Sedna Team,

My question is regarding index and data type.

What data type would be faster when I query using an index for an id e.g. <event id=’123’>

CREATE INDEX ‘idx_string’ collection(‘events’)/event BY <at> id AS xs:string

OR

CREATE INDEX ‘idx_integer’ collection(‘events’)/event BY <at> id AS xs:integer

 

So I would need to do:

index-scan(‘idx_string’,’123’,’EQ’)

OR

index-scan(‘idx_integer’, xs:integer(‘123’),’EQ’)

 

I tried to use se_term with –show-time on but does not show me the “time” of execution.  (I am using sedna-1.0.19).

In your mind, would one be more beneficial than the other?

 

Thank you,

Jocelyn Raymond

 

From: Raymond, Jocelyn
Sent: Thursday, April 27, 2006 8:54 AM
To: sedna-discussion-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: deleting or droping database

 

Hi Everyone,

This is actually not a request to solve a problem but a comment regarding deleting or dropping a database in Sedna which may help other to avoid some of the problems that I have encountered.  I have been using Sedna for quite some time now (about a year) and it has been proven to be quite good for my use.  However, during the development, you may encounter few problems here and there.  One of the things I had to do during the development is to prototype some of my document models and XQuery using Sedna.  As a consequence, I often deleted the database and recreated it from a script.  The way I deleted a Sedna database was to simply delete the following files from the file system (Linux):

rm /var/lib/sedna/cfg/database-name.cfg

rm –r /var/lib/sedna/data/database-name_files/

As it turns out, this may (not always) cause some problem as it is NOT the proper way of deleting a database in Sedna.  Instead, you should use the Sedna command:

se_smsd database-name  // stop the database

se_ddb database-name    // drop the database

 

which will drop the database properly. 

I noticed this because in my latest database I created several indexes and most XQuery worked and appeared to be fine.  However, some use of the indexes did cause an error (Bus Error).  At that time, I was deleting the database by deleting the files manually from the file system. Then I tried this on a new Server where Sedna was freshly installed and did not encounter the problem.  I then learned the proper way of deleting a Sedna database and tried it on my “older” server and found the problem was gone. 

This is also the same if you upgrade Sedna with a new release.  If you upgrade Sedna, you need to re-create the database and migrate your data in order to avoid potential problems. 

 

Hope this will help you during any development using Sedna. 

 

Jocelyn Raymond


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

_______________________________________________
Sedna-discussion mailing list
Sedna-discussion-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/sedna-discussion
Maxim Grinev | 14 Jul 15:49 2006
Picon

Re: Stack overflow for simple xquery

Hi Jocelyn,

It is a bug. We have just checked. It works OK on our side with Sedna 1.0.23
on Linux kernel 2.4 RedHat). I sent you the link to the build in the
previous letter.

We checked on Windows and it worked OK also. So we cannot reproduce. Could
you please try it with Sedna 1.0.23.

Maxim
Sedna team

> -----Original Message-----
> From: sedna-discussion-bounces@... [mailto:sedna-
> discussion-bounces@...] On Behalf Of Raymond, Jocelyn
> Sent: Wednesday, July 12, 2006 8:07 PM
> To: sedna-discussion@...
> Subject: [Sedna-discussion] Stack overflow for simple xquery
> 
> Hi Sedna team,
> 
> I am using Sedna 1.0.19 on Linux kernel 2.6.9.34 (most recent Red Hat
> Enterprise Linux).  When I do the following:
> 
> <events>
> { for $event in
> index-scan-between('idx_event_date_time_from',xs:dateTime('2005-01-01T00
> :00:00'),xs:dateTime('2005-02-01T00:00:00'),'HINTL')
>   return $event
> }
> </events>
> 
> I get:
> SEDNA Message: ERROR SE1001
> Stack overflow.
> 
> However, if I simply do:
> for $event in
> index-scan-between('idx_event_date_time_from',xs:dateTime('2005-01-01T00
> :00:00'),xs:dateTime('2005-02-01T00:00:00'),'HINTL')
>  return $event
> 
> 
> There is no problem.  So wrapping the xquery into "<events>" makes it to
> have a stack overflow.  Is this a bug?
> 
> Thanks,
> Jocelyn Raymond
> 
> 
> 
> 
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Sedna-discussion mailing list
> Sedna-discussion@...
> https://lists.sourceforge.net/lists/listinfo/sedna-discussion

Max V. Stotsky | 14 Jul 17:32 2006
Picon

Insert problem

Hello, sedna-team.
I have a problem with Sedna DBMS 1.0.19 on Linux kernel 2.4.27.

Sedna Version:
% se_gov -version
Sedna Governor Version 1.0.19
Copyright (C) 2004-2006 ISP RAS and others. All rights reserved.
See file COPYRIGHT provided with the distribution.

First of all I`m starting the GOVERNOR and my databases.

-------
% se_gov
GOVERNOR has been started in the background mode
% se_cdb database
Creating a data base (it can take a few minutes)...
The database 'database' has been created successfully
% se_sm database
SM has been started in the background mode
% se_term database -file load_data_1.xquery 
Bulk load succeeded
% se_term database -file load_data_2.xquery
-------
where
load_data_1.xquery:
        LOAD "datafile_1.xml" "doc1"        
Size of datafile_1.xml is 24054179b (23Mb).

load_data_2.xquery:
        LOAD "datafile_2.xml" "doc2"        
Size of datafile_2.xml is 35182094b (34Mb).

After that I invoke my C++-program (you can find it attached to my message). 
The program makes the following steps:
1) opens file datafile.data;
2) reads from datafile.data next entry (see above);
3) inserts the entry to the database (document doc2);
4) if entry has not been inserted, then program adds this entry to the log file;
5) if end of datafile.data reached the program exits;
   otherwise it returns to step 2;

Size of datafile.data is 5207166b (5.0Mb) -- 4491 entries (size of 1 entry 1159b).
datafile.data consists of some amount of <entry> tags:
        <entry>
                ...
        </entry>
        <entry>
                ...
        </entry>
        ...

In my test the program has inserted the first 28 entries, after that se_gov stoped. 
So I've got this error message from the program:
        can't connect to sedna
        Commit transaction failed
        SEDNA Message: ERROR SE3001
        Failed to initialize a socket.

Messages from log:
data/fault-2006-07-12-15-25-0221/GOV7197.log:
        SEDNA soft fault message:
        One of SEDNA processes is downSEDNA soft fault message:

data/fault-2006-07-12-15-25-0221/TRN7195.log:
        [pstr_insert_into_tail()] free space in SS tail is smaller then the size of
        string to insert

data/fault-2006-07-12-15-25-0223/SM6888.log        
        SEDNA soft fault message:
        SEDNA GOVERNOR is down

After executing "se_sm database" command nothing happens at all.

If to not load documents datafile_1.xml and
datafile_2.xml, and to load empty documents:
        <entries />
Then the information from datafile.data is inserted without problems by means
of the attached program.

Could you, please, tell me what am I doing wrong and why sedna fails to
execute queries?

--
Best Regards
Maxim V. Stotsky

Attachment (report.c): text/x-csrc, 3773 bytes

Gmane