SlideShare ist ein Scribd-Unternehmen logo
1 von 5
Downloaden Sie, um offline zu lesen
MICRO PROJECT FOR COMPUTER ENGINEERING 3I
1. CREATE A SIMPLE INFORMATION SYSTEM TO STORE COURSE ENROLLMENT DATA FOR
A UNIVERSITY.
Requirements:-
2) CREATE A SIMPLE ORACLE DATABASE & PERFORM SOME COMMON DATABASE
OPERATIONS.
Step 1: Create the tables
The schema for the database is as follows:
1. STUDENT (*snum: number, sname: varchar, deptid: number, slevel: varchar, age: number)
2. CLASS (*cname: varchar, meets_at: date, room: varchar, fid: number)
3. ENROLLED (*snum:number, *cname: varchar)
4. FACULTY (*fid: number, fname: varchar, deptid: number)
5. DEPARTMENT (*deptid: number, dname: varchar, location: varchar)
The fields marked with '*' are primary key
Create all the key and referential integrity constraints necessary to model the application.
Step 2:- Insert data into tables
DEPARTMENT
insert into DEPARTMENT values (1,'Computer Sciences','West Lafayette');
insert into DEPARTMENT values (2,'Management','West Lafayette');
insert into DEPARTMENT values (3,'Medical Education','Purdue Calumet');
insert into DEPARTMENT values (4,'Education','Purdue North Central');
insert into DEPARTMENT values (5,'Pharmacal Sciences','Indianapolis');
STUDENT
insert into STUDENT values (0418,'S.Jack',1,'SO',19);
insert into STUDENT values (0671,'A.Smith',2,'FR',20);
insert into STUDENT values (1234,'T.Banks',3,'SR',18);
insert into STUDENT values (3726,'M.Lee',5,'SO',20);
insert into STUDENT values (4829,'J.Bale',3,'JR',22);
insert into STUDENT values (5765,'L.Lim',1,'SR',19);
insert into STUDENT values (0019,'D.Sharon',2,'FR',20);
insert into STUDENT values (7357,'G.Johnson',1,'JR',19);
insert into STUDENT values (8016,'E.Cho',5,'JR',22);
FACULTY
insert into FACULTY values (101,'S.Layton',1);
insert into FACULTY values (102,'B.Jungles',2);
insert into FACULTY values (103,'N.Guzaldo',5);
insert into FACULTY values (104,'S.Boling',4);
insert into FACULTY values (105,'G.Mason',1);
insert into FACULTY values (106,'S.Zwink',2);
insert into FACULTY values (107,'Y.Walton',5);
insert into FACULTY values (108,'I.Teach',5);
insert into FACULTY values (109,'C.Jason',5);
CLASS
insert into CLASS values ('ENG400',to_date('08:30','HH:MI'),'U003',104);
insert into CLASS values ('ENG320', to_date('09:30','HH:MI'),'R128',104);
insert into CLASS values ('COM100', to_date('11:30','HH:MI'),'L108',104);
insert into CLASS values ('ME308', to_date('10:30','HH:MI'),'R128',102);
insert into CLASS values ('CS448', to_date('09:30','HH:MI'),'R128',101);
insert into CLASS values ('HIS210', to_date('01:30','HH:MI'),'L108',104);
insert into CLASS values ('MATH275', to_date('02:30','HH:MI'),'L108',105);
insert into CLASS values ('STAT110', to_date('04:30','HH:MI'),'R128',105);
insert into CLASS values ('PHYS100', to_date('04:30','HH:MI'),'U003',101);
ENROLLED
insert into ENROLLED values (0418,'CS448');
insert into ENROLLED values (0418,'MATH275');
insert into ENROLLED values (1234,'ENG400');
insert into ENROLLED values (8016,'ENG400');
insert into ENROLLED values (8016,'ENG320');
insert into ENROLLED values (8016,'HIS210');
insert into ENROLLED values (8016,'STAT110');
insert into ENROLLED values (0418,'STAT110');
insert into ENROLLED values (1234,'COM100');
insert into ENROLLED values (0671,'ENG400');
insert into ENROLLED values (1234,'HIS210');
insert into ENROLLED values (5765,'PHYS100');
insert into ENROLLED values (5765,'ENG320');
Step 3: Query your database
Write SQL queries and run them on the Oracle system.
1. For each department, print the department id, department name and number of faculty affiliated with that
department. Print 0 as the number of faculty if a department has no faculty.
2. Print the faculty id, name and department id of the faculty teaching the maximum number of classes
3. Print the name, department id and age of the student enrolled in the maximum number of classes taught by
faculty affiliated with the Computer Sciences department (i.e. dname is Computer Sciences)
4. Print the name and department id of the student(s) who take classes in all rooms that a class is taught OR are
younger than 20.
5. Print the ids (snum) of the students who have more than 3 (distinct) classmates in total.
6. Print the names of (distinct) faculty who teach 2 or more classes in the same room
7. For each department except Management (i.e. dname = Management), print the department id and the average
age of students in that department. If a department has no students, print 0 for the average age.
8. Print the department id, name and age of the youngest student not enrolled in any classes
9. Print the ids (snum) of the students majoring in a department whose faculty do not teach any classes
10. What is the name of the faculty teaching the class with the greatest number of students enrolled? What is the
number of students in that class?
Step 4: Views
Create two views (Name them VIEWA and VIEWB) and print their contents.
A. A view that shows the faculty name followed by the number of classes taught by that faculty, ordered by
faculty name. Print 0 if the number of classes is 0.
B. A view that shows the names of people (students and faculty) that are expected to be present in a room each
time that a relevant class is taught there. This should be one view with both faculty and student names. A student
enrolled in a class is "expected" to be present for each session of the class, and a faculty member teaching a class
is "expected" to be present for each session of the class. Hence, the view should contain three fields: name,
room, and time.
3) Use PL/SQL (Oracle's procedural extension to SQL) to write a few functions and procedures to process
data.
Step1 : PL/SQL Create a file named procedures.sql.
The first line of this file should be:
set serveroutput on size 32000
Note: - Create and run five procedures: pro_department_report, pro_student_stats, pro_faculty_stats,
1) pro_department_report:
Generate a report that lists, for each department, the students in that department.
For each department, you should first print the department name on a line followed by the number of students in
that department on the next line and a numbered list of student names in that department.
The output should be modeled as follows:
Sort by the department name (ascending and sort by student name (ascending) for each department.
Sample output:
Department: Computer Sciences
Total number of students: 3
-------------
1. Alice
2. Bob
3. Joe Department
2) pro_student_stats:
Generate a report that contains statistics about students.
Print out the number of classes that each student is taking; omit students taking no classes. Sort by student name.
Sample output:
Student Name # Classes
--------------- ----------
Bob 3
Joe 2
3) pro_faculty_stats:
Generate a report about the total number of students each faculty teaches.
Sort results by faculty name. The number of students for each faculty.

