Showing posts with label basic. Show all posts
Showing posts with label basic. Show all posts

Monday, March 19, 2012

Degenerate Dimension

Experts:

Pardon me for this basic question. A degenerate dimension as I understand does not have a parent dimension (pls correct me if I am wrong) in the fact table. In that case is it repeated in the fact table?

For example if i have the following fact table

Productkey(FK)

Customerkey(FK)

Timekey(FK)

TicketNumber

All the first three (product,customer and Time) have dimensions while Ticketnumber has a orphan parent. In that case does its value get repeated in the fact table or is it usually a unique value?

Please explain.

Thanks

Ankith

Hello.

You are correct that ticketnumber do not have a parent and is a degenerate dimension.

If you sell the same ticket several times it can appear several times in the fact table. That is normally not the case. Think of a bus ticket, a cinema ticket or an airline ticket. For these later scenarios you will not see a repeted ticketnumber.

HTH

Thomas Ivarsson

|||

Hi Thomas:

Thank you very much for a lucid and beatiful explanation with examples. Appreciate it.

Best Regards

Ankith

Friday, February 17, 2012

default tables

hi all
is there any one who can tell the basic idea behind inserted, deleted mssql table. how these r affected on dml operations.
i m new to mssql.
thanksInserted and deleted are two special tables used in the trigger statements.

The deleted table stores copies of the affected rows during DELETE and UPDATE statements. During the execution of a DELETE or UPDATE statement, rows are deleted from the trigger table and transferred to the deleted table. The deleted table and the trigger table ordinarily have no rows in common.

The inserted table stores copies of the affected rows during INSERT and UPDATE statements. During an insert or update transaction, new rows are added simultaneously to both the inserted table and the trigger table. The rows in the inserted table are copies of the new rows in the trigger table.

Check BOL for more information.

Harshal.

Tuesday, February 14, 2012

Default permissions for schema owner

Hi,
Can someone please list down the set of default permissions that the
owner of a schema gets by default ? Atleast the very basic and
important ones.
Thanks
AdyIn SQL Server 2005, you can use the Has_Perms_By_Name() function
(http://msdn2.microsoft.com/en-us/library/ms189802.aspx).
"audipen" <audipen@.gmail.com> wrote in message
news:1173160732.973389.165550@.64g2000cwx.googlegroups.com...
> Hi,
> Can someone please list down the set of default permissions that the
> owner of a schema gets by default ? Atleast the very basic and
> important ones.
> Thanks
> Ady
>