Follow me on Linkedin

OOAD Mid Sem Question Paper - All Departments



                            SASTRA UNIVERSITY OOAD MID SEM QUESTION PAPER



                        SRC SASTRA -  Kumbakonam CAMPUS - CSE Department
                     
                                                     First ( 1st ) CIA


SRC SASTRA -  Kumbakonam CAMPUS - CSE Department

Second ( 2nd ) CIA



SRC SASTRA -  Kumbakonam CAMPUS - CSE Department

Third ( 3rd ) CIA





                                          SASTRA UNIVERSITY MAIN CAMPUS - CSE Department
                 
                                                     First ( 1st ) Mid Sem 



SASTRA UNIVERSITY MAIN CAMPUS - CSE Department

Second ( 2nd ) Mid Sem


                           SASTRA UNIVERSITY MAIN CAMPUS - IT Department
                        
                                                     First ( 1st ) Mid Sem 



SASTRA UNIVERSITY MAIN CAMPUS - IT Department

Second ( 2nd ) Mid Sem


SASTRA UNIVERSITY MAIN CAMPUS - IT Department

Third ( 3rd ) Mid Sem


Tag : ooad important questions, OOAD Question papers, SASTRA university OOAD Question papers, sastra university previous year questions, object oriented analysis and design , sastra IT ooad syllabus , sastra CSE ooad syllabus. sastra OOAD e  book


Engineering Mathematics II Question Paper


                        
             Sastra University .. Engineering Mathematics II Question Paper

                                   
                                         May 2007








May 2009 (Arrear Paper)




May 2009 (Common to All Department)







Tags :  sastra maths 2 questions, sastra question paper, sastra university, sastra university previous year questions, SASTRA University Semester Question Paper, sastra mathematics 4 question paper , sastra mathematics 2 question paper , sastra maths question paper , sastra maths question bank , anna university maths 2 question paper , anna university maths II question paper


Programming in C++ 2 marks



Sastra University ... Programming in C++ .. Important 2 marks..












Tags :  sastra important question, sastra question paper, sastra university important 2 marks, sastra university previous year questions, Sastra university question papers, sastra university C++ 2 marks , sastra university CPP 2 marks , 2marks , CPP question paper , sastra university C++ question paper , anna university C++ question paper , anna university C++ / CPP 2marks 2 marks , anna university C++

Basic Civil Question Paper






Tags : sastra basic civil question paper, sastra university previous year questions, Sastra university question papers, SASTRA University Semester Question Paper, anna university basic civil question paper , anna university basic civil engineering , sastra university first year question paper , anna university first year question paper , semester question paper 

JAVA - JDBC 2 marks and 15 Marks




                                      PART – A

1. What is DBMS.?
          DBMS (DataBase Management System) is a software or program used to create or manage any database.

2.  What is a database?
          A Database is an organized collection of data.


3. What does record and field represent?
          * Rows in a table represent Records.
          * Columns in a table represent Fields.



4. What is SQL ?
          SQL is a standard language for managing any kinds of database
        Example Operations: Create a database or table .

5. Mention the major two types of SQL Commands.

          * Data Definition Language:
                   CREATE, ALTER, DROP – a table or database.

          * Data Manipulation Language:
                   SELECT, INSERT INTO, DELETE, UPDATE

6.  What is JDBC?
          JDBC (Java DataBase Connectivity) is an API used to connect Java applications to a database and then query or update it, using the SQL.

7. Draw the architecture for JDBC connection to database.

                  
8. List the four types of JDBC drivers.
          Type 1: JDBC / ODBC Bridge.
          Type 2: Native – API Driver.
          Type 3: Network Protocol Driver – Middle Ware Driver.
          Type 4: Native Protocol Driver – Pure JAVA Driver.

9. Difference between two tier and three tier database architecture.

    Two Tier Architecture


      Three Tier Architecture
* In a two-tier model, a Java application/applet communicates directly with the database, via the JDBC driver.
* In a three-tier model, a Java application communicates with a middle tier component that functions as an application server.

** DIAGRAM IS GIVEN BELOW **

** DIAGRAM IS GIVEN BELOW **




Two Tier Architecture :

     
Three Tier Architecture :

    

10. What is the ultimate goal of JDBC?
·         Programmers can write applications in the Java programming language to access any database, using SQL statements.
·         Database vendors can supply the low-level drivers. Thus, they can optimize their drivers for their specific products.

