Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Please help.... A doubt in row data type

Author  Topic 

rajahilan
Starting Member

10 Posts

Posted - 2007-11-01 : 10:04:18
From a research paper I got to know that in transformation of one to many relation ship, in the "many type we have collection atribute consists of attribuet key from the one type. If we have a single key we will use a collection of simple type. Otherwise, we will have a collection of ROW type.

My probelm here is,is there any conditions to be checked before using ROW type?Can't we use MULTISET instead of ROW type alone?

Please help me out by ansereing this.

Thanks

rajahilan
Starting Member

10 Posts

Posted - 2007-11-01 : 10:17:24
Please help on this.
Go to Top of Page

rajahilan
Starting Member

10 Posts

Posted - 2007-11-01 : 10:19:44
Please help on this.
Go to Top of Page

KenW
Constraint Violating Yak Guru

391 Posts

Posted - 2007-11-01 : 13:52:05
quote:
Originally posted by rajahilan

Please help on this.



Posting "please help on this" every four minutes isn't going to get you help faster. It's just going to annoy people.

When you don't get replies to your questions, it's usually because people don't understand what you're asking. I, for one, have no clue what it is you want to know.

Try posting your question again in different terms.
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2007-11-01 : 14:41:41
you could always post...

TEST

Read the hint link in my sig on how to post a question



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

rajahilan
Starting Member

10 Posts

Posted - 2007-11-02 : 09:40:26
Two entities Department and Employee are participated in one - to- many relation with the role name 'Has'.(Department-Has- Employee). Here Employee is weak. Therefore If a department ceases to exist employees of that department also will be deleted. If we transform above relationship into oracle it could be as below,

CREATE TYPE employee_t AS OBJECT
(eid VARCHAR2(10),
ename VARCHAR2(50),
gender VARCHAR2(50));

CREATE TYPE HAS_t AS TABLE OF employee_t;

CREATE TYPE department_t AS OBJECT
(did VARCHAR2(10),
dname VARCHAR2(50),
location VARCHAR2(50),
employee HAS_t);

CREATE TABLE department OF department_t
( did PRIMARY KEY);

NESTED TABLE employee store AS TABLE_employee;

Can we have the above relationship's transformation in SQL4 as below,

CREATE TYPE employee_t(
eid CHARACTER VARYING(10),
ename CHARACTER VARYING(50),
gender CHARACTER VARYING(50));

CREATE TABLE department_t(
did CHARACTER VARYING(10) PRIMARY KEY,
dname CHARACTER VARYING(50),
location CHARACTER VARYING(50),
employee MULTISET (employee_t));

Is it possible to have as below in SQL4?

CREATE ROW TYPE employee_t(
eid CHARACTER VARYING(10),
ename CHARACTER VARYING(50),
gender CHARACTER VARYING(50));

CREATE TABLE department_t(
did CHARACTER VARYING(10) PRIMARY KEY,
dname CHARACTER VARYING(50),
location CHARACTER VARYING(50),
employee employee_t);
When you are giving me the answer please specify in which condition we have to use ROW type and in which condition we use MULTISET?

Go to Top of Page

elancaster
A very urgent SQL Yakette

1208 Posts

Posted - 2007-11-02 : 09:54:08
so are you are asking of there is an equivalant to oracles 'nested table' in SQLServer?

er... NO

Em
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2007-11-02 : 10:52:08
quote:
Originally posted by elancaster

so are you are asking of there is an equivalant to oracles 'nested table' in SQLServer?

er... NO

Em



Sure there is, they are called relational tables, or children



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

rajahilan
Starting Member

10 Posts

Posted - 2007-11-02 : 16:31:26
I know the posibility of nested tables in SQl using MULTISET, Array and Row types. My question is,, when we use ROW type instead of Multiset and Array type?
Go to Top of Page

evilDBA
Posting Yak Master

155 Posts

Posted - 2007-11-03 : 08:15:24
There are no Multiset, Array or Row types in SQL server.
List data is stored traditionally, in child tables, or in XML datatype
Go to Top of Page

rajahilan
Starting Member

10 Posts

Posted - 2007-11-03 : 09:21:58
Evil,

They are exist in SSQL4. If you are not sure about one thing please don't specify and confuse others. Thanks for you reply anyway.
Go to Top of Page

evilDBA
Posting Yak Master

155 Posts

Posted - 2007-11-03 : 09:29:36
This forum is about Microsoft SQL server
In Microsoft SQL server (v 4.0, 6.0, 6.5, 7.0, 2000, and 2005) there are NO such datatypes.
If you dont agree, give any SQL stetement with these datatypes and I will execute it on SQL
Or give an example from Books Online, an official source from Microsoft
The SQL your provided looks like Oracle.
Go to Top of Page

