1 / 12

Database Design

A presentation for “Cuppa” Corner. Database Design. A trip to First Normal Form. Tony Rogerson, SQL Server MVP http://sql-server.co.uk http://sqlblogcasts.com/blogs/tonyrogerson http://twitter.com/tonyrogerson. Agenda. Introduction to Normalisation Domains Functional Dependencies

kasa
Download Presentation

Database Design

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A presentation for “Cuppa” Corner Database Design A trip to First Normal Form Tony Rogerson, SQL Server MVPhttp://sql-server.co.ukhttp://sqlblogcasts.com/blogs/tonyrogerson http://twitter.com/tonyrogerson

  2. Agenda • Introduction to Normalisation • Domains • Functional Dependencies • Repeating Groups • Relation Valued Attributes • First Normal Form Tony Rogerson, SQL Server MVP http://sql-server.co.uk

  3. Introduction to Normalisation • Nothing to do with Performance • Nothing to do with SQL • Nothing to do with Implementation (the Physical) • Reduce Data Redundancy • Method of putting Data into “Relations” • Sets Tony Rogerson, SQL Server MVP http://sql-server.co.uk

  4. Domain is “The Set of Possible Values” • Examples • Colours • Red, Green, Blue • Age • 0 to 180 • Car Models • Jaguar, Ford, Audi • May be Finite (colours, age) or Dynamic (Car Models) Tony Rogerson, SQL Server MVP http://sql-server.co.uk

  5. Functional Dependency • Adds Semantics to the data • Many to one relationship • Left is a candidate key • Right can be another key/part of a key/attribute Determinant(Many) Dependant(One) Functionally Determines Tony Rogerson, SQL Server MVP http://sql-server.co.uk

  6. FD Examples Determinant(Many) Dependant(One) Functionally Determines National Insurance Number Car Registration Number VIN Time of Day Full Name Make of Vehicle Car Registration Number Type of Meal Tony Rogerson, SQL Server MVP http://sql-server.co.uk

  7. Repeating Groups An Attribute having the same meaning and the same “Domain” of values which is repeated, and the placement of values in those repetitions has no meaning and is entirely by chance. Attribute is AttendeeDomain is {Rosie, Ester, Hazel, Poppy, Joe} Tony Rogerson, SQL Server MVP http://sql-server.co.uk

  8. Repeating Groups – Not! An Attribute having the same meaningand the same “Domain” of values which is repeated, and the placement of values in those repetitions has no meaning and is entirely by chance. Attribute is Address1, Address2, Address3Domain for Address1 is {Torver} Address2 is {26 Moorla} Tony Rogerson, SQL Server MVP http://sql-server.co.uk

  9. Relation Valued Attribute Attribute is ?Domain for ? Tony Rogerson, SQL Server MVP http://sql-server.co.uk

  10. RVA Expanded Tony Rogerson, SQL Server MVP http://sql-server.co.uk

  11. First Normal Form • Identify at least one Candidate Key • Get rid of Repeating Groups • Values must be Atomic (no CSV’s) Tony Rogerson, SQL Server MVP http://sql-server.co.uk

  12. A presentation for “Cuppa” Corner Database Design Thanks for Listening! A trip to First Normal Form Tony Rogerson, SQL Server MVPtonyrogerson@torver.nethttp://sql-server.co.ukhttp://sqlblogcasts.com/blogs/tonyrogerson http://twitter.com/tonyrogerson

More Related