Weitere ähnliche Inhalte

Was ist angesagt? (17)

Sql commands
Sql commandsSql commands
Sql commands
 
Data structures; arrays By ZAK
Data structures; arrays By ZAKData structures; arrays By ZAK
Data structures; arrays By ZAK
 
Dbms Interview Question And Answer
Dbms Interview Question And AnswerDbms Interview Question And Answer
Dbms Interview Question And Answer
 
SQL Fundamentals - Lecture 2
SQL Fundamentals - Lecture 2SQL Fundamentals - Lecture 2
SQL Fundamentals - Lecture 2
 
Sql wksht-7
Sql wksht-7Sql wksht-7
Sql wksht-7
 
Normalization
NormalizationNormalization
Normalization
 
SQL
SQL SQL
SQL
 
SQL Basics
SQL BasicsSQL Basics
SQL Basics
 
Sql fundamentals
Sql fundamentalsSql fundamentals
Sql fundamentals
 
Micro project list dms- 22319
Micro project list dms- 22319Micro project list dms- 22319
Micro project list dms- 22319
 
SQL
SQL SQL
SQL
 
12 SQL
12 SQL12 SQL
12 SQL
 
Data Manipulation Language
Data Manipulation LanguageData Manipulation Language
Data Manipulation Language
 
PPT
PPTPPT
PPT
 
ALL ABOUT SQL AND RDBMS
ALL ABOUT SQL AND RDBMSALL ABOUT SQL AND RDBMS
ALL ABOUT SQL AND RDBMS
 
