database design concepts
DESCRIPTION
Database Design Concepts. With Access. Learning Outcomes. Identify and define the information that is needed to design a database Create conceptual and logical db designs Build a relational database that provides users with queries , forms , and reports - PowerPoint PPT PresentationTRANSCRIPT
Database Design ConceptsWith Access
Learning OutcomesIdentify and define the information that
is needed to design a databaseCreate conceptual and logical db
designsBuild a relational database that
provides users with queries, forms, and reports
Understand core terms, concepts, and tools
Learning Outcomes
Design and maintain relational db tables
Create Select and Action queriesCreate normalized relationships
between tables, apply validation rules, and referential integrity principles
Design and modify reports and forms
Challenges
House analogyNeed a blueprint before you can build
GIGO (garbage in, garbage out)
Key DB Design Concepts
Entity Person, place, thing, event (noun)
AttributeProperty of an entity (adjective, adverb)
RelationshipAssociation between entitiesUsually a verb
Key DB Design Concepts
DatabaseStructure that can house information
about multiple types of entities, the attributes of these entities, and the relationships among the entities.
Relational DatabasePerceived by users to be a collection of
tables; two-dimensional named tables
DBMS (software)
Design structure of databaseCreate data entry formsValidate dataSort and manipulate dataQuery the databaseProduce reports
Goals of Database Design
Input set of user requirements
Output database structure capable of supporting
user requirements
Database Design Step 1
Information-level designgather user requirementsdesign a database that meets
requirements as cleanly as possibleindependent of DBMS
Database Design Step 2
Concerned with characteristics of specific DBMS
Must resolve issues such ascolumn namesdata typenumber of columnsdata length
General Design Guidelines
Identify the tables (entities)
Determine the primary keys (unique
attribute)
Determine additional fields (attributes)
Determine relationships among tables
General Design Guidelines (cont)
Determine data types for fieldsIdentify and remove unwanted
redundancyStoring a piece of data in more than one
place
Determine a storage locationDetermine additional properties for
attributes
A Database Example
Camashaly Design Group provides custom marketing solutions for the service, non-profit, and retail sectors. The company specializes in designing and maintaining Web sites and using social networking Web sites for online marketing. Camashaly uses business analysts to work collaboratively with clients.
Camashaly would like to organize the data on clients and business analysts in to a database managed by Access 2010.
Applying the DatabaseDesign Guidelines to Camashaly Design
Group
Client Number
Client Name Street City State Postal Code
BA53 Bavant Animal Hospital 134 Main Burles NC 28817BB32 Babbage CPA Firm 464 Linnell Austin SC 28796BC76 Buda Community Clinic 867 Ridge Buda NC 27032CJ29 Catering by Jenna 123 Second Granger NC 27036GA74 Grant Antiques 78 Catawba Georgetown NC 28794GF56 Granger Foundation 65 Simpson Granger NC 27036HC10 Hendley County Hospital 216 Rivard Austin SC 28796KD21 KAL Design Studio 116 Pine Georgetown NC 28794KG04 Kyle Grocery Cooperative 421 First Kyle SC 28798ME14 Mike's Electronic Stop 234 Gilham Georgetown NC 28794PJ34 Patricia Jean Florist 345 Magee Kyle SC 28798SL77 Smarter Law Associates 764 Main Burles NC 28817TB17 The Bikeshop 346 Austin Buda NC 27032WE05 Walburg Energy Alternatives 12 Polk Walburg NC 28819WS01 Woody Sporting Goods 578 Central Walburg NC 28819
Word table (Clients.doc)
Excel workbook
Business Analyst Number
Last Name First Name Street City State Postal Code
11 Kerry Cordelia 251 Painter Georgetown NC 2879414 Martinez Manuel 3125 Steel Kyle SC 2879727 Liu Jan 265 Marble Byron SC 2879535 Scott Jeff 1925 Pine Georgetown NC 28794
Word table (Business Analysts)
Excel workbook
Your Turn!
Look at the user documents provided Clients Word documentBusiness analysts Word documentBusiness analyst financial data Excel
workbookClient financial data Excel workbook
Design a database for Camashaly Design Group
Import Excel Files
Open AccessOn the External Data tab click Excel in
the Import groupImport the two Excel workbooksDO NOT remove any columns
Create Tables for Data in Word Documents
Create a table for Clients and one for Business AnalystsHint: the Client Number and Business Analyst
number should be primary key fields
Are there columns that have been duplicated between tables? If so, remove the column from one table.Hint: Client name is contained in both the Clients
and Client Financial Data tables. Normalization requires that the name is stored in the Clients table. Remove the column in the Financial Data table.
Set Up Relationships
Which tables have a column in common?
Close the tables (do not close Access)Click the Database Tools tabClick relationshipsSet up a one to many relationship
Hint: Look for the common columns. Client and Business Analyst are the tables that are on the one side.
Create a Query
Create a Simple Query using the WizardInclude the first name, last name and
incentive YTD for the business analystsSpecify a Detail query, click Finish
Create a Second Query
Create a second query using Query Design that will list all clients that owe more than $1,000From the Show Tables dialog box, add the Clients
and Client Financial Data tablesThe fields to display are client name, postal code,
and current dueSort in ascending order on postal codeCriteria for the current due is > 1000Change to Datasheet View to see the results
Create a Form
Create a form to input new clientsHint: Open the clients table and click
on Create/Form
Create a Report
We want a report that will Use the report wizardChoose the clients table; fields to display
are the client name and postal codeChoose the client financial data; fields to
display are the amount paid and current due
View the data by ClientGroup by Postal Code
Report (continued)
Sort by current due in descending order
No summary optionsKeep all the defaults, click finishIf necessary, edit in Design view to
make your report attractive.
Congratulations!
Thank you toPhil Pratt and Mary Last