EX: NO: 1 STUDY OF BASIC SQL COMMANDS(DDL) DATE: SQL COMMANDS 1. COMMAND NAME: CREATE COMMAND DESCRIPTION: CREATE command is used to create objects in database. 2. COMMAND NAME: INSERT COMMAND DESCRIPTION: INSERT command is used to insert the values to the table. 3. COMMAND NAME: SELECT COMMAND DESCRIPTION: SELECT command is used to display the table & table values. 4. COMMAND NAME: ALTER COMMAND DESCRIPTION: ALTER command is used to alter the structure of database. 5. COMMAND NAME: DROP COMMAND DESCRIPTION: DROP command is used to delete the object from database. 6. COMMAND NAME: TRUNCATE 1
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
EX: NO: 1 STUDY OF BASIC SQL COMMANDS(DDL)
DATE:
SQL COMMANDS
1. COMMAND NAME: CREATE
COMMAND DESCRIPTION: CREATE command is used to create objects in database.
2. COMMAND NAME: INSERT
COMMAND DESCRIPTION: INSERT command is used to insert the values to the table.
3. COMMAND NAME: SELECT
COMMAND DESCRIPTION: SELECT command is used to display the table & table values.
4. COMMAND NAME: ALTER
COMMAND DESCRIPTION: ALTER command is used to alter the structure of database.
5. COMMAND NAME: DROP
COMMAND DESCRIPTION: DROP command is used to delete the object from database.
6. COMMAND NAME: TRUNCATE
COMMAND DESCRIPTION: TRUNCATE command is used to remove all the records in
the table including the space allocated for the table.
7. COMMAND NAME: COMMENT
COMMAND DESCRIPTION: COMMENT command is used to add the comments to the table.
8. COMMAND NAME: RENAME
COMMAND DESCRIPTION: RENAME command is used to rename the objects.
9. COMMAND NAME: UPDATE
COMMAND DESCRIPTION: UPDATE command is used to update the values
1
10. COMMAND NAME: DELETE
COMMAND DESCRIPTION: DELETE command is used to delete the constraint from the table
11. COMMAND NAME: GRANT
COMMAND DESCRIPTION: GRANT command is used to give user’s access privilege to
database.
12. COMMAND NAME: REVOKE
COMMAND DESCRIPTION: REVOKE command is used to withdraw access privilege given with
the grant.
TYPES OF COMMANDS
DDL (DATA DEFINITION LANGUAGE)
CREATE
ALTER
DROP
TRUNCATE
COMMENT
RENAME
DML (DATA MANIPULATION LANGUAGE)
SELECT
INSERT
UPDATE
DELETE
DCL (DATA CONTROL LANGUAGE)
GRANT
REVOKE
2
3
COMMANDS EXECUTION
CREATION OF TABLE WITHOUT PRIMARY KEY-------------------------------------------------------------------
DROPPING PRIMARY KEY USING ALTER COMMAND -------------------------------------------------------------------------SQL> alter table employee1 drop primary key;
Table altered.
SQL> desc employee1; Name Null? Type -------------------------- ------ --------- EMPLOYEE_NAME VARCHAR2(10) EMPLOYEE_NO NUMBER(8) DEPT_NAME VARCHAR2(10) DEPT_NO NUMBER(5) DATE_OF_JOIN DATE
6
CREATING PRIMARY KEY USING ALTER COMMAND -------------------------------------------------------------------------
SQL> alter table employee1 add primary key (employee_no);
Table altered.
SQL> desc employee1; Name Null? Type ------------------------------- -------------- -------------------------- EMPLOYEE_NAME VARCHAR2(10) EMPLOYEE_NO NOT NULL NUMBER(8) DEPT_NAME VARCHAR2(10) DEPT_NO NUMBER(5) DATE_OF_JOIN DATE
SQL> alter table employee add primary key (employee_no);
Table altered.
SQL> desc employee; Name Null? Type --------------------------------- ------------------- --------------- EMPLOYEE_NAME VARCHAR2(10) EMPLOYEE_NO NOT NULL NUMBER(8) DEPT_NAME VARCHAR2(10) DEPT_NO NUMBER(5) DATE_OF_JOIN DATE
CREATING FORIEGN KEY USING ALTER COMMAND ----------------------------------------------------------------------------
Note : For creation of foreign key, both the table should possess primary key with same attributes.Similarly for dropping employee 1 as well as employee table ,first the relationship i.e., primary key has to be removed from both the tables.
MODIFYING THE CHARACTERISTIC OF CONSTRAINTS IN A TABLE ----------------------------------------------------------------------------------------------
Note: Before modifying the character of a column,first set the column values to null.The feature of a column can be altered only if all its values become null or empty.
SQL> update employee1 set salary = ''where employee_no=100;
1 row updated.
SQL> update employee1 set salary = ''where employee_no=128;
1 row updated.
SQL> update employee1 set salary =''where employee_no=98;
DESCRIPTION OF TABLE ----------------------------------
16
SQL> desc employee1; Name Null? Type ------------------------- ------- ------- EMPLOYEE_NAME VARCHAR2(10) EMPLOYEE_NO NOT NULL NUMBER DEPT_NO NUMBER DEPT_NAME VARCHAR2(10)
SQL> desc employee; Name Null? Type --------------------- -------- ------------ EMPLOYEE_NAME VARCHAR2(10) EMPLOYEE_NO NOT NULL NUMBER DEPT_NO NUMBER DEPT_NAME VARCHAR2(10)
SELECTION OF TABLE VALUES--------------------------------------------SQL> select * from employee;
SQL> desc employee; Name Null? Type --------------------- -------- ------------ EMPLOYEE_NAME VARCHAR2(10) EMPLOYEE_NO NOT NULL NUMBER DEPT_NO NUMBER DEPT_NAME VARCHAR2(10)
SELECTION OF TABLE VALUES--------------------------------------------
SQL> desc sailor; Name Null? Type ----------------------------------------- -------- ---------------------------- SID NOT NULL NUMBER(4) SNAME CHAR(15) RATING NUMBER(4) AGE NUMBER(2)
SQL> insert into sailor values(&sid,'&sname',&rating,&age);Enter value for sid: 11Enter value for sname: johnEnter value for rating: 8Enter value for age: 21old 1: insert into sailor values(&sid,'&sname',&rating,&age)new 1: insert into sailor values(11,'john',8,21)
1 row created.
SQL> /Enter value for sid: 12Enter value for sname: lubberEnter value for rating: 9Enter value for age: 21old 1: insert into sailor values(&sid,'&sname',&rating,&age)new 1: insert into sailor values(12,'lubber',9,21)
1 row created.
SQL> /Enter value for sid: 13Enter value for sname: davidEnter value for rating: 7Enter value for age: 22old 1: insert into sailor values(&sid,'&sname',&rating,&age)new 1: insert into sailor values(13,'david',7,22)
1 row created.
SQL> select * from sailor;
26
SID SNAME RATING AGE---------- --------------- ---------- ---------- 11 john 8 21 12 lubber 9 21 13 david 7 22
Table created.SQL> desc boat; Name Null? Type ----------------------------------------- -------- ---------------------------- BID NOT NULL NUMBER(4) BNAME CHAR(15) COLOR CHAR(6)
SQL> insert into boat values(&bid,'&bname','&color');Enter value for bid: 102Enter value for bname: a2Enter value for color: redold 1: insert into boat values(&bid,'&bname','&color')new 1: insert into boat values(102,'a2','red')
1 row created.
SQL> /Enter value for bid: 101Enter value for bname: a2Enter value for color: blueold 1: insert into boat values(&bid,'&bname','&color')new 1: insert into boat values(101,'a2','blue')
1 row created.
SQL> /Enter value for bid: 103Enter value for bname: a3Enter value for color: greenold 1: insert into boat values(&bid,'&bname','&color')new 1: insert into boat values(103,'a3','green')
1 row created.
SQL> select * from boat;
27
BID BNAME COLOR---------- --------------- ------ 102 a2 red 101 a2 blue 103 a3 green
SQL> desc reserve; Name Null? Type ----------------------------------------- -------- ---------------------------- SID NOT NULL NUMBER(4) BID NOT NULL NUMBER(4) DAY DATE
SQL> insert into reserve values(&sid,&bid,'&day');Enter value for sid: 11Enter value for bid: 101Enter value for day: 11-aug-09old 1: insert into reserve values(&sid,&bid,'&day')new 1: insert into reserve values(11,101,'11-aug-09')
1 row created.
SQL> /Enter value for sid: 12Enter value for bid: 102Enter value for day: 15-sep-09old 1: insert into reserve values(&sid,&bid,'&day')new 1: insert into reserve values(12,102,'15-sep-09')
----------------------------------------- -------- ---------------------------- BID NOT NULL NUMBER(4) BNAME CHAR(15) COLOR CHAR(6)
SQL> insert into boat values(&bid,'&bname','&color');Enter value for bid: 102Enter value for bname: a2Enter value for color: redold 1: insert into boat values(&bid,'&bname','&color')new 1: insert into boat values(102,'a2','red')
1 row created.
SQL> /Enter value for bid: 101Enter value for bname: a2Enter value for color: blueold 1: insert into boat values(&bid,'&bname','&color')new 1: insert into boat values(101,'a2','blue')
1 row created.
SQL> /Enter value for bid: 103Enter value for bname: a3Enter value for color: greenold 1: insert into boat values(&bid,'&bname','&color')new 1: insert into boat values(103,'a3','green')
1 row created.
SQL> select * from boat;
BID BNAME COLOR---------- --------------- ------ 102 a2 red 101 a2 blue 103 a3 green
Name Null? Type ----------------------------------------- -------- ---------------------------- SID NOT NULL NUMBER(4) BID NOT NULL NUMBER(4) DAY DATE
SQL> insert into reserve values(&sid,&bid,'&day');Enter value for sid: 11Enter value for bid: 101Enter value for day: 11-aug-09old 1: insert into reserve values(&sid,&bid,'&day')new 1: insert into reserve values(11,101,'11-aug-09')
1 row created.
SQL> /Enter value for sid: 12Enter value for bid: 102Enter value for day: 15-sep-09old 1: insert into reserve values(&sid,&bid,'&day')new 1: insert into reserve values(12,102,'15-sep-09')
SQL> declaree_no number(6);e_name varchar2(25);net_salary number(8,2);cursor cur_salary is select emp_no,emp_name,basic+da_percent*basic/100+ma+other_allowance-deduction from sal;begindbms_output.put_line('emp no '||' Name '||' Net salary');dbms_output.put_line('--------------------'); open cur_salary;loopfetch cur_salary into e_no,e_name,net_salary;exit when cur_salary%notfound;dbms_output.put_line(rpad(e_no,10,' ')||rpad(e_name,25,' ')||net_salary);end loop;close cur_salary;end;/
OUTPUT:emp no Name Net salary
1 vijay 7649.25 2 vasanth 5000 3 priya 2850
36
PL/SQL procedure successfully completed.
RESULT: ******** Thus the Cursor Procedure for calculating the Payroll process has been executed successfully.
SQL> create procedure INC(e_id IN number,amt IN number) isvsalary number;salary_missing exception;BEGINselect esalary into vsalary from employees where eno=e_id;if vsalary is null thenraise salary_missing;elseupdate employees set esalary=esalary+amt where eno=e_id;end if;EXCEPTIONwhen salary_missing thendbms_output.put_line(e_id || 'has salary as null');
SQL> create or replace function findAddress(phone in number) return varchar2 as address varchar2(100);
beginselect username||','||doorno ||','||street ||','||place||','||pincode into address from phonebook where phone_no=phone; return address;exception when no_data_found then return 'address not found'; end; /
RESULT: ******* Thus the Function for searching process has been executed successfully.EX: NO: 5.d CONTROLS
DATE:
********************ADDITION OF TWO NUMBERS***********************
SQL> declarea number; b number;c number;begina:=&a;b:=&b;c:=a+b;dbms_output.put_line('sum of'||a||'and'||b||'is'||c);
41
end; /INPUT:
Enter value for a: 23old 6: a:=&a;new 6: a:=23;Enter value for b: 12old 7: b:=&b;new 7: b:=12;
OUTPUT:sum of23and12is35
PL/SQL procedure successfully completed.*********** GREATEST OF THREE NUMBERS USING IF ELSE*************
SQL> declare a number;b number;c number;d number;begina:=&a;b:=&b; c:=&b;if(a>b)and(a>c) thendbms_output.put_line('A is maximum'); elsif(b>a)and(b>c)thendbms_output.put_line('B is maximum');elsedbms_output.put_line('C is maximum');end if;end; /
INPUT:*******Enter value for a: 21old 7: a:=&a;new 7: a:=21;Enter value for b: 12old 8: b:=&b;new 8: b:=12;Enter value for b: 45old 9: c:=&b;
42
new 9: c:=45;
OUTPUT:********C is maximum
PL/SQL procedure successfully completed.
***********SUMMATION OF ODD NUMBERS USING FOR LOOP***********
SQL> declaren number;sum1 number default 0;endvalue number;beginendvalue:=&endvalue; n:=1;for n in 1..endvalueloop if mod(n,2)=1thensum1:=sum1+n;end if; end loop;dbms_output.put_line('sum ='||sum1);end; /
INPUT:
Enter value for endvalue: 4old 6: endvalue:=&endvalue;new 6: endvalue:=4;
OUTPUT: sum =4PL/SQL procedure successfully completed.
**********SUMMATION OF ODD NUMBERS USING WHILE LOOP***********
SQL> declaren number;
43
sum1 number default 0;endvalue number;beginendvalue:=&endvalue;n:=1;while(n<endvalue)loopsum1:=sum1+n;n:=n+2;end loop;dbms_output.put_line('sum of odd no. bt 1 and' ||endvalue||'is'||sum1);end;/
INPUT:
Enter value for endvalue: 4old 6: endvalue:=&endvalue;new 6: endvalue:=4;
OUTPUT:sum of odd no. bt 1 and4is4PL/SQL procedure successfully completed.
RESULT:******** Thus the PL/SQL block for different controls are verified and executed.EX: NO: 6 FRONT END TOOLS
Private Sub Command2_Click()If List1.ListIndex <> 0 ThenList1.RemoveItem (0)End IfEnd Sub
Private Sub Command3_Click()EndEnd Sub
Sample Snapshot:
45
46
47
RESULT: ******** Thus the program has been loaded and executed successfully.
48
EX: NO: 7FORM DESIGN
DATE:
EXECUTION
Form1
Private Sub Command1_Click()Dim a As Integera = Val(Text1.Text) + Val(Text2.Text)MsgBox ("Addition of Two numbers is" + Str(a))End Sub
Private Sub Command2_Click()Dim b As Integerb = Val(Text1.Text) - Val(Text2.Text)MsgBox ("Subraction of Two numbers is" + Str(b))End Sub
Private Sub Command3_Click()Dim c As Integerc = Val(Text1.Text) * Val(Text2.Text)MsgBox ("Multiplication of Two numbers is" + Str(c))End Sub
Private Sub Command4_Click()Dim d As Integerd = Val(Text1.Text) / Val(Text2.Text)MsgBox ("Division of Two numbers is" + Str(d))End SubPrivate Sub Command5_Click()EndEnd Sub
Sample Snapshot:
49
50
RESULT: ******** Thus the program has been loaded and executed successfully.
EX: NO: 8 TRIGGER
51
DATE:
PROCEDURE:
STEP 1: Start STEP 2: Initialize the trigger with specific table id. STEP 3:Specify the UPDATE operations for which the trigger has to be executed.STEP 4: Execute the Trigger procedure. STEP 5: Carryout the operation on the table to check for Trigger execution.STEP 6: Stop
Private Sub Form_Load()con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Program Files\Microsoft Visual Studio\VB98\subbu\employee.mdb;Persist Security Info=False"End Sub
Private Sub Form_Unload(Cancel As Integer)con.CloseEnd Sub
FORM3 UPDATION CODE:
General DeclarationDim con As New ADODB.ConnectionDim rs As New ADODB.RecordsetDim n As Double
Private Sub Command1_Click()rs.Open "select * from emp where id='" & Text1.Text & "'", conn = rs.Fields(10) + Val(Text2.Text)con.Execute "update emp set others='" & Val(Text2.Text) & "',net_salary='" & n & "' where id='" & Text1.Text & "'"MsgBox ("Records Updated!!!!!!!!!!!!!")Unload Form3Load Form1Form1.ShowEnd Sub
Private Sub Form_Load()con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Program Files\Microsoft Visual Studio\VB98\subbu\employee.mdb;Persist Security Info=False"End Sub
58
Private Sub Form_Unload(Cancel As Integer)con.CloseEnd Sub
FORM4 DISPLAY CODE:
General DeclarationDim con As New ADODB.ConnectionDim rs As New ADODB.RecordsetDim num As String
Private Sub Command1_Click()num = Text1.Textrs.Open "select * from emp where id='" + num + "'", conSet DataReport1.DataSource = rsDataReport1.ShowEnd Sub
Private Sub Form_Load()con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Program Files\Microsoft Visual Studio\VB98\subbu\employee.mdb;Persist Security Info=False"End Sub
Private Sub Form_Unload(Cancel As Integer)con.CloseEnd Sub
DATABASE: EMPLOYEE DETAILS
EMPLOY INFORMATION
EMPLOYEE CREATE FORM
59
DATABASE RECORDS:
60
UPDATE EMPLOYEE DETAILS:
UPDATED DATABASE:
DISPLAY:
61
DATA REPORT:
62
RESULT:******** Thus the report generation was verified successfully
63
EX: NO: 11LIBRARY MANAGEMENT SYSTEM
DATE:
AIM
To develop an application software for Library Management System.
DESIGN PLAN
The Design plan consists of the following:
Project Plan
Software requirement Analysis
Implementation and Coding
Software testing
Software Debugging
Conclusion
PROJECT PLAN
The Project plan consists of three sections:
Student Information
Book Information
Borrowing and returning Process
SOFTWARE REQUIREMENT ANALYSIS
The purpose of the Library Management System is to manage Borrowing and receiving books from the student and updating book information for every transaction ( both Borrowing & reciving) . Functionality of System : 1. Student Information:
64
It includes the student information for Borrowing and returning the books with the updated books information.
2. Book Information:
It includes Book Information such as Author name ,Code, account number , Publisher name,Date of Issue and Date of returning ..
3. Borrowing and ending Process
It displays the information about the books issued ,burrower,returning date ,duration to have the books.
SOFTWARE TESTING
The main objectives of testing to maximize the test case , minimize the number of errors,
focus on correctness and efficiency of program.It helps to find out details of the student
who have borrowed the particular books.Both the Book information ,student information
can be obtained.
EXECUTION
FORM 1:Private Sub Command1_Click()Me.HideLoad Form5Form5.Visible = TrueEnd Sub
Private Sub Command2_Click()Me.HideLoad Form3Form3.Visible = TrueEnd Sub
Private Sub Command3_Click()Me.HideLoad Form4Form4.Visible = TrueEnd Sub
Private Sub Command4_Click()End
65
End Sub
FORM 2:Private Sub Command1_Click()Data1.Recordset.AddNewData1.Recordset.Fields("roll_no") = Val(Text1.Text)Data1.Recordset.Fields("name") = Text2.TextData1.Recordset.Fields("dep") = Text3.TextData1.Recordset.Fields("year") = Val(Text4.Text)Data1.Recordset.UpdateEnd Sub
Private Sub Command2_Click()b = MsgBox("Are you sure u want to delete it...", vbOKCancel + vbExclamation)If b = 1 ThenData1.Recordset.DeleteData1.Recordset.MoveNextMsgBox "Record is deleted"ElseEnd IfEnd Sub
Private Sub Command3_Click()a = InputBox("Enter the student roll number", roll_no)Data1.Recordset.MoveFirstOn Error GoTo jvm
While Not Data1.Recordset.Fields("roll_no") = Val(a)Data1.Recordset.MoveNextWendjvm:End Sub
Private Sub Command5_Click()EndEnd Sub
Private Sub Command6_Click()Unload MeLoad Form1: Form1.Visible = TrueEnd Sub
FORM 3:
66
Private Sub Command1_Click()Data1.Recordset.AddNewData1.Recordset.Fields("book_id") = Val(Text1.Text)Data1.Recordset.Fields("name") = Text2.TextData1.Recordset.Fields("author") = Text3.TextData1.Recordset.Fields("copies") = Val(Text4.Text)Data1.Recordset.UpdateEnd Sub
Private Sub Command2_Click()b = MsgBox("Are you sure u want to delete it...", vbOKCancel + vbExclamation)If b = 1 ThenData1.Recordset.DeleteData1.Recordset.MoveNextMsgBox "Record is deleted"ElseEnd IfEnd Sub
Private Sub Command3_Click()Dim a As Stringa = InputBox("Enter the book name", book_name)Data1.Recordset.MoveFirstOn Error GoTo jvm
Do Until Data1.Recordset.EOFIf Data1.Recordset("book_name") = a ThenText1 = Data1.Recordset.Fields("book_id")MsgBox "The book id is " + Data1.Recordset.Fields("book_id") + " It has " + Data1.Recordset.Fields("copies")End IfData1.Recordset.MoveNextLoopjvm:
End Sub
Private Sub Command5_Click()EndEnd Sub
Private Sub Command6_Click()Unload MeLoad Form1: Form1.Visible = TrueEnd Sub
67
Private Sub Text6_Change()If Text6.Text = 0 ThenMsgBox "No copies Available"End IfEnd SubFORM 4:Dim x As DatePrivate Sub Command1_Click()Data1.Recordset.AddNewData1.Recordset.Fields("roll_no") = Val(Text1.Text)Data1.Recordset.Fields("name") = Text2.TextData1.Recordset.Fields("book_id") = Val(Text3.Text)Data1.Recordset.Fields("book_name") = Text4.TextData1.Recordset.Fields("curr_date") = Val(Text5.Text)Data1.Recordset.Fields("date_of_return") = Val(Text6.Text)Data1.Recordset.UpdateEnd Sub
Private Sub Command2_Click()b = MsgBox("Are you sure u want to delete it...", vbOKCancel + vbExclamation)If b = 1 ThenData1.Recordset.DeleteData1.Recordset.MoveNextMsgBox "Record is deleted"ElseEnd IfEnd Sub
Private Sub Command3_Click()a = InputBox("Enter the student roll number", roll_no)Data1.Recordset.MoveFirstOn Error GoTo jvm
While Not Data1.Recordset.Fields("roll_no") = Val(a)Data1.Recordset.MoveNextWendjvm:End Sub
Private Sub Command4_Click()Text6.Text = DateValue(Text5) + 15End Sub
Private Sub Command5_Click()EndEnd Sub
68
Private Sub Command6_Click()Unload MeLoad Form1: Form1.Visible = TrueEnd SubPrivate Sub Command7_Click()Dim n As Doublen = (DateValue(Text7) - DateValue(Text5))If n > 15 Thenn = n - 15n = n / 2Text8 = nEnd IfEnd Sub
Private Sub Text5_Click()If Val(Text4.Text) = 0 ThenMsgBox "No copies Available"End IfEnd Sub
FORM 5:Private Sub Command1_Click()Form2.ShowEnd Sub
Private Sub Command2_Click()Form6.ShowEnd Sub
Private Sub Command3_Click()Form1.ShowEnd Sub
FORM 6:Private Sub Command1_Click()Form1.ShowEnd Sub
69
70
71
72
73
RESULT
This Software provides an efficient way of managing the library and it makes easier for the user to work with application software.This project is user friendly and it reduces the time for the user to manage the library.
74
EX: NO: 12 STUDY EXPRIMENT TO DESIGN E-R MODEL
DATE:
AIM
To design an Entity-relationship model .
PROCEDURE
STEP 1: Start
STEP 2:Specify attributes and identify the primary key for Entity.
STEP 3: Formulate the relation between entities.
STEP 4: Ensure that all the entities have been modeled.
STEP 5: Normalize the entire model.
STEP 6: Stop
DESCRIPTION OF ENTITY-RELATIONSHIP SYMBOLS
1. Rectangle It represents Entity Sets
2. Ellipse It represents Attributes
3. Diamond It represents Relation Set
4. Lines It represents Link between attributes to entity set and entity set to relationship set.
5. Doubled Ellipse It represents derived attributes.
6. Dashed Ellipse It represents primary key
7. Double Lines It represents participation of an entity in a relationship set.
8. Weak Entity Set An entity which does not pass any attribute for primary key
9. Strong Entity Set An entity which passes a dominant parametric features for unique identification.
75
E-R MODEL FOR BANKING ENTERPRISE
76
]Result: ****** Thus the E-R Model has been studied and acquired the knowledge.