MESSAGE
DATE | 2014-12-11 |
FROM | Ruben Safir
|
SUBJECT | Re: Fwd: Re: [LIU Comp Sci] Database Class concepts which are still
|
From owner-learn-outgoing-at-mrbrklyn.com Thu Dec 11 19:04:10 2014 Return-Path: X-Original-To: archive-at-mrbrklyn.com Delivered-To: archive-at-mrbrklyn.com Received: by mrbrklyn.com (Postfix) id 6F752161168; Thu, 11 Dec 2014 19:04:10 -0500 (EST) Delivered-To: learn-outgoing-at-mrbrklyn.com Received: by mrbrklyn.com (Postfix, from userid 28) id 5884F16116B; Thu, 11 Dec 2014 19:04:10 -0500 (EST) Delivered-To: learn-at-nylxs.com Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) by mrbrklyn.com (Postfix) with ESMTP id 8DE8B161168 for ; Thu, 11 Dec 2014 19:04:09 -0500 (EST) Received: from panix2.panix.com (panix2.panix.com [166.84.1.2]) by mailbackend.panix.com (Postfix) with ESMTP id 52F3C13B43 for ; Thu, 11 Dec 2014 19:04:09 -0500 (EST) Received: by panix2.panix.com (Postfix, from userid 20529) id 47E7C33C87; Thu, 11 Dec 2014 19:04:09 -0500 (EST) Date: Thu, 11 Dec 2014 19:04:09 -0500 From: Ruben Safir To: learn-at-nylxs.com Subject: Re: Fwd: Re: [LIU Comp Sci] Database Class concepts which are still unclear Message-ID: <20141212000409.GA1118-at-panix.com> References: <5489FABB.2090501-at-panix.com> <548A0175.1020305-at-panix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <548A0175.1020305-at-panix.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: owner-learn-at-mrbrklyn.com Precedence: bulk Reply-To: learn-at-mrbrklyn.com
it can not hurt to be young an chinese an in the first row
On Thu, Dec 11, 2014 at 03:41:25PM -0500, Ruben Safir wrote: > > > > On 12/11/2014 01:25 PM, Ruben Safir wrote: > > further along in this chapter: > > > > <> > S(X), where > > the attributes of R are a subset of the attributes of S; >> > > > > I think I got this. It is convulted, but I have it. Everything comes > down to the one line in the text > > T1 ??? ??Y(R) > T2 ??? ??Y((S ?? T1) ??? R) > T ??? T1 ??? T2 > SSNS(Ssn) ??? SSN_PNOS ?? SMITH_PNOS > > SSN_PNOS R > Essn Pno > 123456789 1 > 123456789 2 > 666884444 3 > 453453453 1 > 453453453 2 > 333445555 2 > 333445555 3 > 333445555 10 > 333445555 20 > 999887777 30 > 999887777 10 > 987987987 10 > 987987987 30 > 987654321 30 > 987654321 20 > 888665555 20 > > > SMITH_PNOS - which is S > Pno > 1 > 2 > > > Now > T1 <-- ?? (ESSN)(SSn_PNOS) > 123456789 > 666884444 > 453453453 > 333445555 > 999887777 > 987987987 > 888665555 > > > That is all possible eligable SSNs > > T2 ??? ?? ssn((SMITH_PNOS ?? T1) ??? SSN_PNOS) > > Create a cartisian cross of desired pnos with possible sss > > > 123456789 1 > 112456789 2 > 666884444 1 > 666884444 2 > 453453453 1 > 453453453 2 > 333445555 1 > 333445555 2 > 999887777 1 > 999887777 2 > 987987987 1 > 987987987 2 > 888665555 1 > 888665555 2 > > Now subtract ll the combinations that exist in the real world (R) > > 666884444 1 > 666884444 2 > 333445555 1 > 333445555 2 > 999887777 1 > 999887777 2 > 987987987 1 > 987987987 2 > 888665555 1 > 888665555 2 > > > and take the projection > > 666884444 > 333445554 > 999887777 > 987987987 > 888665555 > > What is lest is all the values that can not exist as the final set > > T ??? T1 ??? T2 > subtract all the possible values from the ones that can not be the value > and the finished set is the values > 123456789 > 453453453 > > > This is very convoluted. The proof would be interesting to see and > there are a lot of dependencies and the actualy implementation is very > difficult, and not worth the time. As a theoretical and practicle > matter, this is a dead end. You don't do this sort of problem is > relational math. It do it with Lamda Calculus and for loops. > > This is like the quadradic equation. It is a waste of time to teach > when you can teach them calculus instead and solve the same problem > without going through 500 steps. > > This is what Perl was invented for. > > Ruben > > > No that is backards S is a subset of R and it says so on the next line > > > > <> > > > > X is a subset of Z > > https://en.wikipedia.org/wiki/Subset_and_superset#The_symbols_.E2.8A.82_and_.E2.8A.83 > > > > On 12/11/2014 12:57 PM, Ruben wrote: > >> Does anyone understand this. The way this is written it is not > >> comprehendable. The text doesn't flow logically and example, which in > >> theory is supposed to explain what the text does not, not not explain it > >> which leave this and "magic logic" - And Blood of a Nwet and Poof, you > >> get the desired chicken! > >> > >> <<6.3.4 The DIVISION Operation > >> The DIVISION operation, denoted by ??, is useful for a special kind of > >> query that > >> sometimes occurs in database applications.>> > >> > >> > >> Really? What kind? > >> > >> << An example is Retrieve the names of employees who work on all the > >> projects that ???John Smith??? works on. >> > >> > >> > >> What class of query is this called and how is it generlized mathmatically. > >> > >> > >> <> > >> > >> OK - we will learn by exmple since we have no definitions > >> > >> <> >> in the intermediate relation > >> SMITH_PNOS:>> > >> > >> OK > >> > >> <> >> SMITH_PNOS ??? ??Pno(WORKS_ONEssn=SsnSMITH)>> > >> > >> OK - that makes sense > >> > >> << Next, create a relation that includes a tuple whenever > >> the employee > >> whose Ssn is Essn works on the project whose number is Pno in the > >> intermediate > >> relation SSN_PNOS:>> > >> > >> That is a lot of words that make NO SENSE. This sentence doesn't parse > >> English Gammar in a way that is meaningful, which is interesting since > >> this is a chapter on Relational Algrabra for which Grammar is a specific > >> subset and application of. > >> > >> In other words, I don't think the auther knows what he wrote here and > >> his editor didn't know enough to fix it or clarify it. But we have an > >> example: > >> > >> <> > >> > >> Fine this MEANS project all the tuples in WORKS_ON by restricting them > >> to the attributes of Essn and Pno and assign it to a relationship we > >> call SSN_PNOS > >> > >> <> >> gives the desired > >> employees??? Social Security numbers:>> > >> > >> PRESTO!!! Use this magic symbol and get your desired result! > >> > >> <> > >> > >> I have no idea what this does and it hasn't been explained. It is a > >> waste of my time. > >> > >> <> > >> > >> And this says take a natural join of SSNS and EMPLOYEE and project just > >> the names. > >> > >> Now dissect the example more closely. Maybe "Presto" will show itself > >> and a logical contruction. > >> > >> > >> > >> > >> > >> > >> > >> SSN_PNOS > >> > >> Essn Pno > >> > >> 123456789 1 > >> > >> 123456789 2 > >> > >> 666884444 3 > >> > >> 453453453 1 > >> > >> 453453453 2 > >> > >> 333445555 2 > >> > >> 333445555 3 > >> > >> 333445555 10 > >> > >> 333445555 20 > >> > >> 999887777 30 > >> > >> 999887777 10 > >> > >> 987987987 10 > >> > >> 987987987 30 > >> > >> 987654321 30 > >> > >> 987654321 20 > >> > >> 888665555 20 > >> > >> > >> SMITH_PNOS > >> Pno > >> 1 > >> 2 > >> > >> SSNS > >> Ssn > >> 123456789 > >> 453453453 > >> > >> > >> > >> Magic Results, no explanation. This is the kind of soft material that > >> litters this class everywhere. I don't understand it and until you can > >> explain it, I'm not convinced you understand it either. > >> > >> > >> On 12/11/2014 11:03 AM, Ruben Safir wrote: > >>> 6.2.2 The CARTESIAN PRODUCT (CROSS PRODUCT) > >>> Operation > >>> Next, we discuss the CARTESIAN PRODUCT operation???also known as CROSS > >>> PRODUCT or CROSS JOIN???which is denoted by ??. This is also a binary set > >>> opera- > >>> tion, but the relations on which it is applied do not have to be union > >>> compatible. In > >>> its binary form, this set operation produces a new element by combining > >>> every > >>> member (tuple) from one relation (set) with every member (tuple) from > >>> the other > >>> relation (set). In general, the result of R(A1, A2, ..., An) ?? S(B1, B2, > >>> ..., Bm) is a rela- > >>> tion Q with degree n + m attributes Q(A1, A2, ..., An, B1, B2, ..., Bm), > >>> in that order. > >>> The resulting relation Q has one tuple for each combination of > >>> tuples???one from R > >>> and one from S. Hence, if R has nR tuples (denoted as |R| = nR), and S > >>> has nS tuples, > >>> then R ?? S will have nR * nS tuples. > >>> The n-ary CARTESIAN PRODUCT operation is an extension of the above concept, > >>> which produces new tuples by concatenating all possible combinations of > >>> tuples > >>> from n underlying relations. > >>> > >>> > >>> What is an n-ary operation? It is mentioned several times, but I don't > >>> see an answer > >>> > >>> Ruben > >>> > > > > >
|
|