Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Database Table Structures - Database Name - KeyToneIncEmployee Field NameData TypeKeyfnametext ( 1 5 ) MinittextLnametext ( 1 5 ) ssntext ( 9 ) PrimaryBdatedateAddresstext

Database Table Structures- Database Name - KeyToneIncEmployee Field NameData TypeKeyfnametext(15)MinittextLnametext(15)ssntext(9)PrimaryBdatedateAddresstext(30)Sextext,SalaryNumber - decimal(10,2)Super_ssntext(9)Foreign (Ssn in Employee)DnoNumber Foreign (Dnumber in Department)DepartmentField NameData TypeKeyDnametext(15)DnumberNumberPrimaryMgr_ssntext(9)Foreign (Ssn in Employee)Mgr_start_date dateDept_LocationsField NameData TypeConstraintKeyDnumberNumbernot nullprimary,foreign (Dnumber in Department)Dlocationtext(15)not nullprimaryProjectField NameData TypeKeyPnametext(15)PnumberNumberPrimaryPlocationtext(15),DnumNumberForeign (Dnumber in Department)Works_OnField NameData TypeKeyEssntext(9)Primary, Foreign (Ssn in Employee)PnoNumberPrimary, Foreign (Pnumber in Project)HoursNumber decimal(3,1)DependentField NameData TypeKeyEssntext(9)PrimaryDependent_nametext(15)PrimarySextextBdatedateRelationshiptext(8)Create appropriate relations among tables,The Tables' DataEmployeeFnameMinitLnameSsnBdateAddressSexSalarySuper_ssnDnoJohnBSmith1234567891965-01-09731 Fondren, Houston, TXM30000.003334455555FranklinTWong3334455551955-12-08638 Voss, Houston, TXM40000.008886655555JoyceAEnglish4534534531972-07-315631 Rice, Houston, TXF25000.003334455555RameshKNaranyan6668844441962-09-20975 Fire Oak, Humble, TXM38000.003334455555JamesEBorg8886655551937-11-10450 Stone, Houston, TXM55000.00NULL1JenniferSWallace9876543211941-06-20291 Berry, Bellaire, TXF43000.008886655554AhmadVJabbar9879879871969-03-29980 Dallas, Houston, TXM25000.009876543214AliciaJZelaya9998877771968-01-193321 Castle, Spring, TXF25000.009876543214DepartmentDnameDnumberMgr_ssnMgr_start_dateHeadquarters18886655551981-06-19Administration49876543211995-01-01Research53334455551988-05-22Dept_LocationsDnumberDlocation1Houston4Stafford5Bellaire5Houston5SugarlandProjectPnamePnumberPlocationDnumProductX1Bellaire5ProductY2Sugarland5ProductZ3Houston5Computerization10Stafford4Reorganization20Houston1Newbenefits30Stafford4DependentEssnDependent_nameSexBdateRelationship123456789AliceF1988-12-30Daughter123456789ElizabethF1967-05-05Spouse123456789JohnM2000-01-01Son123456789MichaelM1988-01-04Son333445555AliceF1986-04-05Daughter333445555JoytF1958-05-03Spouse333445555TheodoreM1983-10-25Son987654321AbnerM1942-02-28SpouseWorks_OnEssnPnoHours123456789132.512345678927.5333445555210.0333445555310.03334455551010.03334455552010.0453453453120.0453453453220.0666884444340.0888665555200.09876543212015.09876543213020.09879879871035.0987987987305.09998877771010.09998877773030.0queries :List the first name, last name, Supervisor's first and last name, Department number and the average salary for everyone in AdministrationFor every the employee with a dependent, list the dependent's first name, the employee's last name, and relation to the employee.List the name of employees with a dependent named "Alice" and the relationship to the employee.List everyone who works in Research (name and salary).For each project, list project name, location, department and the superior of everyone working on that project.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Deductive And Object Oriented Databases Second International Conference Dood 91 Munich Germany December 18 1991 Proceedings Lncs 566

Authors: Claude Delobel ,Michael Kifer ,Yoshifumi Masunaga

1st Edition

3540550151, 978-3540550150

More Books

Students also viewed these Databases questions