Procedural vs. Object-Oriented
A procedural programming language is designed to allow a programmer to define a specific starting point for the program and then execute sequentially. All early programming languages worked this way. As user interfaces became more interactive
and graphical, it made sense for programming languages to evolve to allow the user to have greater control over the flow of the program. An object-oriented programming language is designed so that the programmer defines "objects"
that can take certain actions based on input from the user. In other words, a procedural program focuses on the sequence of activities to be performed while an object oriented program focuses on the different items being manipulated.
![](../../../../pluginfile.php/2806867/mod_book/chapter/7015/employee-table-schema.png)
Employee object
Consider a human resources system where an "EMPLOYEE" object would be needed. If the program needed to retrieve or set data regarding an employee, it would first create an employee object in the program and then set or retrieve the values needed. Every object has properties, which are descriptive fields associated with the object. Also known as a Schema, it is the logical view of the object (i.e., each row of properties represents a column in the actual table, which is known as the physical view). The employee object has the properties "EMPLOYEEID", "FIRSTNAME", "LASTNAME", "BIRTHDATE" and "HIREDATE". An object also has methods which can take actions related to the object. There are two methods in the example. The first is "ADDEMPLOYEE()", which will create another employee record. The second is "EDITEMPLOYEE()" which will modify an employee's data.