SHAKEELA Databases = Fun..Fun..Fun
Databases are……UBIQUITOUS EVERYWHERE...Ever Present…used all over the world Online Movie Store Airlines Grades Library WHY DO WE USE THEM? Provide Efficiency Security Flexibility
Types of Databases OLD WAY: Hierarchical Networking Long search time for large files Redundant Data NEW WAY: Relational: Most Commonly Used Today E.F Codd of IBM introduced Relational Databases and SQL =Structured Query Language Object Oriented- Possibly the Future of Databases
Benefits of Databases Speed of Access Can almost instantaneously access data Efficient Use of Space (Storage) Lowers costs Use of Database Management Systems which provide easy ways to backup, copy and recover data
Relational Databases are FUN! Based on Mathematical Theory Relational Databases are made of up many tables Tables are also called Relations Each table or relation maintains information about one Entity (type of thing?) and tables join based on their relation to each other EXAMPLE TIME!!! WOOOHOOO!
SCHOOL Example Student Information Student ID (33) First Name (Michael) Last Name (Jackson) Grades Student ID (33) Class ID (425) Grade (A!) Class Information Class ID (425) Class Subject (Databases) Professor ID (122) Professor Professor ID (122) First Name (Diana) Last Name (Ross) Years of Service (12) Can you tell how they are related? Primary Keys= uniquely identifies each row in a table Foreign Keys=establishes relationship to dependant table.
Building a Relational Database An Entity is represented by a Table\Relation Each Table is made up of rows- Instance of entity TUPLE? Columns in a table represent attributes or adjectives that describe the data (Field) First Name Color Part #
Terms to Remember Entity Thing or Noun that the database will store Ex. Professor, car, building, class Attributes Adjectives that describe the Entity Schema Structure of the database Cardinality Ratios (p.141) Describes relationship between data 1:1 1:M M:M Normalization Putting your entity relationships through tests to create the least redundancy
PRACTICE: your turn Bob’s Big Bikes Purchase products Create my entity diagram What are my major NOUNS-ENTITY-THINGS? What Adjectives/Attributes will I have for each entity?