Oracle SQL Fundamentals - Lecture 3
Oracle SQL Fundamentals - Lecture 3Oracle SQL Fundamentals - Lecture 3
Oracle SQL Fundamentals - Lecture 3
 
Sql database object
Sql database objectSql database object
Sql database object
 

Ähnlich wie Micro project project co 3i

9608 Computer Science Cambridge International AS level Pre-Release May June p...
9608 Computer Science Cambridge International AS level Pre-Release May June p...9608 Computer Science Cambridge International AS level Pre-Release May June p...
9608 Computer Science Cambridge International AS level Pre-Release May June p...Isham Rashik
 
SQL Queries and Solutions (Database)
SQL Queries and Solutions (Database)SQL Queries and Solutions (Database)
SQL Queries and Solutions (Database)SM. Aurnob
 
Two dimensional array
Two dimensional arrayTwo dimensional array
Two dimensional arrayRajendran
 
SECTION D2)Display the item number and total cost for each order l.docx
SECTION D2)Display the item number and total cost for each order l.docxSECTION D2)Display the item number and total cost for each order l.docx
SECTION D2)Display the item number and total cost for each order l.docxkenjordan97598
 
Chapter 16-spreadsheet1 questions and answer
Chapter 16-spreadsheet1  questions and answerChapter 16-spreadsheet1  questions and answer
Chapter 16-spreadsheet1 questions and answerRaajTech
 
Introduction to Data Modeling in Cassandra
Introduction to Data Modeling in CassandraIntroduction to Data Modeling in Cassandra
Introduction to Data Modeling in CassandraJim Hatcher
 
Based on the materials for this week, create your own unique Datab.docx
Based on the materials for this week, create your own unique Datab.docxBased on the materials for this week, create your own unique Datab.docx
Based on the materials for this week, create your own unique Datab.docxJASS44
 
Charles WilliamsCS362Unit 3 Discussion BoardStructured Query Langu.docx
Charles WilliamsCS362Unit 3 Discussion BoardStructured Query Langu.docxCharles WilliamsCS362Unit 3 Discussion BoardStructured Query Langu.docx
Charles WilliamsCS362Unit 3 Discussion BoardStructured Query Langu.docxchristinemaritza
 
Essential Access Exercises week 1-4.pdf
Essential Access Exercises week 1-4.pdfEssential Access Exercises week 1-4.pdf
Essential Access Exercises week 1-4.pdfJoshCasas1
 
ADBMS ASSIGNMENT
ADBMS ASSIGNMENTADBMS ASSIGNMENT
ADBMS ASSIGNMENTLori Moore
 
RANDOM TESTS COMBINING MATHEMATICA PACKAGE AND LATEX COMPILER
RANDOM TESTS COMBINING MATHEMATICA PACKAGE AND LATEX COMPILERRANDOM TESTS COMBINING MATHEMATICA PACKAGE AND LATEX COMPILER
RANDOM TESTS COMBINING MATHEMATICA PACKAGE AND LATEX COMPILERijseajournal
 
SE-IT JAVA LAB SYLLABUS
SE-IT JAVA LAB SYLLABUSSE-IT JAVA LAB SYLLABUS
SE-IT JAVA LAB SYLLABUSnikshaikh786
 
Database queries
Database queriesDatabase queries
Database querieslaiba29012
 
Structured Query Language for Data Management 2 Sructu.docx
Structured Query Language for Data Management      2 Sructu.docxStructured Query Language for Data Management      2 Sructu.docx
Structured Query Language for Data Management 2 Sructu.docxjohniemcm5zt
 

Ähnlich wie Micro project project co 3i (20)

Dbms record
Dbms recordDbms record
Dbms record
 
9608 Computer Science Cambridge International AS level Pre-Release May June p...
9608 Computer Science Cambridge International AS level Pre-Release May June p...9608 Computer Science Cambridge International AS level Pre-Release May June p...
9608 Computer Science Cambridge International AS level Pre-Release May June p...
 
SQL Queries and Solutions (Database)
SQL Queries and Solutions (Database)SQL Queries and Solutions (Database)
SQL Queries and Solutions (Database)
 
Mmt 001
Mmt 001Mmt 001
Mmt 001
 
Two dimensional array
Two dimensional arrayTwo dimensional array
Two dimensional array
 
