database session
DESCRIPTION
Speaker :Gamal Mostafa Session : Database Concepts Session hosted by MUFIX CommunityTRANSCRIPT
MUFIX COMMUNITY
DBBeginners Approach
What is the Database ?Why Database ? Types of Database .Keys & Keys types .Normalization .Database Engines .Starting SQL .
Agenda
A kind of filing cabinet that include a group of related data .
What is the Database
Data : the values actually stored in the database .
Integrity .No Redundancy .Security .Apply Standards .
Why Database
Flat Database:- All entities data grouped in one table .
Types of Database
Relational Database :- Divide entities data into
tables .
The key Is an entrance to the data in the Database .
Keys
Primary key .Foreign key .Composite key .
Types of keys
Primary key
Unique value .
Must have value (not null) .
Foreign key
Allow Redundancy .
Must have value (not null) .
Must have the same values in the parent table
Composite key
Key that contains two or more field to identify records .
Normalization
Process of organizing and refining relations within database .
Normal forms: are theoretical rules against which a relation is tested .
1NF
Each cell have atomic value .
2NF
Functional dependency on the primary key .
3NF
No transitive dependency (terminate redundancy) .
Database engine
Microsoft Access .
Oracle .
MySQL .
Sybase .
Structured query language (SQL)Language used to access and modify in
Relational Database .
SELECT department_name FROM departments;
Data Manipulation Language (DML)Select .Insert .Update .Delete .
Select SELECT department_name FROM departments;
Insert
INSERT INTO departments(department_id, department_name, manager_id, location_id)VALUES (70, 'Public Relations', 100, 1700);
Update
UPDATE employeesSET department_id = 70WHERE employee_id = 113;
Delete
DELETE FROM copy_emp;
DELETE FROM departments WHERE department_name = 'Finance';