[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
I was working on my database homework and I just completed the
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /wsr/ - Worksafe Requests

Thread replies: 9
Thread images: 1
File: ss+(2016-01-31+at+02.01.04).png (35 KB, 747x831) Image search: [Google]
ss+(2016-01-31+at+02.01.04).png
35 KB, 747x831
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 replies: 9
Thread images: 1

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

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.