Presentation is loading. Please wait.

Presentation is loading. Please wait.

DATA, INFORMATION AND KNOWLEDGE Data: Data can be anything such as a number, a person’s name, images, crops name, sounds and so on. It can be defined as.

Similar presentations


Presentation on theme: "DATA, INFORMATION AND KNOWLEDGE Data: Data can be anything such as a number, a person’s name, images, crops name, sounds and so on. It can be defined as."— Presentation transcript:

1 DATA, INFORMATION AND KNOWLEDGE Data: Data can be anything such as a number, a person’s name, images, crops name, sounds and so on. It can be defined as a set of isolated and unrelated raw facts, represented by values, which have little or no meaning because they lack a context for evaluation. Values are represented in the form of characters, numbers or any symbol Ex: Kamal,24,Scientist,1000$

2 Information: When the data is processed and converted into a meaningful and useful form, it is known as information. Information can be defined as a set of organised and validated collection of data. Ex: Kamal is 24 years old, he is a Scientist and his salary is 1000$. Knowledge: It is the act of understanding the context in which the information is used It can be based on learning through information, experience. Based on the knowledge, the information can be used in a particular context. Ex: if a former uses the information about Kamal(He is scientist) then the former is using his knowledge.

3 Data processing: - means the process of collecting all items of data together to produce meaningful information. It can be done either manually or by the use of computers. If data processing is done with the help of computers, it is known as EDP (Electronic Data Processing) Data Information Knowledge Meaningful form Conclusion made

4 Need for Information Information is an important part of our day-to-day life. Almost all activities of our life are affected by the quantity as well as the quality of information. Usage of Information: Information and Decision-Making: - Decision-making is the process of identifying, selecting and implementing the best possible alternative. - The right information, in the right form, and at the right time, is essential to make correct decisions. Ex: Cell Phone (Aircel, Hutch etc) Information and Communication: - Information is vital / Important for communication and a critical resource for performing work in organisations. - Business manager spend most of their day in communicating with other managers, customers, vendors etc, which involves collecting, processing and distributing information.

5 Information and Knowledge: - Information plays a vital role in the accumulation of knowledge. - The future is shaped by our actions today, and our actions today are based upon our knowledge. - Therefore, for achieving higher levels of success, one must be well informed and should have clarity of knowledge. Information and Productivity: - Information helps in making sense of our environment, which assists in achieving the performance objectives. - Productivity is directly related to the availability and value of the information – The necessary information is being supplied to the right people at the right time in the organistion.(Ex: Question paper)

6 Database Fundamentals Database : In the modern management system ( Organizations), data are necessary for taking valuable decisions and they become the backbone of any organization. This set of interrelated data is known as a database. That is organised collection of related data Keeping this data up-to-date, In order to carry out operations like insertion, deletion, and retrieval, the database needs to be managed by a Software Package. This Software is called Database Management System or DBMS. A database management system is a software system that allows access to data contained in a database A database system is an integrated collection of related Tables (files) Table is a collection of records. ie the data is organised into storage containers called Table. Record is nothing but collection of interrelated fields, field is data. Table/File is stored in second memory (Ex. Hark disk, floppy,CD).

7 EnoEnameDeptpostbasic 111KumarSalesManager6000 222UmarPurchaseAccountant5000 333VinoSalesClerk2500 444RajMarketingManager6000 Table / File (Ex: Employee) Field 1 or Column 1 Field 2 or Column 2 ------- Field 5 or Column 5 Record 1 or row 1 ------ Record 4 or row 4

8 RDBMS : RDBMS is Relational Data Base Management System where all the data visible to the user is organized strictly as tables and all database operations work on these tables. Each table relation in a database has a unique table name that identifies its contents. The row or record in the table is called tuple. The column or field is called attribute. RDBMS Software (Product): 1.ACCESS 2.SQL server 3.ORACLE 4.MySql 5.SYBASE 6.INGRES 7.DATABASE 2 8.DBC/1012 9.INFORMIX 10.SQLBASE 11.UNIFY SQL: Structured Query Language It is used to communicate with the relational database. It is a non-procedural language because it processes sets of records rather than just one data at a time. The SQL command allows a set of rows as input and a set of rows as output.

9 Overview of ORACLE Architecture Kernel Data Dictionary SQL

