22
MUFIX COMMUNITY DB Beginners Approach

Database Session

Embed Size (px)

DESCRIPTION

Speaker :Gamal Mostafa Session : Database Concepts Session hosted by MUFIX Community

Citation preview

Page 1: Database Session

MUFIX COMMUNITY

DBBeginners Approach

Page 2: Database Session

What is the Database ?Why Database ? Types of Database .Keys & Keys types .Normalization .Database Engines .Starting SQL .

Agenda

Page 3: Database Session

A kind of filing cabinet that include a group of related data .

What is the Database

Data : the values actually stored in the database .

Page 4: Database Session

Integrity .No Redundancy .Security .Apply Standards .

Why Database

Page 5: Database Session

Flat Database:- All entities data grouped in one table .

Types of Database

Relational Database :- Divide entities data into

tables .

Page 6: Database Session

The key Is an entrance to the data in the Database .

Keys

Page 7: Database Session

Primary key .Foreign key .Composite key .

Types of keys

Page 8: Database Session

Primary key

Unique value .

Must have value (not null) .

Page 9: Database Session

Foreign key

Allow Redundancy .

Must have value (not null) .

Must have the same values in the parent table

Page 10: Database Session

Composite key

Key that contains two or more field to identify records .

Page 11: Database Session

Normalization

Process of organizing and refining relations within database .

Normal forms: are theoretical rules against which a relation is tested .

Page 12: Database Session

1NF

Each cell have atomic value .

Page 13: Database Session

2NF

Functional dependency on the primary key .

Page 14: Database Session

3NF

No transitive dependency (terminate redundancy) .

Page 15: Database Session

Database engine

Microsoft Access .

Oracle .

MySQL .

Sybase .

Page 16: Database Session

Structured query language (SQL)Language used to access and modify in

Relational Database .

SELECT department_name FROM departments;

Page 17: Database Session

Data Manipulation Language (DML)Select .Insert .Update .Delete .

Page 18: Database Session

Select SELECT department_name FROM departments;

Page 19: Database Session

Insert

INSERT INTO departments(department_id, department_name, manager_id, location_id)VALUES (70, 'Public Relations', 100, 1700);

Page 20: Database Session

Update

UPDATE employeesSET department_id = 70WHERE employee_id = 113;

Page 21: Database Session

Delete

DELETE FROM copy_emp;

DELETE FROM departments WHERE department_name = 'Finance';

Page 22: Database Session

Get Help

Thank you

[email protected]