U:/msu/course/cse/103 Day 03, Slide 1 CSE 103 Day 15: Database Design Students: –Read Day 2 in your textbook –Your BT feedback.

Slides:



Advertisements
Similar presentations
Build a database I: Design tables for a new Access database
Advertisements

Microsoft® Access® 2010 Training
Microsoft ® Access ® 2010 Training Design the tables for a new database.
Data Modeling. What are you keeping track of? You begin to develop a database by deciding what you are going to keep track of. Each thing that you are.
Database management system (DBMS)  a DBMS allows users and other software to store and retrieve data in a structured way  controls the organization,
Access - Project 1 l What Is a Database? –A Collection of Data –Organized in a manner to allow: »Access »Retrieval »Use of That Data.
M.S. Access Module CAS 133 Russ Erdman. M.S. Access Module Assignment Overview Two options for the unit: All students complete Units A, B and C In class.
Database A collection of related information stored on a computer and organized in a manner that allows access, retrieval, and use of that data.
1 CSE Students: Please do not log in yet. Check-in with Brian in the back. Review Days 3 and 4 in the book. Others: Please save your work and logout.
Introduction to Databases CIS 5.2. Where would you find info about yourself stored in a computer? College Physician’s office Library Grocery Store Dentist’s.
U:/msu/course/cse/103 Day 16, Slide 1 CSE 103 Day 16 Students: Read Day 10. If you are logged in, add records to your contacts.
Database Design Concepts INFO1408 Term 2 week 1 Data validation and Referential integrity.
1 Chapter 2 Reviewing Tables and Queries. 2 Chapter Objectives Identify the steps required to develop an Access application Specify the characteristics.
Database Software Application
Page 1 ISMT E-120 Introduction to Microsoft Access & Relational Databases The Influence of Software and Hardware Technologies on Business Productivity.
MS Access: Database Concepts Instructor: Vicki Weidler.
DATA, DATABASES, AND QUERIES Managing Data in Relational Databases CS1100Microsoft Access - Introduction1.
DATA, DATABASES, AND QUERIES Managing Data in Relational Databases CS1100Microsoft Access - Introduction1 Created By Martin Schedlbauer
Page 1 ISMT E-120 Desktop Applications for Managers Introduction to Microsoft Access.
U:/msu/course/cse/103 Day 25, Slide 1 Back-up PHP Files If you have not yet passed the 3.0 BT, make back-up copies of ALL.
ACCESS CHAPTER 1. OBJECTIVES Tables Queries Forms Reports Primary and Foreign Keys Relationship.
MICROSOFT ACCESS Pn. Jamilah Binti Yusof. DEFINITION A database is the computer equivalent of an organized list of information. Typically, this information.
FIRST COURSE Access Tutorial 1 Creating a Database.
BIS121 IT for Business Application Lecture 8 – Database (Part I)
Access 2007 Database Application Managing Business Information Effectively BCIS 1 and 2.
DAY 15: ACCESS CHAPTER 2 Larry Reaves October 7,
BUS1MIS Management Information Systems Semester 1, 2012 Access: Creating a Database Week 6 Lecture 2.
U:/msu/course/cse/103 Day 04, Slide 1 CSE students: Do not log in yet. Computers are SLOW today! Review days 13.
PHP meets MySQL.
® Microsoft Access 2010 Tutorial 1 Creating a Database.
Microsoft ® Office Access ® 2007 Training Build a database I: Design tables for a new Access database ICT Staff Development presents:
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 1 Microsoft Office Access 2003 Tutorial 2 – Creating And Maintaining A.
U:/msu/course/cse/103 Day 07, Slide 1 Day 15 Review What datatype would be an appropriate choice for: –A cell phone number.
Copyright © 2005 Ed Lance Fundamentals of Relational Database Design By Ed Lance.
ATADESAB. BATLE CORDER DLEIF Lesson objectives In this lesson you will learn some basic database terms and learn how a database is created.
U:/msu/course/cse/103 Day 06, Slide 1 CSE students: Do not log in yet. Review Day 6 in your textbook. Think about.
Datafaces Data Base Management Software (DBMS) is a tool used to transform Data into Information. What is Data…? What is Information…? What is a Database…?
XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Preparing To Automate Data Management Chapter 1 “You.
Chapter 4c, Database H Definition H Structure H Parts H Types.
Day 13, Slide 1 U:/msu/course/cse/103 CSE 103 Students: Review INNER and OUTER JOINs, Subqueries. Others: Please save your.
INFO1408 Database Design Concepts Week 15: Introduction to Database Management Systems.
MS Access. Access is a DBMS/RDMS DBMS = Database Management System RDMS = Relational Database Management System.
Database collection of related information stored in an organized form Database program software tool for storage & retrieval of that information.
Introduction to Database using Microsoft Access 2013 Part 7 November 19, 2014.
IE 423 – Design of Decision Support Systems Database development – Building Tables
1 CSE 2337 Introduction to Data Management Access Book – Ch 1.
INFORMATION TECHNOLOGY DATABASE MANAGEMENT. Adding a new field 1Right click the table name and select design view 2Type the field information at the end.
Relational Database. I. Relational Database 1. Introduction 2. Database Models 3. Relational Database 4. Entity-Relationship Models 5. RDB Design Principles.
U:/msu/course/cse/103 Day 18, Slide 1 CSE 103 Day 18 If you are not enrolled in CSE 103, please save and log out by 10:10.
Database Objective Demonstrate basic database concepts and functions.
Database Basics BCIS 3680 Enterprise Programming.
U:/msu/course/cse/103 Day 21, Slide 1 CSE 103 Makeups –If you didn’t take one over the weekend, take one TUESDAY or WEDNESDAY!
U:/msu/course/cse/103 Day 17, Slide 1 CSE 103 Housekeeping: –Take a makeup BT this week if not passed the 2.0 yet –Next.
Introduction to Databases CISC Where would you find info about yourself stored in a computer? College Physician’s office Library Grocery Store Dentist’s.
U:/msu/course/cse/103 Day 08, Slide 1 CSE 103 Students: –Review days 7 and 8 if you need to go over relationships and INNER.
MSOffice Access Microsoft® Office 2010: Illustrated Introductory 1 Part 1 ® Database & Table.
U:/msu/course/cse/103 Day 08, Slide 1 Debrief Homework What problems arose in trying to import the data from Classical_Music.xls?
Constraints Advanced Database Systems Dr. AlaaEddin Almabhouh.
Database Essentials Lesson 1. Software Orientation.
Database (Microsoft Access). Database A database is an organized collection of related data about a specific topic or purpose. Examples of databases include:
New Perspectives on Microsoft Access 2016
CSE 103 Day 15: Database Design
Databases Chapter 16.
and Defining Table Relationships
INFO/CSE 100, Spring 2005 Fluency in Information Technology
Database Fundamentals
Debrief Homework Import data from the text file CanadianUniversities06.txt into a temporary table. What is the primary key for this table? Construct an.
Advanced Database Concepts: Reports & Views
Microsoft Access Date.
Presentation transcript:

U:/msu/course/cse/103 Day 03, Slide 1 CSE 103 Day 15: Database Design Students: –Read Day 2 in your textbook –Your BT feedback may be (hopefully is!) up Others: –Please save your work and log out by 10:10.

U:/msu/course/cse/103 Day 03, Slide 2 Day 13/14 Review Day 13: Nested queries in MySQL –Write subqueries to find data needed before we can answer the problem –Compare subqueries with exactly one record & field using = > < etc. –In FROM clause, subqueries make virtual tables we name with AS Day 14: BT day. Comments/feedback on your BT? –"It was too hard" doesn't count

U:/msu/course/cse/103 Day 03, Slide 3 Database terminology review Record –An item in your database, usually represented by one row in your database –Also called entity, object –Tables contain records about objects of the same type Field –A piece of information about an object –Also called attribute –Stored in columns in your database

U:/msu/course/cse/103 Day 03, Slide 4 Database Design What questions do I want the database to answer? What data do I need to answer these questions? How are these data related to one another?

U:/msu/course/cse/103 Day 03, Slide 5 Guiding Principles Control data Redundancy –Don't (redundantly) store data in two places (twice) Maintain data Consistency –Don't store conflicting data Provide data Integrity –Only allow legal values; all records must have primary keys Maintain data Independence –Changing data in one place does not break DB in other places