10 Kernel : It provides communication with the database and the connection with other kernels in a distributed database environment. Data Dictionary : It is made up of tables and views. It provides the details of the database object such as tables, columns, views, oracle users and rights privileges of the object. SQL (Structured Query Language): Tables and views of data dictionary are manipulated through SQL by the database. Introduction to SQL It is used to communicate with the relational database. It is non procedural language because it processes sets of records rather than just one data at a time also it allows a set of rows as input and a set of rows as output.

11 Data types CHAR - Character string. It specifies a fixed length character string. - The default length is 1 byte. - The maximum length is 255 bytes - Syntax : CHAR(N) N – is the size of variable Ex: create table emp(name char(15)); VARCHAR2 - Character string. It specifies variable length character string. - The default length is 1 byte. - The maximum length is 2000 bytes - Syntax : VARCHAR2(N) N – is the size of variable Ex: create table emp(name varchar(15)); NUMBER - Used to store zero, Positive and negative fixed and floating point numbers with 38 digits precision. - Syntax 1 NUMBER (p,s) p – is the precision or the total number of digits. s – is the scale or number of digits to the right of the decimal point. ex: create table emp (salary number(8,2);

12 - Syntax 2 NUMBER (p) is the fixed point number with precision p and scale 0digits. ex: create table emp (age number(2)); -Syntax 3NUMBER here s is the fixed point number with precision 38 ex: create table emp (age number) Long -It stores variable length character strings containing upto 2 GB. -The length of the LONG values may be limited by the memory available on the computer. -A table cannot contain more than one LONG column. -Syntax : LONG -Ex: create table emp( activities LONG);

13 DATE -Used to store date and time information. -For each DATE value the following information is stored Century, Year, Month, Minute and Second. -Syntax :DATE -Ex: create table emp(dobDATE); RAW and LONG RAW -These types are used to store floating point data, binary data such as graphics, images and digitized sound. -We can’t perform string manipulation on RAW data. -Syntax :RAW LONG RAW -Ex: Create table emp (photoraw); ROWID -Each row in the database has an address. -We can examine a row’s address by querying the pseudo column ROWID.

14 Components of SQL SQL components as falling in three categories, 1.DDL (Data Definition Language) 2.DML (Data Manipulation Language) 3.DCL (Data Control Language) DDL : The study of DDL deals with creation, modification and deletion of table. Create Table: The command CREATE TABLE is used to create a new table. Syntax: CREATE TABLE ( column1 datatype, column2 datatype, ----- column N datatype); Ex: CREATE TABLE emp (enonumber(3), enamechar(10), deptchar(15), postchar(15), basicnumber(6));

15 Alter Table: The command ALTER TABLE is used to modify existing column name, data type, and width as well as adding new column in the existing table. Syntax : ALTER TABLE ADD ( col1 datatype, col2 datatype, ---- colN datatype); MODIFY (col1 datatype, col2 datatype, ---- colN datatype); Example: ALTER TABLE emp ADD ( sexchar(6)); MODIFY ( deptchar(20), basicnumeric(8)); Drop Table: It removes the specified table and all its data (records) from the database. Syntax: DROP TABLE ; Ex: DROP TABLE emp;

16 DML - Data Manipulation Language It allows you to add, modify or delete data ( record) from the database. INSERT The INSERT command inserts one or more rows into a table. a) Direct Method: Syntax: 1 INSERT INTO VALUES (list of values); Ex:1 INSERT INTO emp VALUES (111,’Ram’,’Sales’,’Manager’,8000,’Male’); Ex:2 INSERT INTO emp VALUES( 222,’Muniya’,’Purchase’,’Asst.Manager’,7000,’Female’); Ex:3 INSERT INTO emp VALUES (333,’Bosco’,’Marketing’,’Manager’,8000,’Male’); Ex:4 INSERT INTO emp VALUES (444,’Vinothini’,’Sales’,’Clerk’,5000,’Female’);

17 b) Inserting specific columns: Syntax: 2 INSERT INTO [column-name1, column-name2…] VALUES (column-value1, column-value2,….); Ex: Inserts only number, name, department and sex SQL> INSERT INTO emp(eno,ename,dept,sex) VALUES(555,’Rajive’,’Sales’,’Male’); c) Insertion with Macros Syntax: 3 INSERT INTO [column-name1, column-name2…] VALUES (&MacroName1, &MacroName2…...); Ex: SQL> INSERT INTO emp VALUES (&eno,’&ename’,’&dept’,’&post’,&basic,’&sex’); d) Insertion with query Syntax: 1 INSERT INTO [column-name1, column-name2…] SubQuery;