SECTION D2)Display the item number and total cost for each order l.docx
SECTION D2)Display the item number and total cost for each order l.docxSECTION D2)Display the item number and total cost for each order l.docx
SECTION D2)Display the item number and total cost for each order l.docx
 
Chapter 16-spreadsheet1 questions and answer
Chapter 16-spreadsheet1  questions and answerChapter 16-spreadsheet1  questions and answer
Chapter 16-spreadsheet1 questions and answer
 
Introduction to Data Modeling in Cassandra
Introduction to Data Modeling in CassandraIntroduction to Data Modeling in Cassandra
Introduction to Data Modeling in Cassandra
 
Based on the materials for this week, create your own unique Datab.docx
Based on the materials for this week, create your own unique Datab.docxBased on the materials for this week, create your own unique Datab.docx
Based on the materials for this week, create your own unique Datab.docx
 
Charles WilliamsCS362Unit 3 Discussion BoardStructured Query Langu.docx
Charles WilliamsCS362Unit 3 Discussion BoardStructured Query Langu.docxCharles WilliamsCS362Unit 3 Discussion BoardStructured Query Langu.docx
Charles WilliamsCS362Unit 3 Discussion BoardStructured Query Langu.docx
 
10 csl57 dbms lab
10 csl57 dbms lab10 csl57 dbms lab
10 csl57 dbms lab
 
Essential Access Exercises week 1-4.pdf
Essential Access Exercises week 1-4.pdfEssential Access Exercises week 1-4.pdf
Essential Access Exercises week 1-4.pdf
 
ADBMS ASSIGNMENT
ADBMS ASSIGNMENTADBMS ASSIGNMENT
ADBMS ASSIGNMENT
 
SQL
SQLSQL
SQL
 
RANDOM TESTS COMBINING MATHEMATICA PACKAGE AND LATEX COMPILER
RANDOM TESTS COMBINING MATHEMATICA PACKAGE AND LATEX COMPILERRANDOM TESTS COMBINING MATHEMATICA PACKAGE AND LATEX COMPILER
RANDOM TESTS COMBINING MATHEMATICA PACKAGE AND LATEX COMPILER
 
SE-IT JAVA LAB SYLLABUS
SE-IT JAVA LAB SYLLABUSSE-IT JAVA LAB SYLLABUS
SE-IT JAVA LAB SYLLABUS
 
Database queries
Database queriesDatabase queries
Database queries
 
Cassandra
CassandraCassandra
Cassandra
 
Structured Query Language for Data Management 2 Sructu.docx
Structured Query Language for Data Management      2 Sructu.docxStructured Query Language for Data Management      2 Sructu.docx
Structured Query Language for Data Management 2 Sructu.docx
 
Unit 5 (1)
Unit 5 (1)Unit 5 (1)
Unit 5 (1)
 

Mehr von ARVIND SARDAR

Machine Learning Chapter one introduction
Machine Learning Chapter one introductionMachine Learning Chapter one introduction
Machine Learning Chapter one introductionARVIND SARDAR
 
Machine Learning Ch 1.ppt
Machine Learning Ch 1.pptMachine Learning Ch 1.ppt
Machine Learning Ch 1.pptARVIND SARDAR
 
Graph ASS DBATU.pptx
Graph ASS DBATU.pptxGraph ASS DBATU.pptx
Graph ASS DBATU.pptxARVIND SARDAR
 
Unit 1-android-and-its-tools-ass
Unit 1-android-and-its-tools-assUnit 1-android-and-its-tools-ass
Unit 1-android-and-its-tools-assARVIND SARDAR
 
Computer foundation course -Knowing Computers
Computer foundation course -Knowing ComputersComputer foundation course -Knowing Computers
Computer foundation course -Knowing ComputersARVIND SARDAR
 
Unit no 5 transation processing DMS 22319
Unit no 5 transation processing DMS 22319Unit no 5 transation processing DMS 22319
Unit no 5 transation processing DMS 22319ARVIND SARDAR
 
Teaching plan d1 dms 2019 20
Teaching plan  d1 dms 2019  20Teaching plan  d1 dms 2019  20
Teaching plan d1 dms 2019 20ARVIND SARDAR
 
Teaching plan d1 dms 2019 20
Teaching plan  d1 dms 2019  20Teaching plan  d1 dms 2019  20
Teaching plan d1 dms 2019 20ARVIND SARDAR
 