U:/msu/course/cse/103 Day 03, Slide 6 Database Example: Electronic Rolodex What information about your friends would you like a rolodex to provide? What data is in the SBC phonebook white pages? What data isn't available in the SBC phone book that you would like to have in your personal phonebook? How would you arrange this data in a database table? How would you arrange this data in a database table?

U:/msu/course/cse/103 Day 03, Slide 7 Database Example: Electronic Rolodex, cont’d What questions do you want to be able to answer about your friends? What items of data do we need in our contact directory in order to answer such questions? What should you do when you can't get some of the data? For example, you don't know all of your friends' addresses. What should you do with people who have more than one phone number: a cell phone number, a pager number, a fax number?

U:/msu/course/cse/103 Day 03, Slide 8 Data types Examine the list of data types on page 2-5 of the text Within your group, reach a consensus on the datatype assigned to each piece of data in your design Note: this data will be made available in the day 15 AFS space after we have agreed on types as a class

U:/msu/course/cse/103 Day 03, Slide 9 Design View for a Table Start Access and create a new database called contacts.mdb Create a new table in design view, and enter the field names and data types (as agreed) Use descriptive field names close to those discussed in class so that you don't need any additional information in the Description box –NEVER USE SPACES IN FIELD NAMES! –Try to follow a consistent convention, e.g., all lower- case, first capital, underscores between words, etc. Pick your own but BE CONSISTENT! Don't save the table yet

U:/msu/course/cse/103 Day 03, Slide 10 Saving the Table Use naming convention: –To tell difference between table and query, we use tbl_ and qry_ –Not required—some people don't use any convention, but recommended to use it Following the naming convention, call the table tbl_People. Access will prompt you about a primary key. Answer no for now and continue to next slide.

U:/msu/course/cse/103 Day 03, Slide 11 Primary Keys What does the primary key do? What is a reasonable primary key for this table? (see next slide)

U:/msu/course/cse/103 Day 03, Slide 12 Types of Primary Keys Existing data: –e.g., Social Security #, PID, filename, etc. –One item that uniquely identifies an object Multiple cell: –e.g., ActorID + MovieID = Role (list of Actors in Movies); TextbookID + AuthorID = BookAuthor (books’ authors) –The combination of all fields uniquely identifies an object: same actor can’t be in same movie, but one actor can be in multiple movies, and one movie may have multiple actors Autonumber: –Last resort, used when nothing else works –The DBMS assigns a new unique # when you insert a row –Wastes space if you could find a key among existing data –Doesn't help prevent duplicate entries (can always insert; get new key every time even if all other data is the same)

U:/msu/course/cse/103 Day 03, Slide 13 Closing & data entry Set the primary key, save, and close the table Open it in datasheet view and add information about yourself Remember that we don't ever save the database itself –All data changes are live –Changes to table or query designs have to be saved

U:/msu/course/cse/103 Day 03, Slide 14 Better design, first steps: Properties of data What pieces of information does every person have: –Exactly one of –Exactly zero or one of –Any number between zero and at least two What pieces of information might be shared between multiple people?

U:/msu/course/cse/103 Day 03, Slide 15 Homework Check the homework link. –Enter 15 records into your contact directory. (Suggest you use classmates right after class!) –Practice identifying primary keys –Read Day 10 on the design of multiple-table databases –Think about how we could improve the design of the contacts database (see questions on previous slide)