Presentation is loading. Please wait.

Presentation is loading. Please wait.

FEN 2015-09-031 Introduction to the database field: The development process Seminar: Introduction to relational databases Development process: Analyse.

Similar presentations


Presentation on theme: "FEN 2015-09-031 Introduction to the database field: The development process Seminar: Introduction to relational databases Development process: Analyse."— Presentation transcript:

1 FEN 2015-09-031 Introduction to the database field: The development process Seminar: Introduction to relational databases Development process: Analyse the problem domain and build a conceptual model (ER model) Table design Domains Primary key, foreign keys, constraints Quality checking design (normalisation) Create tables Run queries

2 Development Process Analyse the problem domain: Identify: entities relations FEN 2015-09-032

3 Development Process FEN 2015-09-033 Build the conceptual model: Attributes Primary keys Cardinality Participation

4 Development Process Transform the ER model into relational schemas (tables): 7 steps algorithm: Entity -> Table (composite, and multi value attributes) Weak entity -> Table (composite key, include owners key) 1-1 and 1-n relations (include primary key from one side as foreign key on the other side) n-m relations (new table with the primary keys from both sides as foreign keys, composite primary key) Multi value attributes - > new table (include the owners primary key as foreign key) Relations with degree > 2 -> new table (include all participants primary keys as foreign keys, composite primary key) FEN 2015-09-034

5 Development Process Result: FEN 2015-09-035

6 Development Process FEN 2015-09-036 Informal Design Guidelines: Table Semantics Avoid Redundant Information Minimise NULL-values Disallowing the generation of spurious tuples when joining tables. Normalisation: 1NF 2NF 3NF BCNF Look for functional dependencies / determinants that are not keys

7 Development Process FEN 2015-09-037 Guideline for Normalisation All attributes are to depend on the key, the whole key, and nothing but the key. So help me Codd. And remember: FDs are business rules Normalisation fights redundancy and other maladies in table design

8 Development Process Table definitions: Data types (domains) NULLs allowed? Primary key (ids?) Referential constraints (FK-PK references) FEN 2015-09-038 Constraint

9 Development Process Execute queries: SELECT, INSERT, UPDATE, DELETE FEN 2015-09-039  SELECT:  Rows and columns  Joins  Set operations

10 Do it yourself If you want to try it your self, you may want to install the free Microsoft SQL Server Express: SQLServerInstall.pptx FEN 2015-09-0310

11 The End! Thank you very much – hope you liked it. (fen@ucn.dk, http://public.ucn.dk/fen/angers/)fen@ucn.dkhttp://public.ucn.dk/fen/angers/ FEN 2015-09-0311


Download ppt "FEN 2015-09-031 Introduction to the database field: The development process Seminar: Introduction to relational databases Development process: Analyse."

Similar presentations


Ads by Google