Answers to Candidate Key hard questions

Hi,
Thanks for visiting my blog.

Here are the answers for the two hard finding candidate keys examples:

*Answer
————-
1. ABCDEF
DF -> C
BC -> F
E -> A
ABC -> E

Steps:
1. Find the attributes that are not on both side
> –
2. Find the attributes that are only on the right side
> –
3. Find the attributes that are only on the left side
> BD
4. Find the attributes that on both sides
> ACEF

5. Find the closures of core attributes in step 3
> The closures of BD is only BD, it’s not all attributes

6. Find the closures of core attributes + one exterior attributes at a time (attributes on step 4).
> BDA – BDA
> BDC – BDCF
> BDE – BDEA
> BDF – BDFC
> none of the closures is the whole relation

7. Find the closures of core attributes + two exterior attributes at a time
> BDAC – BDACEF (the closure is the whole relation)
> BDAE – BDAE
> BDAF – BDAFCE (the closures is the whole relation)
> BDCE – BDCEAF (the closures is the whole relation)
> BDCF – BDCF
> BDEF – BDEFCA (the closures is the whole relation)

8. So the candidate keys are BDAC, BDAF, BDCE, and BDEF.

2.
ABCDE
A -> BC
CD -> E
B -> D
E -> A

Steps:
1. Find the attributes that are not on both side
> –
2. Find the attributes that are only on the right side
> –
3. Find the attributes that are only on the left side
> –
4. Find the attributes that on both sides
> ABCDE

*This is a special case, there is no core attributes, all attributes are on both sides, so all attributes are exterior. In this case we will try find the closures of one attribute at a time.

A – ABCDE (the closures is the whole relation)
B – BD
C – C
D – D
E – EABCD (the closures is the whole relation)

So A and E are candidate keys. Let’s try more combination without A and E.

BC – BCDEA (the closures is the whole relation)
BD – BD
CD – CDEAB (the closures is the whole relation)

So BC and CD are also candidate keys. So the candidate keys are A, E, BC, and CD.

Best regards,

djito

Programming Design Paradigm (PDP) Course Review : What, Why, and How to Get an A

Recently I noticed some discussions in NEU CS Facebook group about people’s comments on the PDP course. As always, there are people on both the positive and negative side. I’d like to join the discussion but I think writing in my blog would be better so people can read about it without joining the group.

I took PDP in Fall 2010, Prof. Mitchell Wand and Prof. Riccardo Pucella taught the lecture, but I believe the grades came from Prof. Wand based on the codewalk scores. Personally, I thought I and my partners did pretty good on most codewalks and I got A as final grade.

In this post I will tell you more about the setup of the course when I took it, why I think it’s one of the best course in MSCS program, and everything that I believe matters to get high scores. Continue reading “Programming Design Paradigm (PDP) Course Review : What, Why, and How to Get an A”

What is Computer Science?

The misconception

Probably the most common misconception about computer science is that people thought that the “computer” word in it is for “computer machines”, it’s NOT!

I think the more appropriate name for the degree should be Computing Science.

Why? Because although the field heavily uses computer machines as tools, at it’s core, it deals with calculation and computation, in short, mathematics.

Computer science already existed before IBM created what we call computers nowadays. In fact, the abacus can be considered as one of computer science tools. Continue reading “What is Computer Science?”

On Software Testing and Quality Assurance : Letter to Self


(photo by Cierpki)

After weeks of software quality assurance course, it scares me how many software teams I’ve been in the past that don’t do some, or even most, of the testing and QA basics that I learned in this course.

Finally, it’s the last week of the course and I’m going back to the professional world soon. So, this is a letter that I address to myself weeks, months, or years from now. Now I maybe supercharged with what I’ve learned in class, about regression testing, automated test cases, boundary value analysis, metrics, and so on.

But as time passes by, as the pressure of completing projects come, as the lazy devil tempted me to not write unit testing (oh wait, I can blame the devil), and of course as my memory started to fail me about what I learned in this course, I might not do any of the QA practices.

So this is the reminder for “that” me. Never give up what’s right for a short-time gain. You are better than this, you have the discipline to overcome the temptation, review the SQA lessons and blog posts you have written when you believed that a good quality software requires various measures but they are worth the price. Continue reading “On Software Testing and Quality Assurance : Letter to Self”

Testing Automation Process and Tools

Multi Tools
(creative photo by johnnyberg)

As we’ve discuss in the previous post about testing in Agile software development environment, automation is a very important part to successfully to be agile. However, one doesn’t need to be familiar with Agile process at all to see the immediate benefit of automating the testing process.

This time we’ll see different testing automation tools that we can use to make our life easier. 🙂 Continue reading “Testing Automation Process and Tools”

trac Bug / Defect Tracking Software Review

trac is a very minimalistic defect tracking system that has been around since 2006 (six years ago). In internet years where software come and go in just 1-2 years, this is a very long time.

Used by some of the big names such as NASA, WordPress, jQuery, and BitNami, trac is definitely worth to check. Continue reading “trac Bug / Defect Tracking Software Review”

Agile Testing

Space Rocket
(illustration by Rybson)

Agile, the hottest software development lifecycle (SDLC) nowadays, was initially used in small projects and considered not suitable for medium and large projects. But now large companies have picked up the trend and adopting it into their major projects.

By now we’ve agreed about the importance of testing in all stages of software development project. Yet, those stages are actually closer to the waterfall or other iterative and incremental SDLC with longer phase period. Agile iteration, typically called sprint, are a lot shorter and only last for 2-4 weeks.

In this blog post we’ll see the challenges, myths, and how the testing in agile can be performed. Continue reading “Agile Testing”

Outsourcing Testing and QA: Is it Feasible, Advisable, Risky?

outsource team
(photo by spekulator)

The exciting part of IT is, every several years there are always new trend in the industry where most of the people, even the experts and big companies, are riding the bandwagon. The new trend that promises that it will save costs, bring more productivity, and everything in between. The trend that usually disrupt the existing way of work and creates the pros and cons party.

Few years ago, such trend is outsourcing, and people and organizations have experienced it. Some had positive experience, some had negative ones, and some other had, probably, a bit traumatizing times. Continue reading “Outsourcing Testing and QA: Is it Feasible, Advisable, Risky?”

Meet Our Two Friends, IEEE 730-2002 and IEEE 829-2008 Standards

two jumping people
(photo by lusi)

Whenever we see numbers mixed with letters such as the title of this blog post we know that we’re up to something heavy.

Be prepared, because this time we’ll talk about the IEEE standards for the Software Quality Assurance Plan (SQAP) and Test Plan.
Continue reading “Meet Our Two Friends, IEEE 730-2002 and IEEE 829-2008 Standards”

Validation in Pharma Industry

pharmacy pills
(photo by Danny de Bruyne)

No, it’s not a typo, this time we’re talking about the validation, process, and quality assurance (QA) in pharmaceutical industry.

Maybe I’m not be the best person to talk about it although I had some experience in medical technology and clinical laboratory few years ago. Nonetheless, there are actually some similarities between pharma QA process with software QA process (now that’s the word we’re waiting for). Continue reading “Validation in Pharma Industry”