18 Ex: SQL>INSERT INTO SALES-EMP SELECT * FROM EMP WHERE DEPT = ‘Sales’; UPDATE It allows you to update one or more columns and one or more rows in a table. Syntax: UPDATE SET column = value | exp | Subquery WHERE condition;

19 Ex 1: To increase the basic pay with Rs. 500 only for Managers. UPDATE emp SET basic = basic + 500 WHERE post = ‘Manager’; Ex 2: To add 5 % basic as commission with salary only for whose belongs to marketing department. UPDATE emp SET basic = basic + ( basic * 5/100) WHERE dept = ‘Marketing’; SELECT It is used to retrieve data (record) from one or more tables. Syntax: SELECT *|field1,field2,…field n FROM WHERE condition; Ex :1 To list all employee from EMP table. SELECT * FROM emp; Ex: 2. To display only female employee SELECT * FROM emp WHERE sex = ‘Female’; Ex: 3 To list all employees whose salary is less than 10000 SELECT * FROM emp WHERE basic <= 10000;

20 DELETE: It allows you to delete data ( record) from a table. Syntax: DELETE FROM WHERE condition; Ex: To remove only female employees DELETE FROM emp WHERE sex = ‘Female’; DCL – Data Control Language ( Transaction Control Language) COMMIT Insertions and other changes to tables normally are not committed until we exit from SQL or until we execute an any DDL command. But if we want to make a permanent changes manually then we use COMMIT command. Syntax: COMMIT; ROLLBACK It throws away all changes made to data since the last COMMIT. Syntax: ROLLBACK;

21 Ex: SQL>select * from emp; ENO ENAME DEPT POST BASIC --- ---------- --------------- --------------- --------- 111 kumar sales manager 16000 222 umar purchase account 7000 333 vino sales clerk 5000 444 raj marketing manager 15000 555 muniya purchase manager 15000 666 omna sales asst.manager 12000 SQL> update emp1 set basic = basic + 500 where ename = 'kumar'; SQL> update emp1 set basic = basic + 600 where ename = 'raj'; Now SQL>select * from emp; ENO ENAME DEPT POST BASIC --- ---------- --------------- --------------- --------- 111 kumar sales manager 16500 222 umar purchase account 7000 333 vino sales clerk 5000 444 raj marketing manager 15600 555 muniya purchase manager 15000 666 omna sales asst.manager 12000

22 Suppose if we are apply ROLLBACK Ex: SQL>ROLLBACK; It cancel all previous action (DML) up to last COMMIT or any DDL commands or exit from ORACLE SQL>select * from emp; ENO ENAME DEPT POST BASIC --- ---------- --------------- --------------- --------- 111 kumar sales manager 16000 222 umar purchase account 7000 333 vino sales clerk 5000 444 raj marketing manager 15000 555 muniya purchase manager 15000 666 omna sales asst.manager 12000

23 Note: - A transaction is a sequence of SQL statements that ORACLE treats as a single unit. - A transaction begins with the first executable SQL statement after a COMMIT, ROLLBACK or connection to ORACLE. - A transaction ends with COMMIT, ROLLBACK or disconnection from ORACLE. SAVEPOINT: -These are used to identify a point in a transaction to which one can later rollback. -They are used in conjunction with the ROLLBACK command to rollback portions of the current transaction. -Syntax : SAVEPOINT ; Ex: SQL>select * from emp; ENO ENAME DEPT POST BASIC --- ---------- --------------- --------------- --------- 111 kumar sales manager 16000 222 umar purchase account 7000 333 vino sales clerk 5000 444 raj marketing manager 15000 555 muniya purchase manager 15000 666 omna sales asst.manager 12000

24 SQL> update emp1 set basic = basic + 500 where ename = 'kumar'; SQL> SAVEPOINT k_salary; SQL> update emp1 set basic = basic + 600 where ename = 'raj'; SQL>SAVEPOINT r_salary; Now: To cancel only raj record changes but retains kumar changes SQL> ROLLBACK TO SAVEPOINT k_salary; Now SQL> select * from emp; ENO ENAME DEPT POST BASIC --- ---------- --------------- --------------- --------- 111 kumar sales manager 16500 222 umar purchase account 7000 333 vino sales clerk 5000 444 raj marketing manager 15000 555 muniya purchase manager 15000 666 omna sales asst.manager 12000


Download ppt "DATA, INFORMATION AND KNOWLEDGE Data: Data can be anything such as a number, a person’s name, images, crops name, sounds and so on. It can be defined as."

Similar presentations


Ads by Google