Project activity planning
Project activity planningProject activity planning
Project activity planningARVIND SARDAR
 
D2 practical planning dms 2019 20
D2 practical  planning dms 2019 20D2 practical  planning dms 2019 20
D2 practical planning dms 2019 20ARVIND SARDAR
 
D2 practical planning dms 2019 20
D2 practical  planning dms 2019 20D2 practical  planning dms 2019 20
D2 practical planning dms 2019 20ARVIND SARDAR
 
PL /SQL program UNIT 5 DMS 22319
PL /SQL program UNIT 5 DMS 22319PL /SQL program UNIT 5 DMS 22319
PL /SQL program UNIT 5 DMS 22319ARVIND SARDAR
 
Question bank class test ii sep 2019
Question bank class test ii sep 2019Question bank class test ii sep 2019
Question bank class test ii sep 2019ARVIND SARDAR
 
DMS Question bank class test ii sep 2019
DMS Question bank class test ii sep 2019DMS Question bank class test ii sep 2019
DMS Question bank class test ii sep 2019ARVIND SARDAR
 
Rdbms class test ii sep 2019
Rdbms class test  ii sep 2019Rdbms class test  ii sep 2019
Rdbms class test ii sep 2019ARVIND SARDAR
 
Unit 1 dbm questioN BANK 22139
Unit 1 dbm  questioN BANK 22139Unit 1 dbm  questioN BANK 22139
Unit 1 dbm questioN BANK 22139ARVIND SARDAR
 
CO PO MAPPING CO3I DMS 22319
CO PO MAPPING CO3I DMS 22319CO PO MAPPING CO3I DMS 22319
CO PO MAPPING CO3I DMS 22319ARVIND SARDAR
 
CO PO MAPPING CO3I DMS 22319
CO PO MAPPING CO3I DMS 22319CO PO MAPPING CO3I DMS 22319
CO PO MAPPING CO3I DMS 22319ARVIND SARDAR
 

Mehr von ARVIND SARDAR (20)

Machine Learning Chapter one introduction
Machine Learning Chapter one introductionMachine Learning Chapter one introduction
Machine Learning Chapter one introduction
 
Lecture5.pptx
Lecture5.pptxLecture5.pptx
Lecture5.pptx
 
Machine Learning Ch 1.ppt
Machine Learning Ch 1.pptMachine Learning Ch 1.ppt
Machine Learning Ch 1.ppt
 
Graph ASS DBATU.pptx
Graph ASS DBATU.pptxGraph ASS DBATU.pptx
Graph ASS DBATU.pptx
 
graph ASS (1).ppt
graph ASS (1).pptgraph ASS (1).ppt
graph ASS (1).ppt
 
Unit 1-android-and-its-tools-ass
Unit 1-android-and-its-tools-assUnit 1-android-and-its-tools-ass
Unit 1-android-and-its-tools-ass
 
Computer foundation course -Knowing Computers
Computer foundation course -Knowing ComputersComputer foundation course -Knowing Computers
Computer foundation course -Knowing Computers
 
Unit no 5 transation processing DMS 22319
Unit no 5 transation processing DMS 22319Unit no 5 transation processing DMS 22319
Unit no 5 transation processing DMS 22319
 
Teaching plan d1 dms 2019 20
Teaching plan  d1 dms 2019  20Teaching plan  d1 dms 2019  20
Teaching plan d1 dms 2019 20
 
Teaching plan d1 dms 2019 20
Teaching plan  d1 dms 2019  20Teaching plan  d1 dms 2019  20
Teaching plan d1 dms 2019 20
 
Project activity planning
Project activity planningProject activity planning
Project activity planning
 
D2 practical planning dms 2019 20
D2 practical  planning dms 2019 20D2 practical  planning dms 2019 20
D2 practical planning dms 2019 20
 
D2 practical planning dms 2019 20
D2 practical  planning dms 2019 20D2 practical  planning dms 2019 20
D2 practical planning dms 2019 20
 
PL /SQL program UNIT 5 DMS 22319
PL /SQL program UNIT 5 DMS 22319PL /SQL program UNIT 5 DMS 22319
PL /SQL program UNIT 5 DMS 22319
 
