Presentation is loading. Please wait.

Presentation is loading. Please wait.

2 1 Chapter 2 Data Models Database Systems: Design, Implementation, and Management, Eleventh Edition, Coronel & Morris.

Similar presentations


Presentation on theme: "2 1 Chapter 2 Data Models Database Systems: Design, Implementation, and Management, Eleventh Edition, Coronel & Morris."— Presentation transcript:

1 2 1 Chapter 2 Data Models Database Systems: Design, Implementation, and Management, Eleventh Edition, Coronel & Morris

2 2 2 Database Systems: Design, Implementation, & Management, 11th Edition, Coronel & Morris Data Models Big Concept definition –School of thought as to what and how a database should work and the technologies that it should be based on. Small Concept definition –Representation, usually graphical, of the structure of a database solution for a given business problem. Both views of a Data Model are very important!

3 2 3 Database Systems: Design, Implementation, & Management, 11th Edition, Coronel & Morris The Importance of Data Models (Small Concept definition) Data models –Relatively simple representations, usually graphical, of complex real-world data structures –Facilitate interaction among the designer, the applications programmer, and the end user End-users have different views and needs for data Data model organizes data for various users

4 2 4 Database Systems: Design, Implementation, & Management, 11th Edition, Coronel & Morris Data Model Basic Building Blocks (Small Concept definition) Entity - anything about which data are to be collected and stored Attribute - a characteristic of an entity Relationship - describes an association among entities –One-to-many (1:M) relationship –Many-to-many (M:N or M:M) relationship –One-to-one (1:1) relationship Constraint - a restriction placed on the data

5 2 5 Database Systems: Design, Implementation, & Management, 11th Edition, Coronel & Morris Business Rules Brief, precise, and unambiguous descriptions of a policies, procedures, or principles within a specific organization Description of operations that help to create and enforce actions within that organization’s environment Sources of Business Rules: –Company managers –Policy makers –Department managers –Written documentation Procedures Standards Operations manuals –Direct interviews with end users

6 2 6 Database Systems: Design, Implementation, & Management, 11th Edition, Coronel & Morris The Evolution of Data Models (Big Concept defintion)

7 2 7 Database Systems: Design, Implementation, & Management, 11th Edition, Coronel & Morris The Relational Model Developed by E.F. “Ted” Codd (IBM) in 1970 Considered ingenious but impractical Conceptually simple Computers lacked power to implement the relational model Today, microcomputers can run sophisticated relational database software

8 2 8 Database Systems: Design, Implementation, & Management, 11th Edition, Coronel & Morris The Relational Model (continued) Relational Database Management System (RDBMS) Most important advantage of the RDBMS is its ability to hide the complexities of the relational model from the user

9 2 9 Database Systems: Design, Implementation, & Management, 11th Edition, Coronel & Morris The Relational Model (continued) Table (relations) –Matrix consisting of a series of row/column intersections –Related to each other through sharing a common entity characteristic –Relational table is purely logical structure How data are physically stored in the database is of no concern to the user or the designer This property became the source of a real database revolution Relational diagram –Representation of relational database’s entities, attributes within those entities, and relationships between those entities

10 2 10 Database Systems: Design, Implementation, & Management, 11th Edition, Coronel & Morris The Relational Model (continued)

11 2 11 Database Systems: Design, Implementation, & Management, 11th Edition, Coronel & Morris The Relational Model (continued) Rise to dominance due in part to its powerful and flexible query language Structured Query Language (SQL) allows the user to specify what must be done without specifying how it must be done

12 2 12 Database Systems: Design, Implementation, & Management, 11th Edition, Coronel & Morris The Entity Relationship Model Widely accepted and adapted graphical tool for data modeling Introduced by Peter Chen in 1976 Graphical representation of entities and their relationships in a database structure

13 2 13 Database Systems: Design, Implementation, & Management, 11th Edition, Coronel & Morris The Entity Relationship Model (continued) Entity relationship diagram (ERD) –Uses graphic representations to model database components –Entity is mapped to a relational table Entity instance (or occurrence) is a row in a table Entity set is collection of like entities Connectivity labels types of relationships –Diamond connected to related entities through a relationship line

14 2 14 Database Systems: Design, Implementation, & Management, 11th Edition, Coronel & Morris The Entity Relationship Model

15 2 15 Comparison of Representations Database Systems: Design, Implementation, & Management, 11th Edition, Coronel & Morris

16 2 16 Big Data Exponential growth in data –Business data 2005, largest data warehouse was 100TB 2013, eBay “singularity system” was 40,000TB –Consumer-generated data Twitter generates over 8TB of data every day –Machine-generated data Boeing engine generates 10TB every 30 minutes (over 25,000 airline flights/day = a total of more than 1000TB /day) Large Hadron Collider generates 40TB every second

17 2 17 Why is Big Data Different Big Data –Volume –Variety –Velocity Data Products – the data is the product –Google –Amazon

18 2 18 Conceptual Alternatives (NoSQL) Key-Value Store Document Database

19 2 19 Map Representations {“1” : {“Title”: “How to X”,“Author”: “Jane Doe”,“Categories”: {“foo” : “”,“bar” : “”},“Content”: “So you want to X? Here’s…”}, “2” : {“Title”: “X Y About Z”,“Author”: “John Doe”,“Content”: “Here’s a list of Y about Z…”}, “3” : {“Title”: “Why X Instead of Z”,“Author”: “Jane Doe”,“Categories”: {“foo”: “”,},“Content”: “Some people think Z, but…”}}

20 2 20 MapReduce Combination of the Map and Reduce algorithms Map – partition a task into several smaller subtasks, each assigned to a different worker process Reduce – aggregate the results of the map workers into a single result set. Written primarily in Java. Use pre-defined queries.

21 2 21 Relational and NoSQL Differences Structure requirements –RDBMS: Structured in storage –Big Data: Unstructured in storage, structure imposed during processing Integrity constraints –RDBMS: Ensuring consistency and integrity requires overhead –Big Data: Data captured “as is” Distributed limitations –RDBMS: ACID transactions require greater synchronization between distributed nodes –Big Data: Designed to be highly distributed over 1,000s of nodes without enforcement of strict consistency

22 2 22 Relational vs. NoSQL example Word Count (count how many times each word appears in the data) Database Systems: Design, Implementation, & Management, 11th Edition, Coronel & Morris SELECT Word, Count(*) FROM Res_Ad_Words GROUP BY Word; SQL solution NoSQL partial solution (as provided in Hadoop Tutorial) public static class MapClass extends MapReduceBase implements Mapper { private final static IntWritable one = new IntWritable(1); private Text word = new Text(); public void map(LongWritable key, Text value, OutputCollector output, Reporter reporter) throws IOException { String line = value.toString(); StringTokenizer itr = new StringTokenizer(line); while (itr.hasMoreTokens()) { word.set(itr.nextToken()); output.collect(word, one); } public static class Reduce extends MapReduceBase implements Reducer { public void reduce(Text key, Iterator values, OutputCollector output, Reporter reporter) throws IOException { int sum = 0; while (values.hasNext()) { sum += values.next().get(); } output.collect(key, new IntWritable(sum)); }


Download ppt "2 1 Chapter 2 Data Models Database Systems: Design, Implementation, and Management, Eleventh Edition, Coronel & Morris."

Similar presentations


Ads by Google