Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
43 views
13 pages
DBMS Experiment 3
Uploaded by
yeontan460
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save DBMS EXPERIMENT 3 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
43 views
13 pages
DBMS Experiment 3
Uploaded by
yeontan460
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save DBMS EXPERIMENT 3 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 13
Search
Fullscreen
Page No. a) Create the following tololes based on tne below schema dial gram with appropriate data “types and constrains EMPLOYEECPmame, mi, Iname ssn ) kdate , yender-sakary vad dress, Superssn,dno) ; DEPARTMENT Cdname, dno, mgrssn , Mgrstartdate) DEPT. Locanions. Cadnumber, location >) PROTECT Cprare, prumber, Plocation ,dnum> WORKS-ON Cessn, pno, hours) : DEPENDENTCessn, deperdent— rare , sex, boate, relgtons Create and insert tne following tables S@L> create table emp204¢Gfname char@20);m? charcl), in fame charc20), ssn number Clo) Primary key , ledcrte do! Pee gender charci), salary number(s), address vareho| 40)» SUperssn numbercie), dno Numbercid) | [Table created IS@L> insert into emp204 values C'£Frame!, ‘emi? Zinamf! 2ssn ,\2bdate’, ‘Rqender |, salary, Racdgress /-Lsuph Ferssn,,&dno>; Enter value for mi: Enter value for iname:> smith enter value for Ssn : 123456789 Enter value for bdate : @—jan-6s Enter value for gender: m Enter value for Salary + 30000 lenter value for address + 73), -fordern, houstan, tx Enter value for e } jonn tb Laki Reddy Bali Reddy College of EngineeringPage No. enter value for Superssn »- 333445555 Enrer Value for dno: S \ row created IS@L> / Enter value -For ~Pname: franklin enter value for mi:t - lenter value for tname: wong Enter value for ssn . 33344S5S5° Enter value for fdorte : (3-aUug-63 Enter vaiue for gender =m enter value for Salary : 40000 enter Value for address : 638, Mev, houstan tx Enter value for Superssn: 8egeqssss Enter, value for dno: Ss Table created - IS@L> Select % from emp204 ) BOL> Create table depart2o4 Gnome charC20), dnumbe rumberC> primary Key , mgrssn) Number@), marstary Ldate date >: Tolle created ISQL> insert Into depart2o4 values C'S dMame!, elnumbel Bmgrssn , 'Smgrstartadate y: Enter value for dname : research Enter value for dnumber 1S enter Value for marssn: 333445855 Enter volue for morstartdate | 22—moy- & ( row created Laki Reddy Bali Reddy College of Engineering| Page No. seu> / : Enter value for dname > administration | | Enter Volue -for dnumber :4 | Enter value for MATSSN | 98165432} Encex value for ma rstartdate : 1-jan -AS l row created IS@L> Select * from depart20+; IS@L> create table depart—loc204+Cdnumber NUMmberci e Ikloacation varcharC20), primary key Cdinumber , dlocat| Fron): Table created. S@L> Insert into depart loc204 values CZdnumber , Ballo reatton'D; Enrer yolue for drumber: | enter value for diocation » houstan kK Pow Created IS@L> | ® |lenter value for daumber .4 lenter value for diocation: Stafford l row created Is@L> select * From depart-loc204 » ls@L> create tale proj204+ values C pname varcharc20)| pnumber number) primary key, plocation varcharcid drum numbercid)) alole crecttect Laki Reddy Bali Reddy College of EngineeringPago No. ISOL> insert ito proj2o4 valuesC Kprame', Spnumber , ‘Rplocation!, Ldnumd ; Enter value for prame : product % enter value for pnumber: | Eater Value for plocation : bellafre enter value for dnum:S \ raw created SQL> / Enter value for pname: product y Enter value for pnumber : 2 enter value for plocation : sugariand Enter value for dnum: Ss ( row created SOLS Select x from proj204: S@L> create table Work -at20+( pberc2), Pamary key cessn, [Tolle created Cessn numberdo>, pro nun PNod, hoUrs number CJ) SQL> insert into work ct204 values C2essn, 2pno, Lhourd Enter vatue for essn -12345678q lentey value for pro: ) Ente’ value for hours + 3:25 \ row created SQL>/ Enter value for essn :1234567189 Enter value for poo. 2 lentey value for hours: 7S | row created. Laki Reddy Bali Reddy College of EngineeringPage No. SQL> Select * From work -ot204¢ 5 SQL> Create table depend204 Cessn numberCioy, dependent: name charc20), gender charcid, bdate date, relation Fhip charcio>, primary key Cessn , dependent-name)) ; Table created. | , Is@L> insert into depend20+ ValuesCZessn , Bdepe rdent— fhame', ‘Bqender', ‘Zedate ', \grelationship'>: Enter Value for essn: 333445SSS° enter value for dependent—name ‘alice Enter value for gender : Enter Value For bdate S-apr—86 Enter value for relationship : dovohter \ row created. IS@L>/ Enter value for essn: 333445555 Earer value for deperdent-name : theodore enrer value for gemder=™ enter value fer bdate” 25~act ~83 Enter solve for relationsnip = Son \ rw created IS@L> select * from depéend2ot 5 | |DIsploy all employee homes along with their depart] ment names IS@L> Select e-Ffname, e-mi,e-iname, d-dname from lemp20¢+ @, depart204 d winere e-dno = d-dnumber ; Laki Reddy Bali Reddy College of EngineeringoO a) 2 #) »D ® Page No. pisplay all employee names along with their dependent Idetatls IS@L> gelect e-frare,e-mi’, e-iname ,d-essh ,d-de pendent—nare| Id gender, d - bdate,d relationship from emp2.04 e, depend 20% d 5 List the names of employee who have ot least one depe| Pndent Is@cy select €-fname,e-mr', e-1name , d-essn, hame from emp204 e ; depend204 d Where e -sn 5 d-dependent- ssn = dees} Display name and address of all employees who wort # roy research department IS@L> select Frame, Address from emp204 where dno inc select dnumber from depart204 where dname= ‘resa. Prch D> List the names of all employess with two or More dependents IS@L> Select frame from emp20+ Where select Count cx) From depend204 where ssn = esSN)> =2/ ust the name of employees who have no depende| Lnts IS@L> Select e-frame from emp204 © Where not exs Ltscselect '#! From emp204 # where £-Superssn ~ le-ssn); List tne names of the employees along with the nam] Fes of their Supervisor using alias. BQ@LYSelect e-fname, S:-fName from emp20+ ©, emp204 Laki Reddy Ball Reddy College of Engineering paS where e-superssn = S-Ssn ) pisplay names of the department and names Of mdrog) er for al) departments IS@L> Select d-drarre , e-Fframe from emp204 e, depart2 -o4 do where €-Ssn = d-mgrssn ; ptsplay the mame of cach employee who has depende| Lint with tne same first name and gender as the lemployee IS@L> Select e-fname, e-fhame from emp204e Where k.csn in Cselect ess from depend2o4 d where e-fro| Lme = d-dependentname and e.gender = d-gendey)) Ino rows selected Taki Reddy Bali Reddy College of EngineeringEMPLOYEE FNAME [MINIT] NAME ssn | spate] AvpRess | Sex _[Satary | superssn | DINO PARTMENT DNAME ONUMBER MERSSINV M@RSTARTDATE DEPT _LOCATIONS LenomBer LOCATION prosecr [ename | ewuMBER | elocation ] ONOM WORKS_ON | ESSN eNO HOURS | DEPENDENT ESSN DEPENDENT- NAT SEX _| BDATE RELATIONSHIPFNAME _ _ Jonn b franklin t 123456789 OI-TAN m smith WONG BBSHSSSS BoAtE _G _SALARY_ 30000 ~6s 13- AUG 401 Ses m 1000 _appress a 731 ,forder 22244 —n houston F355 (ta 638, MOv,- BRece houston td Sssss eae — zelayo AeABBTTTT (Q-TAN~ ¢ 2asq00 B321,castle, qa7gs 68 houston tx -+32! oe wallace . 96165432) 22 oe # 43000 29) berry, gegeg beraive ta SSSS ee K harayan 66688444 See mM 38000 995 ,,Firecak, 3344 humble ta SSs5 sates a english 45354345 ora # 25000 S63, rice, aa houstan,€% -S) ‘ames i. brog = BB BEESSS —I-NOV-E_ F S5D00 —n\| BsIT6eS e ® . 'g a4 nwdepart 204 DNAME CNOMBER MaRSSN ME RSTARTDATE research 5 233r-45SSS 22-MAN-88 adminstraton + 981654321 Ch geem a headquarters ' 88866555 oe a depart loc204+ DNUMBER _ __ _ DLBCATION __— ' hovstan 4+ stafford = betlatre, a sugar land . Proj2o¢ table - PNAME __ _PNUMBER _ _ PLOCATION ____DNUM__ __ Product % ' bellarre s Product y 2 sugariand = Product 2 3 houstan, a computer i) stafford work —at204% table SSN __ ENO HOURS ___ 123456789 ! 23 123456789 2 VW 666884444 - = 453453343 > Ee 453452345 depend20% table ESSN __DEPENDENT_NAME § OATE _ RELATIONSHIP _ 33344555 alice F OS-APR-86 daughter S5344 555° theodore m 25-0cT-83 sonb) Jonn Pranktin allera. jennifer ramesh Joyce James ENAME __ Sf _ NAME _ smi th wong zelaya wallace noaayon english brogq __DNAME _ _ _ research rese dycTh administration administraton research research, head quartersID | ENAME __M_ TNAME_ _ ESSN _ _ DEPENOEMTAME 4 _ BDATE _ _ _RELETIONSHP Jorn b smith 333445555 alice CS-APR—8G daughter | Leranklin t wong 333445555 alice # OS-APR ~86 daughter | alicia t Zelaya 333445555 altce ¢ OS-APR-86 daughter | jennifer SS Wallace SBE4SSSS alice 7 ares 86 chugnter ke Marayan 33345585 alice S-APR-86 clughter ee ' Ie f OS-APR-86 daughter joyce a english 333445385" alee 5 ee oe James e bog B3a44sss5 lice = eoaneey John b smith 383445555 theedore 7 2S-ocr. : sch leonkiin « & «SO wORG«—«-8344SSSS" Theodore = ™ oa Litera. & 2elayq 3334455SS thecdore m 2s-0cT-83 jennifer - S_—Walllace 933445555 Thendore me ene 4 emest kK Rarayan 33344555 theodore = pas non royce a english S38dqssss theodore ee an lames e brog = Baa¢¢sS55 theodoreoo — dD) FNAME M orNAME — — _ESSN ___ DEPENIDENT_NAME _ prankiin wong 333445585 ‘theodore franklin tt Wong 333445555, altce e} _ENaMme ADDRESS Lt John 713), Fondem, houstan ta franktin 638, Mov, houstan tx | ramesh qs, Frreoat , huMb!e »£% joyce SoBl, A ce, houstan, tx #) ENAME __ franktin FNAME __ ramesh joyce james altelo John WwW) —ENAME_ _ _ ___ ENAMEE Jonn Franklin Net AK Jenorter Dp] _ONeME os __ CENOME research Prankliin administration / Jennifer head quorters james
You might also like
ASSINGNEMENT On Employee, Department, Dept - Location, Dept - MGR, Project, Works - On, Dependent
PDF
100% (1)
ASSINGNEMENT On Employee, Department, Dept - Location, Dept - MGR, Project, Works - On, Dependent
10 pages
DB Lab2 ERP Ahmed Adel
PDF
0% (1)
DB Lab2 ERP Ahmed Adel
7 pages
Lab Assignment 2 DBMS
PDF
No ratings yet
Lab Assignment 2 DBMS
16 pages
DBMS Lab-4
PDF
No ratings yet
DBMS Lab-4
8 pages
Name: Vinayak Nagar Reg - No.: 21MCA0015 Subject: Database Technology Topic: Assignment-1
PDF
No ratings yet
Name: Vinayak Nagar Reg - No.: 21MCA0015 Subject: Database Technology Topic: Assignment-1
77 pages
Dbms Lab Assignment-04:: Karthikeyan M: 20BCE0145
PDF
No ratings yet
Dbms Lab Assignment-04:: Karthikeyan M: 20BCE0145
17 pages
SQL Quiries
PDF
No ratings yet
SQL Quiries
6 pages
DBMS & Gui Lab Manual
PDF
No ratings yet
DBMS & Gui Lab Manual
15 pages
VL2023240506367 Ast03
PDF
No ratings yet
VL2023240506367 Ast03
7 pages
Dbms Prog2
PDF
No ratings yet
Dbms Prog2
9 pages
SQL
PDF
No ratings yet
SQL
8 pages
DBMS Lab
PDF
No ratings yet
DBMS Lab
13 pages
Dbms Raw File
PDF
No ratings yet
Dbms Raw File
19 pages
Sanjana Dbms Work
PDF
No ratings yet
Sanjana Dbms Work
38 pages
DBMS Mini Project M
PDF
No ratings yet
DBMS Mini Project M
15 pages
Lab 2
PDF
No ratings yet
Lab 2
21 pages
RDBMS Query 4
PDF
No ratings yet
RDBMS Query 4
4 pages
DBMS Record PartA
PDF
No ratings yet
DBMS Record PartA
24 pages
CSE 2031 Principles of Database Management System Lab Assessment - 2
PDF
No ratings yet
CSE 2031 Principles of Database Management System Lab Assessment - 2
5 pages
CSE2004-Data Base Management Systems: Course: CSE2004-DBMSLAB B.Tech
PDF
No ratings yet
CSE2004-Data Base Management Systems: Course: CSE2004-DBMSLAB B.Tech
3 pages
Fallsem2021-22 CBS1007 Ela VL2021220104397 Reference Material Cycle Sheet 4
PDF
No ratings yet
Fallsem2021-22 CBS1007 Ela VL2021220104397 Reference Material Cycle Sheet 4
12 pages
Emp Database: Create The Following Tables
PDF
No ratings yet
Emp Database: Create The Following Tables
4 pages
LabAssignment 2 DBMS
PDF
0% (1)
LabAssignment 2 DBMS
5 pages
Database Exrcise1
PDF
No ratings yet
Database Exrcise1
9 pages
Lab 1
PDF
No ratings yet
Lab 1
6 pages
Emp Database
PDF
No ratings yet
Emp Database
8 pages
19BCE2651 (Cycle Sheet 1)
PDF
100% (1)
19BCE2651 (Cycle Sheet 1)
16 pages
DBMS Record PGM 5
PDF
No ratings yet
DBMS Record PGM 5
14 pages
Company Database Lab Work
PDF
No ratings yet
Company Database Lab Work
21 pages
Aneesh Panchal 2 K20 MC21
PDF
No ratings yet
Aneesh Panchal 2 K20 MC21
27 pages
Company DB
PDF
No ratings yet
Company DB
12 pages
Program 2
PDF
No ratings yet
Program 2
10 pages
21bce0968 VL2023240100969 Ast01
PDF
No ratings yet
21bce0968 VL2023240100969 Ast01
22 pages
7-Queries With Aggregate Functions (Group by and Having Clause) - 19!02!2024
PDF
No ratings yet
7-Queries With Aggregate Functions (Group by and Having Clause) - 19!02!2024
12 pages
Database Codes
PDF
No ratings yet
Database Codes
12 pages
DBMS Prog 5
PDF
No ratings yet
DBMS Prog 5
7 pages
Creating Company Database Schema and Populating With Data: and Reasoning Behind Constraints
PDF
No ratings yet
Creating Company Database Schema and Populating With Data: and Reasoning Behind Constraints
6 pages
SQL W4
PDF
No ratings yet
SQL W4
13 pages
Dbms
PDF
No ratings yet
Dbms
22 pages
Lab 2
PDF
No ratings yet
Lab 2
3 pages
Tabel Company Database1
PDF
No ratings yet
Tabel Company Database1
2 pages
13-PL - SQL Programs-15-04-2024
PDF
No ratings yet
13-PL - SQL Programs-15-04-2024
33 pages
Department OF Computer Science and Engineering: Data Base Management System Laboratory
PDF
No ratings yet
Department OF Computer Science and Engineering: Data Base Management System Laboratory
37 pages
Mod 4 Queries
PDF
No ratings yet
Mod 4 Queries
6 pages
Assignment 2 (22BCE8809)
PDF
No ratings yet
Assignment 2 (22BCE8809)
12 pages
Dbmslab 2
PDF
No ratings yet
Dbmslab 2
17 pages
Query 6 Company Database
PDF
No ratings yet
Query 6 Company Database
7 pages
Oot Lab1
PDF
No ratings yet
Oot Lab1
40 pages
Company DB Values
PDF
No ratings yet
Company DB Values
9 pages
Lab2 RDBMS
PDF
No ratings yet
Lab2 RDBMS
2 pages
DocScanner Oct 29, 2023 5-45 PM
PDF
No ratings yet
DocScanner Oct 29, 2023 5-45 PM
9 pages
How Many Different Departments Are There in The Employee' Table. A)
PDF
No ratings yet
How Many Different Departments Are There in The Employee' Table. A)
14 pages
CS 631 Review Project Given The Following Database
PDF
No ratings yet
CS 631 Review Project Given The Following Database
6 pages
SQL Sheet
PDF
No ratings yet
SQL Sheet
5 pages
FALLSEM2023-24 BCSE302P LO VL2023240101023 2023-05-02 Reference-Material-I
PDF
No ratings yet
FALLSEM2023-24 BCSE302P LO VL2023240101023 2023-05-02 Reference-Material-I
3 pages
DBMS 8446 Prac Q4
PDF
No ratings yet
DBMS 8446 Prac Q4
16 pages
VL2023240100971 Ast01
PDF
No ratings yet
VL2023240100971 Ast01
6 pages
Details About DDM Lab
PDF
100% (1)
Details About DDM Lab
33 pages
Csa Sem5
PDF
No ratings yet
Csa Sem5
29 pages