11. Write the simple SQL statement for creating a table.
       
               CREATE TABLE it_b_section
              (
                    name VARCHAR(60),
                    reg_no VARCHAR(13),
                    cgpa INT(6)
              )

          Points to remember :
          * Inside brackets() , set length of the field.
          * it_b_section is the TABLE NAME.

12. Write all the data types of SQL.

13. Write a simple SQL statement to display all the data in a table.

                           SELECT * FROM it_b_section

14. Write a simple SQL statement to display the details of students whose  JAVA internal is above 40.

                   SELECT * FROM it_b_section WHERE java_marks > 40

15. Write a simple SQL statement to insert values into a table.

      INSERT INTO it VALUES (‘Aslam Jainul’, ‘115015048’ , ‘ ’)

16. “Your facebook password is weak. Now you are going to change your password”. Write a SQL statement for the above problem.

          UPDATE login SET password=”aeiou12345!@#$%” WHERE                                                                         mail=”mjainulaslam@gmail.com


       Here login is the table name and mail and password are attributes.
____________________________________________________

For the above questions (13,14,15,16) , the question is only to write a SQL statement.

                             EASY TO REMEMBER  

 INSERT INTO
 VALUES
UPDATE
  SET

_______________________________________________________

17. Write a Statement for loading and registering JDBC ODBC driver.
                   
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

18. Write a Statement for creating connection to database. 
             
  Connection con=DriverManager.getConnection("jdbc:odbc:sastra","","");

     Parameters Involved: 
                    1.Database Url 
                    2.DB username
                    3.DB Password.

19. Explain about database URL for creating connection to database  
          The general syntax is
                   jdbc : subprotocol : other stuff
          
               Example : jdbc:odbc:sastra
        where
             subprotocol - specific driver for connecting to the database.
             stuff - depends on the subprotocol used.

20. Write a program for read a properties file and opening the database connection.

      Properties props = new Properties();

      FileInputStream in = new FileInputStream("database.properties");

      props.load(in);

      in.close();



      String drivers = props.getProperty("jdbc.drivers");



      if (drivers != null) 
       
              System.setProperty("jdbc.drivers", drivers);

     String url = props.getProperty("jdbc.url");
     String username = props.getProperty("jdbc.username");
     String password = props.getProperty("jdbc.password");

      return DriverManager.getConnection(url, username, password);

 
21. Write any three methods involved in connection to a database.

·getConnection() - establishes a connection to the given database and returns a Connection object. 

· createStatement()- creates a Statement object that can be used to execute SQL queries and updates without parameters.

· executeQuery()- executes the SQL statement given in the string and returns a ResultSet object to view the query result


22. Write a Program to display the cgpa, name, reg from the database.

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:sast
Statement st = con.createStatement();
ResultSet rs = st.executeQuery("SELECT * FROM stu1");
while(rs.next()==true)
{
System.out.print(rs.getString("cgpa"));
System.out.print("\t"+rs.getString(2));
System.out.println("\t"+rs.getString(3));
}
st.close();
con.close();


23. Write a SQL statement to join the two tables. Both contain one same attributes (reg_no).


        SELECT * FROM it_b_section , it_department
        WHERE reg_no = “115015048”

  24. Write a SQL statement to display the student details according to cgpa from highest to lowest.

        SELECT * FROM it_b_section
        ORDER BY cgpa DESC

25. Describe the mapping type of JDBC - JAVA.


     26. Write a Program to explain Scrollable Result Set.


 Statement stmt =       con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY); 



String query = “select students from class where type=‘not sleeping’ “; 



ResultSet rs = stmt.executeQuery( query ); 


rs.previous(); 

rs.relative(-5); / / go 5 records back 

rs.relative(7); / / go 7 records forward 

rs.absolute(100); / / go to 100th record


27. Write a Program to explain Updateable Resultset.

createStatement
(ResultSet.TYPE_FORWARD_ONLY,ResultSet.CONCUR_UPDATABLE);
while ( rs.next() )

{
     int grade = rs.getInt(“grade”);
     rs.updateInt(“grade”, grade+10);
      rs.updateRow();
}


28. Write a Program to illustrate MetaData from DB.

Connection con = …. ; 
DatabaseMetaData dbmd = con.getMetaData(); 
   String catalog = null; 
   String schema = null; 
   String table = “sys%”; 
   String[ ] types = null; 
