[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

I was working on my database homework and I just completed the

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 9
Thread images: 1

File: ss+(2016-01-31+at+02.01.04).png (35KB, 747x831px) Image search: [Google]
ss+(2016-01-31+at+02.01.04).png
35KB, 747x831px
I was working on my database homework and I just completed the first question. I was wondering if anyone could check my answers quickly before I proceed to the next question. Thank you very much.
>>
>>47278
It's been a while since I did databases, but isn't ST_CODE a foreign key in Item?

You seem to be saying it's a primary key in Storage and a foreign key in Storage, which seems wrong.
>>
>>47281
yeah that was actually a typo. Since it's a primary key in storage, it's a foreign key in item

is the rest good? :o
>>
>>47278
Also you've not addressed entity integrity.
>>
>>47278
Not sure how ST_CONTACT can be a candidate key: what if the same guy hires two lockers?
>>
>>47285
Though it doesn't strike me as a very fair question: "imagine what data might be in the database, and from that answer a question that can only be answered by looking at the data that we haven't given you".
>>
>>47289
>>47289
OP here. So, there is no foreign key for storage, foreign key for ITEM is ST_CODE..Candidate keys for these tables could be ST_CODE, IT_CODE? .. and i'll do the entity integrity question.
>>
>>47289
I said ". Entity integrity states that primary keys cannot be null, and that there needs to be a proper value in the primary key field. Primary keys are used to identify individual rows in a table, and if for example ST_CODE was missing for a row in the STORAGE table, then there would be a violation."
>>
>>47293
>I said ". Entity integrity states that primary keys cannot be null, and that there needs to be a proper value in the primary key field.
The value also has to be unique.

>>47292
Candidate keys can be any column where the values meet the requirements of a primary key, i.e. every entry is non-null and unique. You can't really answer "what columns are candidate keys" without knowing what values are in them.
Thread posts: 9
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.