0
   

how to embed mysql in shell script linux?? Please somebody help me answering the following question?

 
 
harzyne
 
Reply Fri 16 May, 2014 04:32 am
Part Two

Write a shell script to do these things.

1) Create a table called "students" in the database "school" where students has fields (reg_id, subject, marks) .Select the proper data types and lengths. Note: if there exist a students table drop it first.
2) Generate and insert records to the table according to the following criteria.
a. Student reg_id should be like "idx". "x" should be start from 1. Ex: id1, id2..... id138
b. Every student should have marks only for 8 subjects. (Optional subjects : Art, Computer, literature)
c. The maximum number of records should be able to change using a parameter.
d. The subject marks can be vary from 0 to 100.

Part Three

Write another shell script to get these outcomes.

1) Student's reg_id who took highest total marks.
2) Students' reg_ids who took highest for subject vice.
3) List of teachers who are doing the subject, to which more than or equal 5 students got more than 90 marks.
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Question • Score: 0 • Views: 759 • Replies: 0
No top replies

 
 

Related Topics

 
  1. Forums
  2. » how to embed mysql in shell script linux?? Please somebody help me answering the following question?
Copyright © 2022 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 08/12/2022 at 03:58:29