Question bank class test ii sep 2019
Question bank class test ii sep 2019Question bank class test ii sep 2019
Question bank class test ii sep 2019
 
DMS Question bank class test ii sep 2019
DMS Question bank class test ii sep 2019DMS Question bank class test ii sep 2019
DMS Question bank class test ii sep 2019
 
Rdbms class test ii sep 2019
Rdbms class test  ii sep 2019Rdbms class test  ii sep 2019
Rdbms class test ii sep 2019
 
Unit 1 dbm questioN BANK 22139
Unit 1 dbm  questioN BANK 22139Unit 1 dbm  questioN BANK 22139
Unit 1 dbm questioN BANK 22139
 
CO PO MAPPING CO3I DMS 22319
CO PO MAPPING CO3I DMS 22319CO PO MAPPING CO3I DMS 22319
CO PO MAPPING CO3I DMS 22319
 
CO PO MAPPING CO3I DMS 22319
CO PO MAPPING CO3I DMS 22319CO PO MAPPING CO3I DMS 22319
CO PO MAPPING CO3I DMS 22319
 

Kürzlich hochgeladen

lifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptxlifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptxsomshekarkn64
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
welding defects observed during the welding
welding defects observed during the weldingwelding defects observed during the welding
welding defects observed during the weldingMuhammadUzairLiaqat
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptMadan Karki
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitterShivangiSharma879191
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm Systemirfanmechengr
 
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgUnit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgsaravananr517913
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - GuideGOPINATHS437943
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catcherssdickerson1
 

Kürzlich hochgeladen (20)

young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
lifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptxlifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptx
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
welding defects observed during the welding
welding defects observed during the weldingwelding defects observed during the welding
welding defects observed during the welding
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.ppt
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm System
 
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgUnit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - Guide
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
 

