Posts

Showing posts from January, 2015

SQL Joins

Image
SQL:  JOINS This SQL tutorial explains how to use SQL  joins  with syntax, visual illustrations, and examples. DESCRIPTION SQL  JOINS  are used to retrieve data from multiple tables. A SQL JOIN is performed whenever two or more tables are joined in a SQL statement. There are 4 different types of SQL joins: SQL INNER JOIN (or sometimes called simple join) SQL LEFT OUTER JOIN (or sometimes called LEFT JOIN) SQL RIGHT OUTER JOIN (or sometimes called RIGHT JOIN) SQL FULL OUTER JOIN (or sometimes called FULL JOIN) So let's discuss SQL JOIN syntax, look at visual illustrations of SQL JOINS, and explore SQL JOIN examples. SQL INNER JOIN (SIMPLE JOIN) Chances are, you've already written a SQL statement that uses an SQL INNER JOIN. It is the most common type of SQL join. SQL INNER JOINS return all rows from multiple tables where the join condition is met. Syntax The syntax for the SQL  INNER JOIN  is: SELECT columns FROM table1 ...

OSI Security Architecture

OSI Security Architecture OSI SECURITY ARCHITECTURE   Security architecture for OSI offers a systematic way of defining security requirements and characterizing the approaches to achieve these requirements. It was developed as an international standard. The OSI security architecture focus on security attack, mechanism, and services. These can be defined briefly as fallows: Security Attack:  Any action that compromise the security of information owned by an organization. Security Mechanism:  A process that is designed to detect, prevent or recover from a security attack. And security mechanism is a method which is used to protect your message from unauthorized entity. Security Services:  Security Services is the services to implement security policies and implemented by security mechanism. SECURITY ATTACKS   Passive Attacks: Eavesdropping communications and releasing of messages. Traffic analysis on the identities, location...

Eloqent Usage

<?php /* |-------------------------------------------------------------------------- | Return a Collection of Objects |-------------------------------------------------------------------------- */ // collection of all users $sql = " select * from users " ; $users = User :: all(); $users = User :: get(); // name and email of all users $sql = " select name, email from users " ; $attributes = [ ' name ' , ' email ' ]; $users = User :: get( $attributes ); // collection of all users filtered by where clause $sql = " select * from users where active = 1 " ; $users = User :: where( ' active ' , 1 ) -> get(); $users = User :: where( ' name ' , ' like ' , ' J% ' ) -> get(); // collection of all users filtered by multiple where clauses $sql = " select * from users where act...