rajahilan
Starting Member

10 Posts

Posted - 2007-11-03 : 13:33:29
Check this out....

http://72.14.235.104/search?q=cache:W-cNeAOvJIcJ:dekm.cs.latrobe.edu.au/Publications/2003/Eric-NSS-2003.pdf+SQL4+multiset&hl=en&ct=clnk&cd=9&gl=lk
Go to Top of Page

dataguru1971
Master Smack Fu Yak Hacker

1464 Posts

Posted - 2007-11-03 : 14:04:01
SQL4 doesn't mean MS SQL Server

Seems the folks at MSDN didn't know what you meant either
http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=2352674&SiteID=17
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2007-11-03 : 14:20:58
quote:
Originally posted by rajahilan

Check this out....

http://72.14.235.104/search?q=cache:W-cNeAOvJIcJ:dekm.cs.latrobe.edu.au/Publications/2003/Eric-NSS-2003.pdf+SQL4+multiset&hl=en&ct=clnk&cd=9&gl=lk



Seems SQL4 doesn't really exist.

"...Therefore, the standardized body ANSI/ISO has started to review SQL3 and aims to release a new SQL version, SQL4, in few more years. At the time of writing, this version is still an ongoing work and no release date has been announced..."



CODO ERGO SUM
Go to Top of Page

rajahilan
Starting Member

10 Posts

Posted - 2007-11-03 : 14:37:56
Yeah but there are several papers related to XML contains these types and descriptions about this.My question is from one of that papers. Anyway Thanks for answering. Let others try and give me answer.
Go to Top of Page

dataguru1971
Master Smack Fu Yak Hacker

1464 Posts

Posted - 2007-11-03 : 14:49:05
quote:
Originally posted by rajahilan

Can't we use MULTISET instead of ROW type alone?
Thanks



Well, since those datatypes aren't on MS SQL Server, my guess would have to be "NO" or "Not applicable"
Go to Top of Page

evilDBA
Posting Yak Master

155 Posts

Posted - 2007-11-03 : 15:11:49
quote:
"...Therefore, the standardized body ANSI/ISO has started to review SQL3 and aims to release a new SQL version, SQL4, in few more years. At the time of writing, this version is still an ongoing work and no release date has been announced..."



I think SQL4 is a dead end. XML is not perfect, but it allows you to store non-relational data in one row with sets, lists, hierarchies etc.
You can even index that information - works slower then traditional indices, but faster then without indices at all.
I dont believe Microsoft will ever try to do a double work to follow some standards as there is already a solution. BTW, it is already a *standard* solution, because XML is a standard.

I also see no use of "standards". SQL 'Standards' are just confusing people. In Oracle and MS SQL only 5% elements are the same, and 95% of features are absolutely different. If you need only ANSI subset, then you dont need to pay for SQL and Oracle, you can take something for free. When you pay big money for licenses, you pay for some unique features in these products.

And even SQL queries, 100% following the ANSI, can return different results in MS SQL and Oracle (Hint: '' and NULL in Oracle)
SQL standards are just an illusion.
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2007-11-03 : 15:39:55
quote:
Originally posted by rajahilan

Yeah but there are several papers related to XML contains these types and descriptions about this.My question is from one of that papers. Anyway Thanks for answering. Let others try and give me answer.


I think you are unlikely to get an answer here because:
1. You posted your question in a completely inappropriate location, a SQL Server 2005 Administration Forum.
2. You don't seem to have any grasp of the subject you are asking questions about.
3. You don't seem to be able to form a coherent question.




CODO ERGO SUM
Go to Top of Page

rajahilan
Starting Member

10 Posts

Posted - 2007-11-03 : 22:13:47


SQL4 have already standardized two collection types, array and multiset.

Melton,J (ed.),Database Language SQL-Part2 Foundation. ISO-ANSI WD 9072-2, International Oranization for Standardization,Working Group WG3 in August 2002.

What do you say for this Evil?
Go to Top of Page

dataguru1971
Master Smack Fu Yak Hacker

1464 Posts

Posted - 2007-11-03 : 22:32:08
quote:
Originally posted by rajahilan



SQL4 have already standardized two collection types, array and multiset.

Melton,J (ed.),Database Language SQL-Part2 Foundation. ISO-ANSI WD 9072-2, International Oranization for Standardization,Working Group WG3 in August 2002.

What do you say for this Evil?




Go to Top of Page
    Next Page

- Advertisement -