Micro project project co 3i

  • 1. MICRO PROJECT FOR COMPUTER ENGINEERING 3I 1. CREATE A SIMPLE INFORMATION SYSTEM TO STORE COURSE ENROLLMENT DATA FOR A UNIVERSITY. Requirements:- 2) CREATE A SIMPLE ORACLE DATABASE & PERFORM SOME COMMON DATABASE OPERATIONS. Step 1: Create the tables The schema for the database is as follows: 1. STUDENT (*snum: number, sname: varchar, deptid: number, slevel: varchar, age: number) 2. CLASS (*cname: varchar, meets_at: date, room: varchar, fid: number) 3. ENROLLED (*snum:number, *cname: varchar) 4. FACULTY (*fid: number, fname: varchar, deptid: number) 5. DEPARTMENT (*deptid: number, dname: varchar, location: varchar) The fields marked with '*' are primary key Create all the key and referential integrity constraints necessary to model the application.
  • 2. Step 2:- Insert data into tables DEPARTMENT insert into DEPARTMENT values (1,'Computer Sciences','West Lafayette'); insert into DEPARTMENT values (2,'Management','West Lafayette'); insert into DEPARTMENT values (3,'Medical Education','Purdue Calumet'); insert into DEPARTMENT values (4,'Education','Purdue North Central'); insert into DEPARTMENT values (5,'Pharmacal Sciences','Indianapolis'); STUDENT insert into STUDENT values (0418,'S.Jack',1,'SO',19); insert into STUDENT values (0671,'A.Smith',2,'FR',20); insert into STUDENT values (1234,'T.Banks',3,'SR',18); insert into STUDENT values (3726,'M.Lee',5,'SO',20); insert into STUDENT values (4829,'J.Bale',3,'JR',22); insert into STUDENT values (5765,'L.Lim',1,'SR',19); insert into STUDENT values (0019,'D.Sharon',2,'FR',20); insert into STUDENT values (7357,'G.Johnson',1,'JR',19); insert into STUDENT values (8016,'E.Cho',5,'JR',22); FACULTY insert into FACULTY values (101,'S.Layton',1); insert into FACULTY values (102,'B.Jungles',2); insert into FACULTY values (103,'N.Guzaldo',5); insert into FACULTY values (104,'S.Boling',4); insert into FACULTY values (105,'G.Mason',1); insert into FACULTY values (106,'S.Zwink',2); insert into FACULTY values (107,'Y.Walton',5); insert into FACULTY values (108,'I.Teach',5); insert into FACULTY values (109,'C.Jason',5); CLASS insert into CLASS values ('ENG400',to_date('08:30','HH:MI'),'U003',104); insert into CLASS values ('ENG320', to_date('09:30','HH:MI'),'R128',104); insert into CLASS values ('COM100', to_date('11:30','HH:MI'),'L108',104); insert into CLASS values ('ME308', to_date('10:30','HH:MI'),'R128',102); insert into CLASS values ('CS448', to_date('09:30','HH:MI'),'R128',101); insert into CLASS values ('HIS210', to_date('01:30','HH:MI'),'L108',104); insert into CLASS values ('MATH275', to_date('02:30','HH:MI'),'L108',105);
  • 3. insert into CLASS values ('STAT110', to_date('04:30','HH:MI'),'R128',105); insert into CLASS values ('PHYS100', to_date('04:30','HH:MI'),'U003',101); ENROLLED insert into ENROLLED values (0418,'CS448'); insert into ENROLLED values (0418,'MATH275'); insert into ENROLLED values (1234,'ENG400'); insert into ENROLLED values (8016,'ENG400'); insert into ENROLLED values (8016,'ENG320'); insert into ENROLLED values (8016,'HIS210'); insert into ENROLLED values (8016,'STAT110'); insert into ENROLLED values (0418,'STAT110'); insert into ENROLLED values (1234,'COM100'); insert into ENROLLED values (0671,'ENG400'); insert into ENROLLED values (1234,'HIS210'); insert into ENROLLED values (5765,'PHYS100'); insert into ENROLLED values (5765,'ENG320'); Step 3: Query your database Write SQL queries and run them on the Oracle system. 1. For each department, print the department id, department name and number of faculty affiliated with that department. Print 0 as the number of faculty if a department has no faculty. 2. Print the faculty id, name and department id of the faculty teaching the maximum number of classes 3. Print the name, department id and age of the student enrolled in the maximum number of classes taught by faculty affiliated with the Computer Sciences department (i.e. dname is Computer Sciences) 4. Print the name and department id of the student(s) who take classes in all rooms that a class is taught OR are younger than 20. 5. Print the ids (snum) of the students who have more than 3 (distinct) classmates in total. 6. Print the names of (distinct) faculty who teach 2 or more classes in the same room 7. For each department except Management (i.e. dname = Management), print the department id and the average age of students in that department. If a department has no students, print 0 for the average age. 8. Print the department id, name and age of the youngest student not enrolled in any classes 9. Print the ids (snum) of the students majoring in a department whose faculty do not teach any classes 10. What is the name of the faculty teaching the class with the greatest number of students enrolled? What is the number of students in that class?
  • 4. Step 4: Views Create two views (Name them VIEWA and VIEWB) and print their contents. A. A view that shows the faculty name followed by the number of classes taught by that faculty, ordered by faculty name. Print 0 if the number of classes is 0. B. A view that shows the names of people (students and faculty) that are expected to be present in a room each time that a relevant class is taught there. This should be one view with both faculty and student names. A student enrolled in a class is "expected" to be present for each session of the class, and a faculty member teaching a class is "expected" to be present for each session of the class. Hence, the view should contain three fields: name, room, and time. 3) Use PL/SQL (Oracle's procedural extension to SQL) to write a few functions and procedures to process data. Step1 : PL/SQL Create a file named procedures.sql. The first line of this file should be: set serveroutput on size 32000 Note: - Create and run five procedures: pro_department_report, pro_student_stats, pro_faculty_stats, 1) pro_department_report: Generate a report that lists, for each department, the students in that department. For each department, you should first print the department name on a line followed by the number of students in that department on the next line and a numbered list of student names in that department. The output should be modeled as follows: Sort by the department name (ascending and sort by student name (ascending) for each department. Sample output: Department: Computer Sciences Total number of students: 3 ------------- 1. Alice 2. Bob 3. Joe Department 2) pro_student_stats: Generate a report that contains statistics about students. Print out the number of classes that each student is taking; omit students taking no classes. Sort by student name. Sample output: Student Name # Classes --------------- ----------
  • 5. Bob 3 Joe 2 3) pro_faculty_stats: Generate a report about the total number of students each faculty teaches. Sort results by faculty name. The number of students for each faculty.