Skip to main content

MySQL - ASSIGNMENT | 10th March 25

 

MySQL

DATABASE QUESTIONS

GRADE XII

1.     What is a database? Name any two RDBMS softwares.

2.     Discuss features of SQL.

3.     Differentiate between ALTER and UPDATE statements.

4.     Elucidate the terms degree and cardinality of a relation.

5.     Answer the following questions on the basis of the given table:

Admno            Name              Subject           Gender            Average

1001                Amit                Math                M                     85.5

1002                Suman             English            F                      90

a)     How many attributes are there in above table?

b)    How many tuples are there in above table?

c)     What is the degree and cardinality of above table?

6.     Out of the following in ‘Employee’ table, which field is a primary key and why?

a)     Emp_id                                 c) emp_name

b)    Emp_salary                           d) emp_designation

7.     What is the difference between Char and Varchar?

8.     Write the command to create the following table: “STUDENT”.

Field Name                Data Type                   Constraint

Rollno                         Integer(5)                    Primary Key

Sname                         Varchar(30)

Contactno                   Char(10)                      Not Null

 

9.     Write the query to insert the following record in the above created table.

Rollno                         Sname                         Contactno

1                                  Amit                            1234567890

2                                                                      1231231234

10.  Consider a table EMPLOYEE with the following data and answer the SQL queries:

Eno                 Ename                        Salary             Age                 Gender           DOJ

1                      Ankit Singh                 60000              35                    F                      08-03-2007

2                      Ravi Raj                      50000              32                    M                     19-07-2009

3                      Udit Narayan              40000              32                    M                     03-01-2010

 

a)     Create a database OFFICE.

b)    Use the database OFFICE.

c)     Create a table EMPLOYEE and insert tuples in it.

d)    Display the details of all the EMPLOYEES.

 


Comments

Popular posts from this blog

CS - SORTING/SEARCHING ALGORITHMS

  SORTING ALGORITHMS                       SORTING ALGORITHM PDF LINK #Bubble Sort          ·        The outer loop iterates through the entire array. ·        The inner loop compares adjacent elements and swaps them if they are out of order. ·        The outer loop runs n times, and each pass moves the largest element to its correct position. arr=[3,8,5,2,1] n = len(arr) print(n) for i in range(n):  #traverse through all the elements         # Last i elements are already sorted, no need to check them         for j in range(0, n-i-1):              # Swap if the element found is greater than the next element              if arr[j] > arr[j+1]:               ...

GRADE XI - NESTED FOR LOOP

                                                         NESTED FOR LOOP 1. for var1 in range(3):      print(var1,"OUTER LOOP")          # 0 outer loop       1 outer loop      2 outer loop          for var2 in range(2):                  print(var2+1,"INNER LOOP")    #1  2 inner loop     1  2  inner loop   1 2 inner loop  2. Print the following pattern using for loop: 1  1 2  1 2 3  1 2 3 4  Sol: for r in range(1,5):   #ROWS     for c in range(1,r+1):   #COLUMNS         print(c,end=" ")     print() 3. Print the following pattern using for loop: @  @ @  @ @ @...

LIST IN PYTHON - 14TH AUG

  LIST IN PYTHON BEGINNERS PRACTICE QUESTIONS 1. Creating List by accepting data from user List1=[] #Empty list n=int(input("Enter number of elements"))    i=0 while i < n:     num= int(input("Enter element " + str(i) + ": "))     List1+=[num]       i+=1 print(List1) OR #Creating List by accepting data from user List1=[ ] n=int(input("Enter number of elements"))   i=0 while i < n:     List1+=[int(input("Enter the element"))]       i+=1     print(List1) 2.Write a program to input the size and the list of elements from user. Count the number of elements  which are divisible by 5 list1= [ ] s =int (input("Enter no of elements")) for i in range(s):     list1 += [int (input("Enter the Elements"))] count=0 for num in list1:         if num % 5 ==0:             count = count+1 print("No. of elements divisible by 5--",c...