ResultSet rs = dbmd.getTables(catalog , schema , table , types );


29. Write a Program to illustrate MetaData from RS.

                public static void printRS(ResultSet rs) throws SQLException
                { 

                             ResultSetMetaData md = rs.getMetaData(); 
                       

                    // get number of columns                     int nCols = md.getColumnCount(); 

                      // print column names 

                     for(int i=1; i < nCols; ++i) 

                      System.out.print( md.getColumnName( i)+",");

                  / / output resultset

                   while ( rs.next() )

                    {
                                     for(int i=1; i < nCols; ++i)

                                     System.out.print( rs.getString( i)+",");

                                     System.out.println( rs.getString(nCols) );

                      }

          }

                            PART – B

1. Explain the four types of JDBC Drivers.
2. Explain the JDBC installation Process.
3. Write a program for Scrollable and Updateable ResultSet.
4. Write a simple program for JDBC connection. Explain It.
5. Write a program to create a database on ORACLE database.
6. Write a program to execute any 5 Queries.
7. Explain Structured Query Language. Explain with SQL Statements.

________________________________________________________________________________

  Tags : java, java important 2 marks, jdbc, jdbc 2 marks, sastra java, sastra java question paper, sastra university, java jdbc , jdbc driver , anna university java syllabus , sastra university java syllabus , sastra university java question papers , anna university java question papers , 

Unit 4 - Two Dimensional Heat Equation







Tags : anna university mathematics, anna university mathematics 4, anna university question paper, google, sastra mathematics, sastra mathematics 4, sastra Soc question papers, anna university maths question bank , sastra university question bank , sastra university maths question bank , 2 marks and 15 marks , question bank..


SASTRA University Previous Year C++ Question Paper

           
                          SASTRA University Previous Year C++ Question Paper








  Tags : new way of engineering, sastra first year C++ question paper, sastra university previous year questions, Sastra university question papers, SASTRA University Semester Question Paper, anna university previous year question paper , anna university semester question papers , anna university C++ question papers , anna university cse question papers

SASTRA University Previous Year ED Question Paper








Tags :  new way of engineering, sastra ed question papers, sastra university, sastra university previous year questions, Sastra university question papers, SASTRA University Semester Question Paper, engineering drawing question papers , anna university engineering drawing question papers , ssn engineering drawing question papers , ED question papers

PROGRAM FOR TRAFFIC LIGHT CONTROLLER




 TRAFFIC LIGHT CONTROLLER Basics  :

Port A – E800 / E804

EAST
RED
EAST
AMBER
EAST
RIGHT
EAST
LEFT
SOUTH
RED
SOUTH
AMBER
SOUTH
RIGHT
SOUTH
LEFT

Port B – E801/ E805

WEST
RED
WEST
AMBER
WEST
RIGHT
WEST
LEFT
NORTH
RED
NORTH
AMBER
NORTH
RIGHT
NORTH
LEFT


Port C – E802 / E806
EAST
PEDESTRIAN
SOUTH
PEDESTRIAN
WEST
PEDESTRIAN
NORTH
PEDESTRIAN
SOUTH
STRAIGHT
EAST
STRAIGHT
NORTH
STRAIGHT
WEST
STRAIGHT

Pedestrian LED – 1 –RED                                                       Other LEDs      1 – GLOW
                              0 – GREEN                                                                        2 - OFF

MOV DPTR,#E803
MOV A,#80
MOVX @DPTR,A
RPT:    MOV DPTR,#0000
NXT:   MOVX A,@DPTR
PUSH 83
PUSH 82
MOV DPTR,#E800
MOVX @DPTR,A
POP 82
POP 83
INC DPTR
MOVX A,@DPTR
PUSH 83
PUSH 82
MOV DPTR,#E801
MOVX @DPTR,A
POP 82
POP 83
INC DPTR
MOVX A,@DPTR
PUSH 83
PUSH 82
MOV DPTR,#E802
MOVX @DPTR,A
POP 82
POP 83
LCALL DELAY
INC DPTR
MOV A,82
CJNE #06,NXT (06 – if number of data byte is six)
SJMP RPT

DELAY:    MOV R0,#06
MOV R1,#FF
MOV R2,#FF
DJNZ R2,L1
DJNZ R1,L2
DJNZ R0,L3
RET





Tag : micro controller, micro controller lab, traffic controller code, traffic signal, 

a