Dec 16, 2014
2. Where are relational databases?
You cannot avoid it and its everywhere!
You can say it actually makes the current society and your life
work!
Banking/Credit card /Social Security Info
Online shopping/booking
3. 4. 5. 6. What are relational databases?
A relational database stores all its data inside tables, and
nothing more.
All operations on data are done on the tables themselves or
produces another tables as the result.
You never see anything except for tables.
7. 8. Create relational database?
9. 10. To create table must determine field name and data type and
select primary key for table which must be unique and used for
relations .
11. Table 2 contain ID as foreign key
12. Relation between tables
1-one to one .
2-one to many.
3 many to many.
13. One to one
In one-to-one relationship, two tables are associated in such a way
that each record in first table can have only one matching record
in second table, and each record in second table can have only one
matching record in first table.
14. 15. One to many
In one-to-many relationship, two tables are associated in such a
way that each record in the first table can have many matching
records in second table, but a record in second table has only one
matching record in first table.
16. 17. Manyto many
In many-to-many relationship, two tables are associated in such a
way that each record in the first table can have many matching
records in second table, and a record in second table can have many
matching records in first table.
18. 19. Relation between tables in our example is one to
many.
20. What is E-R diagram?
Shortfor entity relationship diagram.
Used to representrelations between tables andrelation types.
21. What is Query ?
A database query is a request for information from a
database.
22. 23. normalization
24. There are two goals of the normalization process:
1-eliminating redundant data ( storing the same data in more than
one table) .
2- ensuring data dependencies (only storing related data in a
table).
25. First normal form
26. Create separate tables for each group of related data and identify each rowwith a unique column or set of columns (the primary key).