130 likes | 194 Views
Explore the differences between data and information, transactional and analytical databases, components of an information infrastructure, and ERD creation for a movie rental scenario. Learn how to convert ERD into tables and query a pet database.
E N D
Review Session • What is data, what is information, and give a real world example to differentiate these two concepts.
What is the main differences between a transactional database and an analytical database?
Components of an information infrastructure This is what is commonly thought of as “database management” This is the foundation for business intelligence
Prepare an ERD for the following scenario Renting a movie at Blockbuster: • Each movie is described by an ID, name, genre (horror, comedy, drama, romantic, and foreign) • A movie can be rented by one or many customers. • A customer is described by an ID, name, address, credit card number.
Be sure • Identify primary keys • Attribute of relationship • Attribute is conceptual and abstract • Don not overcomplicate the problem
Describe the relationship in this ERD and convert into tables FacultyID First name Faculty Last Name Teaches Semester Course Number Course Course name
The Rules 1. Create a table for every entity 2. Create table fields for every entity’s attributes 3. Implement relationships between the tables
Query this database (petdb) How much does “Fluffy” weigh? What is the average weight of a cat? What is the name of the owner of “Snuggles”?
List all the animal’s names SELECT name FROM petdb.pet; 2) What is the average weight of a cat? SELECT AVG(pet.weight) FROM petdb.pet WHERE pet.type= ‘Cat’ 3) What commands do you need to get pet’s name and owner location (4) What is the average weight for different categories of animals?