Data Modelling

619 views
556 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
619
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Data Modelling

  1. 1. Data Modelling & Microsoft Access Basics Yulin Fang February 9 th , 2005 <ul><li>What is Access </li></ul><ul><li>Examples of Databases </li></ul><ul><li>Using Access as a Tool for Business </li></ul><ul><ul><li>Analyze Business Situation </li></ul></ul><ul><ul><li>Data Modeling </li></ul></ul><ul><ul><li>Create Database </li></ul></ul><ul><ul><li>Develop Applications </li></ul></ul><ul><li>Create the First Database! </li></ul><ul><li>Additional Resources </li></ul>Agenda
  2. 2. Introduction – What is Access? <ul><li>Access is the most well-known desktop DBMS! Learn Access before approaching any of the databases below </li></ul><ul><li>Examples of industrial-strength databases that are widely used: </li></ul><ul><ul><li>Oracle </li></ul></ul><ul><ul><li>DB2 </li></ul></ul><ul><ul><li>SQL Server </li></ul></ul><ul><ul><li>Informix </li></ul></ul><ul><ul><li>MySQL </li></ul></ul><ul><li>Why not Excel </li></ul><ul><ul><li>Excel is great for table making, calculating, and reporting on a limited set of data; </li></ul></ul><ul><ul><li>Excel doesn’t work well when you need to view a huge amount of data from different angles; However, Excel does have a very “basic version” of Access Database – Pivot table . But that is all Excel can do that is anywhere closer to Access </li></ul></ul><ul><ul><li>More importantly, Excel cannot eliminate redundancy , enforce data integrity </li></ul></ul>A database management system, a program that facilitates the storage and retrieval of structured information on a computer’s hard drive.
  3. 3. Examples of Database Applications In Reality <ul><li>On your computer </li></ul><ul><ul><li>Outlook </li></ul></ul><ul><li>In your community </li></ul><ul><ul><li>eZone (Account Information, Course Information, Exam Information) </li></ul></ul><ul><ul><li>Online library information </li></ul></ul><ul><li>In the business world </li></ul><ul><ul><li>ERP (e.g., SAP, PeopleSoft) </li></ul></ul><ul><ul><li>SABRE (e.g., air ticketing system) </li></ul></ul><ul><ul><li>E-commerce (e.g., www.eBay.com ; www.expedia.com ) </li></ul></ul><ul><li>… . Nearly anything on the web where you find a text box or drop-down list to fill in </li></ul>Database applications are everywhere …
  4. 4. How to Apply Database to Solve Business Problems <ul><li>What are the business needs? </li></ul><ul><li>What information is required? </li></ul><ul><li>Where to find these information in the business situation? </li></ul>Analyze business situation Design conceptual model Design and Create Database Develop Applications <ul><li>Specify relevant entities and relationships between the entities </li></ul><ul><li>Use Entity-Relationship modeling techniques to design a conceptual model </li></ul><ul><li>Create tables </li></ul><ul><li>Define primary key </li></ul><ul><li>Feed in data </li></ul><ul><li>Establish relationships between tables </li></ul><ul><li>Develop queries </li></ul><ul><li>Develop forms </li></ul><ul><li>Develop reports </li></ul><ul><li>Develop web-pages </li></ul>Pencil and Paper Using Access (or other dbs)
  5. 5. Conceptual Model Design - The Most Critical Phase … One thing I'd emphasize [with my dear students] is that many people mistakenly begin making a database by creating tables and fields without a clear plan. This is fine in the spreadsheet world, but a high quality database requires careful planning up front, and that's why data modeling is such a critical aspect of database development….. (Neufeld, 2005)
  6. 6. Analyze Business Situation <ul><li>You are an internal budget analyst in a university </li></ul><ul><li>Professors share a number of budget pools </li></ul><ul><ul><li>(e.g., text books, phone calls, conference expense, other business traveling) </li></ul></ul><ul><li>Your supervisor wants you to keep track of: </li></ul><ul><ul><li>Which professors have claimed what expenses? </li></ul></ul><ul><ul><li>How much have they spent? </li></ul></ul><ul><ul><li>How a particular budget pool is used? </li></ul></ul><ul><li>Other examples: </li></ul><ul><ul><li>Consultants work on projects; Students take classes </li></ul></ul><ul><li>What information should be captured? </li></ul><ul><ul><li>Professor </li></ul></ul><ul><ul><li>Budget </li></ul></ul><ul><li>Where to find these information? </li></ul><ul><ul><li>HR </li></ul></ul><ul><ul><li>Finance </li></ul></ul>Business needs Information needs
  7. 7. Conceptual Model Design – ER Modeling <ul><li>Entity : Real-world object distinguishable from other objects. An entity is described (in DB) using a set of attributes . </li></ul><ul><li>Entity Set : A collection of similar entities. E.g., all employees </li></ul><ul><ul><li>All entities in an entity set have the same set of attributes </li></ul></ul><ul><ul><li>Each entity set has a key attribute </li></ul></ul><ul><li>Relationship : Association among two or more entities. </li></ul><ul><li>Three types of relationships … </li></ul>1-to-1 1-to-Many Many-to-Many
  8. 8. Conceptual Model Design – ER Modeling E-R Model Database View Employees EID First Name Last Name Budget Code BID Name Budget Spend When How much What <ul><li>Employee </li></ul><ul><li>ID </li></ul><ul><li>First Name </li></ul><ul><li>Last Name </li></ul><ul><li>Title </li></ul><ul><li>Hire Date </li></ul><ul><li>… </li></ul><ul><li>Budget Code </li></ul><ul><li>ID </li></ul><ul><li>Description </li></ul><ul><li>Total Budget </li></ul><ul><li>… </li></ul><ul><li>Expenditure </li></ul><ul><li>Who </li></ul><ul><li>When </li></ul><ul><li>How much </li></ul><ul><li>What </li></ul><ul><li>… </li></ul>
  9. 9. Design and Create Database <ul><li>Tables : the main place where data is stored. They work very much like a spreadsheet. </li></ul><ul><li>Queries: filtered versions of a table of data. They are used for organizing data by sorting or only including records with a certain value. </li></ul><ul><li>- Forms: a way to make entering and searching for data more straightforward. </li></ul><ul><li>- Reports: a good way to present data for printing, emailing, or onscreen presentations. </li></ul><ul><li>- Data Access Pages to export data in a form-like setup. This is commonly used to show your data in a web page. </li></ul><ul><li>- Macros: a way to encode your database to automate certain tasks. For example, a macro could print out a copy of a report every time it is opened. </li></ul><ul><li>- Modules are an interface between the Visual Basic coding language and your database. Modules are most often used by database administration </li></ul>In Access, you can create Tables, Queries, Forms, Reports, Data Access Pages, Macros, and Modules . Table is where data is stored
  10. 10. Create a new table in an Access database <ul><li>Create and save a new database </li></ul><ul><li>Create a table in design view </li></ul><ul><li>Specify fields </li></ul><ul><li>Specify data types </li></ul><ul><li>Enter new data </li></ul>Design and Create Database
  11. 11. Design and Create Database <ul><li>Now get hands dirty with Access </li></ul>
  12. 12. Additional Resources <ul><li>Conceptual design using Entity-Relationship Modeling </li></ul><ul><li>http://www.cs.wisc.edu/~dbbook/openAccess/firstEdition/slides/pdfslides/mod5l1-2.pdf </li></ul><ul><li>A comprehensive guide teaching you how to build a database for business transactions using Access </li></ul><ul><li>http://mis.bus.sfu.ca/tutorials/MSAccess/tutorials_main.asp </li></ul><ul><li>A quick start on how to use Access </li></ul><ul><li>http:// www.bcschools.net/staff/AccessHelp.htm </li></ul><ul><li>An introduction to Database Management Systems </li></ul><ul><li>http://www.cs.wisc.edu/~dbbook/openAccess/thirdEdition/slides/slides3ed.html </li></ul>

×