Determine third normal form in case of two functional dependencies

Assume I’m given an entity E which has attributes A, B and C, (each of them is a candidate key, but let’s say I can introduce some EID that serves as a PK) with functional dependencies: A determines C and B determines C. How would I get this into a third normal form?

I have tried the following:


but in this representation, I’m have the attribute C twice in my database. Can anyone advise on a more appropriate way of getting into a third normal form?

How to determine if an animal is a familiar or a regular beast?

As a player (or DM) might use a familiar as a spy, are there ways, magical or otherwise to detect that a cat is a familiar, or just a house cat?

I’ve read the answer to Are familiars considered magical for effects like detect magic? and agree with the accepted answer that they are not. So what might be other methods for exposing the nature of the creature in front of you?

And I mean short of killing it to see if it disappears 😉

How can I determine the rolling curve of this roll under system?

The system

  • The system relies on Traits and Skills (which both range from 0 to 6).
  • Players rolls a number of d6 equal to the Skill they’re using.
  • Any dice result equal or under the related Trait value is considered a success.

Example : Bob attacks an orc. He has a Melee Skill of 3 and a Strength Trait of 4. He rolls 3d6 and the results are: 2 5 3. He has 2 successes.

Special cases

  • The result of a dice is 1, the dice counts as 2 successes.

Example : Bob attacks again. He still rolls 3d6 and the results are: 1 3 6. He has 3 successes.

  • The character does not have the required Skill, he rolls 1d6, only a result of 1 counts as 1 success (instead of 2), other values are failures.

Example : Bob tries to parry. Since he does not have the Parry skill, he rolls 1d6 and the result is a 2. He fails.

My questions

How can I make sure that progression is "coherent"?

How are highly skilled characters better than those with good Traits? Is the last assumption even correct?

What would the success curve (skill over trait over difficulty) look like?

I’ve tried various things over excel and anydice but cannot comprehend the statistics or get formulas to work.

Finally, sorry for any grammar mistake, english is not my first language and thanks for the help.

SQL Server: Determine backup location from physical_device_name field

I am working on a SQL Server database and ran the following command to figure out where the database is backing up to:

SELECT TOP 1 M.physical_device_name FROM msdb..backupset S JOIN msdb..backupmediafamily M ON M.media_set_id=S.media_set_id WHERE S.database_name = 'MyDB' 

The physical_device_name says: HTSQLServerMyDB

I don’t see any maintenance plans or jobs that I can figure out that do this backup. I am trying to figure out where it is doing this backup. If I go into Server Objects then Backup Devices it is empty. How can I determine where are my backups?

I am running SQL Server 2016 (13.0.4001.0).

How to determine the sex of an unborn baby?

Note: The subject of this question may be sensitive to some readers, so I request answers to be tactful and stay strictly in the scope and context of Dungeons & Dragons RPG.

We have a human female NPC who is pregnant in our campaign. Most importantly we’d like to find out the sex of the baby. Other stuff like, is it twins/triplets, is the father who we think it is (a human too), and what the "race" of the baby is (I mean, it could be a tiefling even if both parents are human), is of course a bonus.

What methods (probably spells and magic items, maybe a medicine check somehow) are available in the official books?

I’ve been thinking of an (ab)use of Locate Creature spell, but it seems a bit iffy to consider an unborn baby boy/girl as "the nearest creature of a specific kind (such as a human or a unicorn)"

determine the value of p^q + q^p [closed]

Given a square ABCD with side length 2. Suppose there is a circle with center D and radius 2 and a circle with diameter BC, where The two circles meet at points C and K. If the area of the triangle ABK can be expressed in simple fractions p/q , where p and q are natural number, determine the value of p^q + q^p

i need help, I’ve never found the answer

How does an Animated Undead Determine Hostility, and how does it Defend Itself?

From the spell Animate Undead,

If you issue no commands, the creature only defends itself against hostile creatures.

There are two troubling terms here, for me. One is defends, and the other is hostile.

Defends is not to my knowledge a keyword. Does the undead only take the Dodge action against hostile creatures, or does it also attempt to eliminate the threat?

Hostile is a keyword, but I’m not positive it is being used as a keyword in this situation. The keyword states

A hostile creature opposes the adventurers and their goals but doesn’t necessarily attack them on sight.

Is this the definition the animated undead is using? Must the hostility be directed towards the undead itself? Must the hostility involve an attack for the undead to take action?

The implications: An undead frequently may not need to receive a command if it plays loosely with the definitions of defends and hostile.

How do you determine a good set of breakpoints for srcset image sizes

My website right now is marginal for page loading speed on mobile. Originally written for desktop, I use a lot of images that are relatively high resolution, and only lightly compressed.

I’d like provide srcset images at various resolutions, but before I start, what are the optimum sizes, and how are they determined?

First approximation that occurs to me is (image as % of screen) * (viewport in pixels) and then calculate this for typical (and what is that, this week?) screen resolutions of desktop, tablet and phone.

On reflection, this approximation is naive.

  • Reducing the resolution of an image that’s too big will give better results than increasing one that is too small.

  • There aren’t really three situations to consider, but five, as both mobile and tablet can be use in either orientation. I don’t want the mobile user to have to slurp up new images when they rotate their phone. This isn’t as big a concern for tablets most of the time, as the bulk of tablet usage is on wifi.

  • Desktop usage has another factor: While screens have gotten wider, many users will have a browser up at less than full width. This one may not matter that much, as desktops have both the bandwidth and the processing speed to resize images.

  • Phones now come in a bewildering range of sizes and resolutions.

At present I’m looking at producing images at widths of 1300, 800, 500, 300 and setting cutoffs at 900 600 and 350, but this is little more than a WAG.

Does Oracle guarentee that ORA_HASH is used to determine which hash partition a row is inserted, and will this be honored in the future?

I use hash partitioning for a few of my very large tables, and occasionally I have a use case where it would be convenient to have a mechanism that would return the partition name that a row would be inserted into, given a partition value.

This blog here shows that we can use ORA_HASH function for this purpose. Incidentally, it appears this page is the only page on the entire internet that explains this.

I’ve used it successfully and it works in all cases that I have tried. It seems ORA_HASH is definitely what Oracle itself uses to pick the hash partition that it inserts data into, and that at least on the current version of Oracle it is safe to use for this use case.

However there is no guarantee in the documentation that Oracle even uses it, or will continue to use it in the future. This makes me think that using ORA_HASH in this way is not safe or future proof. What if a DB is upgraded and ORA_HASH no longer behaves this way?

For reference, you can use the following SQL to return the hash partition for a given value:

SELECT partition_name FROM all_tab_partitions WHERE table_name = 'FOO'     AND partition_position = ORA_HASH('bar', n - 1) + 1 

Where 'bar' is the value you wish to analyze, and n is the number of partitions in your table. There are some edge cases when the number of partitions is not a power of 2, which is covered in the blog article linked above.