Skip to main content

ads1

Class 11th Chapter :- 10 Working with table


 Class 11th Chapter :- 10 Working with table

Primary key
The table which contains primary key is known as master table.

Foreign key
It can be defined as field or combination of fields whose values are borrowed from another table. Foreign key field cannot contain a value that does not exist in its related primary key field.

Conceptually there can be three major types of relationship between any tables of the database.
• One to One
• One to Many
Many to Many

Base has very important and interesting feature called Field Properties. Field properties determine how the values in the field are stored and displayed.

Default value: Many times it may happen, that we want to store some predefined default value automatically in a particular field at the time of entering a new record in the table.

 Choose the most appropriate option from those given below :

(1) Which of the following operations cannot be performed on a record in database?
(a) Insert
(b) Delete
(c) Hide
(d) Update

(2) Which of the following represents maximum levels of sorting provided by Base
Wizard?

(a) 3
(b) 4
(c) 5
(d) 6

(3) Which of the following refers to data redundancy?
(a) Deletion of data
(b) Repetition of data
(c) Decomposition of tables
(d) Relationships of tables

(4) Given a relation, Teacher Subject (Tcode, Scode, Standard), which of the following
fields can be an appropriate foreign key field?

(a) Tcode
(b) Scode
(c) Tcode,Standard
(d) Tcode, Scode

(5) Which of the following statement is incorrect?
(a) Every table must have a primary key.
(b) Primary key can be combination of fields.
(c) Data type of Primary key and Foreign key should be same.
(d) Names of Primary key and Foreign key should be same.

(6) Which of the following type of relationship exists between Student and Teacher in
a school?

(a) One to One
(b) One to Many
(c) Many to Many
(d) No relationship exists

(7) Which of the following type of relationship exists between Student and Class Teacher
in a school?

(a) One to One
(b) One to Many
(c) Many to Many
(d) No relationship exists

(8) Which of the following options are possible to implement referential integrity?
(a) No Action
(b) Set Null
(c) Delete table
(d) Update Cascade

(9) Auto Value property can be set for field with which of the following datatype?

(a) Text
(b) Image
(c) Integer
(d) Boolean
 
(10) Which of the following statement is true for Default field property in Base?
(a) Default value can be numeric value only.
(b) Default value once set can be changed later.
(c) Default value cannot be greater than 500.
(d) Default value should be greater than value set in Length.

(11) Which of the following property is equivalent to NOT NULL?
(a) Length
(b) Default
(c) Required
(d) Format 

Link to Download MCQ :-








ads2

Popular posts from this blog

11. Write a Java program to input basic salary of an employee and calculate its Gross salary according to following:

    11. Write a Java program to input basic salary of an employee and calculate its Gross salary according to following: Basic Salary <= 10000 : HRA = 20%, DA = 80% Basic Salary <= 20000 : HRA = 25%, DA = 90% Basic Salary > 20000 : HRA = 30%, DA = 95% Static Solution :-  class salary {     public static void main(String args[])     {     double basic=20000.50,gross,da,hra;     if(basic <=10000)     {         da = basic * 0.8;         hra = basic *0.2;     }              else if(basic <=20000)     {         da = basic * 0.9;         hra = basic *0.25;     }     else     {         da = basic * 0.95;         hra = basic * 0.3;     }     gross = basic + da + hra;     System.out.println("The Gross Salary is :-"+gross);     } } Output :-  Dynamic Solution :-  class salary {     public static void main(String args[])     {     double basic=20000.50,gross,da,hra;     Scanner in = new Scanner(System.in);     System.out.println("Enter the Basic Salary

1. Given the school result data, analyses the performance of the students on #different parameters, e.g subject wise or class wise.

1. Given the school result data, analyses the performance of the students on #different parameters, e.g subject wise  or class wise. Solution :-   # x-axis is shows the subject and y -axis # shows the markers in each subject # import pandas and matplotlib  import pandas as pd  import matplotlib.pyplot as plt # Simple Line Chart with setting of Label of X and Y axis, # title for chart line and color of line  subject = ['Physic','Chemistry','Mathematics', 'Biology','Computer'] marks =[80,75,70,78,82] # To draw line in red colour plt.plot(subject,marks,'r',marker ='*')     # To Write Title of the Line Chart plt.title('Marks Scored') # To Put Label At Y Axis plt.xlabel('SUBJECT')           # To Put Label At X Axis plt.ylabel('MARKS')             plt.show() Output :- 

24.Create a Data Frame quarterly sales where each row contains the item category, item name, and expenditure. Group the rows by the category and print the total expenditure per category.

24.Create a Data Frame quarterly sales where each row contains the item category, item name, and expenditure. Group the rows by the category and print the total expenditure per category. import pandas as pd  # initialize list of lists data = [['CAR','Maruti',1000000],['AC','Hitachi',55000],['AIRCOLLER','Bajaj',12000], ['WASHING MACHINE','LG',15000],['CAR','Ford',7000000],['AC','SAMSUNG',45000],['AIRCOLLER','Symphony',20000],['WASHING MACHINE','Wirlpool',25000]] Col=['itemcat','itemname','expenditure'] # Create the pandas DataFrame qrtsales = pd.DataFrame(data,columns=Col) # print dataframe.  print (qrtsales) qs=qrtsales.groupby('itemcat')  print('Result after Filtering Dataframe')  print(qs['itemcat','expenditure'].sum()) Output :-