2141 – intro to databases
DESCRIPTION
2141 – Intro to Databases. 2. Intro to data modeling. Housekeeping 1. Registering from the waitlist: http://www.dal.ca/campus_life/student_services/academic-support/selecting-your-classes/choosing-your-classes/wait-lists-and-changing- classes.html - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: 2141 – Intro to Databases](https://reader036.vdocuments.site/reader036/viewer/2022062321/56813059550346895d961861/html5/thumbnails/1.jpg)
+
2141 – Intro to Databases2. Intro to data modeling
![Page 2: 2141 – Intro to Databases](https://reader036.vdocuments.site/reader036/viewer/2022062321/56813059550346895d961861/html5/thumbnails/2.jpg)
+Housekeeping 1
Registering from the waitlist: http://www.dal.ca/campus_life/student_services/academic-s
upport/selecting-your-classes/choosing-your-classes/wait-lists-and-changing-classes.html
Basically, when you have an override, you still need to register. Drop the class and register for it again – the system will allow you to register.
![Page 3: 2141 – Intro to Databases](https://reader036.vdocuments.site/reader036/viewer/2022062321/56813059550346895d961861/html5/thumbnails/3.jpg)
+Housekeeping 2
Updated important dates on the syllabus:
Important Dates Midterm Exam: February 18, 2013 Final Exam: TBA in the period of April 11-26,
2013 Final Withdrawal Date without academic penalty: February
4, 2013 Final Withdrawal Date with academic penalty: March 8,
2013 Deadlines: Assignments: January 23, February 6, February 20,
March13, March 27, April 3; Project: April 8
![Page 4: 2141 – Intro to Databases](https://reader036.vdocuments.site/reader036/viewer/2022062321/56813059550346895d961861/html5/thumbnails/4.jpg)
+Homework review
Watch intro video for coursera db Register Watch intro video:
https://class.coursera.org/db/lecture/index
Think about instances of databases misaligned with real world tasks and scenarios
![Page 5: 2141 – Intro to Databases](https://reader036.vdocuments.site/reader036/viewer/2022062321/56813059550346895d961861/html5/thumbnails/5.jpg)
Intro to Databases Massive
Persistent
Safe
Multi-user
Convenient
Efficient
Reliable
![Page 6: 2141 – Intro to Databases](https://reader036.vdocuments.site/reader036/viewer/2022062321/56813059550346895d961861/html5/thumbnails/6.jpg)
Intro to DatabasesKey concepts Data model
Schema versus data
Data definition language (DDL)
Data manipulation or query language (DML)
![Page 7: 2141 – Intro to Databases](https://reader036.vdocuments.site/reader036/viewer/2022062321/56813059550346895d961861/html5/thumbnails/7.jpg)
Intro to DatabasesKey people DBMS implementer
Database designer
Database application developer
Database administrator
![Page 8: 2141 – Intro to Databases](https://reader036.vdocuments.site/reader036/viewer/2022062321/56813059550346895d961861/html5/thumbnails/8.jpg)
+ANSI/SPARC Architecture
![Page 9: 2141 – Intro to Databases](https://reader036.vdocuments.site/reader036/viewer/2022062321/56813059550346895d961861/html5/thumbnails/9.jpg)
+Internal Level
Deals with physical storage of dataStructure of records on disk (files,
pages, blocks)Indexes and ordering of recordsUsed by database system programmers
Internal SchemaRECORD EMP, LENGTH=44, HEADER:
BYTE(5) OFFSET=0….
![Page 10: 2141 – Intro to Databases](https://reader036.vdocuments.site/reader036/viewer/2022062321/56813059550346895d961861/html5/thumbnails/10.jpg)
+Conceptual Level
Deals with the organization of the data as a whole Abstractions are used to remove unnecessary
details of internal level Used by DBA’s and application programmers
Conceptual Schema: CREATE TABLE Employee (Name VARCHAR
(25), Salary REAL, Dept_Name VARCHAR (10))
![Page 11: 2141 – Intro to Databases](https://reader036.vdocuments.site/reader036/viewer/2022062321/56813059550346895d961861/html5/thumbnails/11.jpg)
+External Level
Provides a view of the database tailored to a user Parts of the data may be hidden Data is presented in a useful form Used by end users and application
programmers
External schema: Payroll: String Name, double Salary Personnel: char *Name, char *Department
![Page 12: 2141 – Intro to Databases](https://reader036.vdocuments.site/reader036/viewer/2022062321/56813059550346895d961861/html5/thumbnails/12.jpg)
+Database Modeling
The process of producing a detailed data model to meet an end user’s requirements http://www.prowareness.com/blog/database-design-conceptual-design-logical-design-physical-design/
Qualities of good database design: Reflects real-world structure of the problem Can represent all expected data over time Avoids redundancy and ensures consistency Provides efficient access to data Supports the maintenance of data integrity
over time Supports the needs of the database users
![Page 13: 2141 – Intro to Databases](https://reader036.vdocuments.site/reader036/viewer/2022062321/56813059550346895d961861/html5/thumbnails/13.jpg)
+3 Phases of Database Design
Conceptual database design Constructing a data model for each view of
the real world problem Constructing the ER Model Checking it for redundancy Validating it against user transactions to
ensure all scenarios are supported
Logical database design
Physical database design
![Page 14: 2141 – Intro to Databases](https://reader036.vdocuments.site/reader036/viewer/2022062321/56813059550346895d961861/html5/thumbnails/14.jpg)
+Step 0 of Conceptual Database Design
Understanding the real world structure of the problem!
![Page 15: 2141 – Intro to Databases](https://reader036.vdocuments.site/reader036/viewer/2022062321/56813059550346895d961861/html5/thumbnails/15.jpg)
+Why is a database needed?
![Page 16: 2141 – Intro to Databases](https://reader036.vdocuments.site/reader036/viewer/2022062321/56813059550346895d961861/html5/thumbnails/16.jpg)
+What are the task scenarios?
Who are the stakeholders?
What data is important to them?
What tasks do they have to do with the data?
![Page 17: 2141 – Intro to Databases](https://reader036.vdocuments.site/reader036/viewer/2022062321/56813059550346895d961861/html5/thumbnails/17.jpg)
![Page 18: 2141 – Intro to Databases](https://reader036.vdocuments.site/reader036/viewer/2022062321/56813059550346895d961861/html5/thumbnails/18.jpg)
+Class running example scenario
Let’s ground it in what we know
Develop it together
Use it throughout
NOT: University records (standard in most textbooks) Order entry scenario
Sales/parts/invoice (SFU tutorial: http://sfubusiness.ca//areas/mis/tutorials/2np/lessons/scenario.pdf)
![Page 19: 2141 – Intro to Databases](https://reader036.vdocuments.site/reader036/viewer/2022062321/56813059550346895d961861/html5/thumbnails/19.jpg)
+Steps
Choose a domain
Choose a task scenario (relatively complex)
Develop the task scenario End users Data Natural data relationships
Flesh it out
![Page 20: 2141 – Intro to Databases](https://reader036.vdocuments.site/reader036/viewer/2022062321/56813059550346895d961861/html5/thumbnails/20.jpg)
+Homework:
For Friday, go through the SFU scenario tutorial: http://sfubusiness.ca//areas/mis/tutorials/2np/lessons/
scenario.pdf
For Monday, go through the Developing an Entity Relationship Diagram tutorail:
http://sfubusiness.ca//areas/mis/tutorials/2np/lessons/model.pdf
On Friday, we will work through our task scenario as a class
On Monday, we will develop an ER diagram