1 / 11

Seminar: Introduction to relational databases

Seminar: Introduction to relational databases. Introduction to the database field: Conceptual modelling: The Entity-Relation (ER) Model. …or…. Where does all the tables come from???. Conceptual Data Models.

mason-rose
Download Presentation

Seminar: Introduction to relational databases

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. Seminar:Introduction to relational databases Introduction to the database field: Conceptual modelling:The Entity-Relation (ER) Model FEN 2012-09-01

  2. …or… Where does all the tables come from??? FEN 2012-09-01

  3. Conceptual Data Models • A conceptual data model describes the data objects (entities) and their relations in the problem domain. • A conceptual model of the data is the basis on which the IT systems of an organisation are based. • It should be: • Independent of implementation • Stable over time • Over time conceptual data structure doesn't change nearly as much as functionality • Conceptual models are to be transformed to a database model as the relational model. FEN 2012-09-01

  4. Example: MiniBank What would a conceptual model look like? • Entities? • Customer • Account • Relations: • Customer-Owns-Account This is implementation: accNo balance name custNo n 1 Customer Account Owns inRate FEN 2012-09-01

  5. Entity-Relation (ER) Model: Concepts • Relations • Cardinality ratio • Participation (total / partial) • Relations may have attributes • Entities • Attributes • Atomic • Composite • Multi valued • Attribute values • Entity types • Keys • Domains • Weak Entity Types • Identifying owner • Identifying relation • Partial key • A weak entity always has total participation in the identifying relation. accNo balance name custNo n 1 Customer Account Owns inRate FEN 2012-09-01

  6. Example: The Company Database (Elmasri) FEN 2012-09-01

  7. Example: The Company Database (Elmasri) Entities? • Department: name(kk), number(kk), location • Project: name(kk), number(kk), location • Employee: ssn(kk), bdate, name (poss. composite), sex, address (poss. composite), salary • Dependent (weak?): name (partial key), sex, bdate FEN 2012-09-01

  8. Example: The Company Database (Elmasri) Relations? • Manages • Works_For • Works_On • Dependents_Of • Supervision • Controls FEN 2012-09-01

  9. Example: The Company Database (Elmasri) ER Diagram for the Company Database FEN 2012-09-01

  10. Relations of Degree > 2 • Often causes problem in database design • May be transformed to binary relations or entities • Not to be considered in this introduction FEN 2012-09-01

  11. Example/Exercise (Elmasri) • Questions: • Can a customer exists without an account? • Can an account have more owners? • How many branches can account belong to? • Can a customer have accounts in more than one branch? • …??? FEN 2012-09-01

More Related