ER Model Chapter 4: ER Diagram Symbols
11 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

Quid significat 'entitas composita' (Composite attribute), 'entitas multivalens' (Multi-Valued Attribute) et 'attributum derivatum' (Derived Attribute)?

Entitas composita est forma impostorum quae ex duobus vel pluribus aliis attributis constat. Entitas multivalens est attributum quod plures valorem habet. Attributum derivatum est attributum quod ex aliis attributis vel campum computatum est.

Quid differunt 'entitas fortis' et 'entitas debilis'? Da exemplum pro utroque.

Entitas fortis est entitas quae non necessitat alteram entitatem ut existat, entitas debilis autem necessitat aliam entitatem ut existat. Exemplum entitatis fortis est 'employee' et entitatis debilis est 'employee dependent'.

Quid est scopum normalizationis basi deorum (Normalization)?

Scopum normalizationis est eliminatio reduplicatio et anomaliam ne schemata deorum sint bene structurata et quod efficiens atque functionale sint.

請說明何謂『複合屬性』(Composite attribute)與『多值屬性』(Multi-Valued Attribute),『衍生型屬性』(Derived Attribute)。並各舉一個例子。

<p>複合屬性是由兩個或兩個以上的其他屬性的值所組成,例如地址。多值屬性是屬性中存在多個數值,例如員工的電話。衍生型屬性由其他屬性或欄位計算而得的屬性,例如年齡。</p> Signup and view all the answers

何謂「強實體」與「弱實體」?並各舉一個例子。

<p>強實體是指不需要依附其他實體而存在的實體,如員工、產品。弱實體是指需要依賴其他實體而存在的實體,如員工眷屬、員工辦公室。</p> Signup and view all the answers

請說明資料庫正規化(Normalization)的目的為何?

<p>資料庫正規化的目的是為了減少數據冗余、提高數據存儲空間的使用效率、確保數據的唯一性並降低數據報告和檢索的複雜性。</p> Signup and view all the answers

完全功能相依(Full Functional Dependency)與部份功能相依(Partial Functional Dependency)的差異為何?

<p>完全功能相依是當一個表中的某個欄位完全依賴於該表的所有主鍵並不依賴於主鍵的任何一部分時,說明存在完全功能相依。部份功能相依則是部分欄位依賴於主鍵。</p> Signup and view all the answers

何謂無損失分解(Lossless decomposition)呢?

<p>無損失分解指在關係模式的分解過程中,確保重新組合時不會丟失任何原始數據。</p> Signup and view all the answers

試說明 1NF 到 BCNF 各步驟的主要工作?

<p>1NF要求移除重複群;2NF要求除去部分相依;3NF要求除去遞移相依;BCNF要求符合3NF且每一次決定因素皆是候選鍵。</p> Signup and view all the answers

請撰寫關聯式代數來查詢「員工資料表」中,性別為「女」且部門為「生產部」的名單?

<p>σ{性別='女' and 部門='生產部'}(員工資料表)</p> Signup and view all the answers

承上一題,請撰寫關聯式代數來查詢「員工資料表」中,「生產部」員工的編號、姓名及性別?

<p>π{編號, 姓名, 性別}(σ{部門='生產部'}(員工資料表))</p> Signup and view all the answers

Study Notes

ER Model: Entity-Relationship Diagram

  • ER Model: used to represent the structure of data in a database
  • Entity: a thing or concept that has existence and can be described with a set of attributes (e.g., employee, product)
  • Attribute: a characteristic or feature of an entity (e.g., employee name, product price)
  • Relationship: a connection between two or more entities (e.g., employee works on project, product belongs to category)

Types of Entities

  • Weak Entity: an entity that cannot exist without another entity (e.g., employee's dependent)
  • Strong Entity: an entity that can exist independently (e.g., employee, product)

Types of Attributes

  • Single-valued Attribute: an attribute that has a single value (e.g., employee name)
  • Multi-valued Attribute: an attribute that can have multiple values (e.g., employee's phone numbers)
  • Derived Attribute: an attribute that is calculated from other attributes (e.g., employee's age)
  • Composite Attribute: an attribute that is composed of multiple attributes (e.g., address)

Relationships

  • One-to-One (1:1) Relationship: a relationship between two entities where one entity has a unique relationship with another entity (e.g., employee and their dependent)
  • One-to-Many (1:N) Relationship: a relationship between two entities where one entity has multiple relationships with another entity (e.g., employee and their projects)
  • Many-to-Many (M:N) Relationship: a relationship between two entities where both entities have multiple relationships with each other (e.g., products and categories)

ER Diagram Notation

  • Entity: represented by a rectangle
  • Attribute: represented by a column or a field within an entity
  • Relationship: represented by a line connecting two entities
  • Cardinality: represented by a number or a symbol indicating the type of relationship (e.g., 1, *, +)

Chapter 5: Database Normalization

  • Database Normalization: the process of organizing the data in a database to minimize data redundancy and improve data integrity
  • Goals of Normalization: to eliminate data redundancy, improve data integrity, and reduce data anomaly

First Normal Form (1NF)

  • Define a table as a relation with a primary key
  • Eliminate repeating groups in a table

Second Normal Form (2NF)

  • A table is in 2NF if it is in 1NF and all non-key attributes are fully functional dependent on the primary key
  • Eliminate partial dependencies in a table

Third Normal Form (3NF)

  • A table is in 3NF if it is in 2NF and there are no transitive dependencies in a table
  • Eliminate transitive dependencies in a table

Boyce-Codd Normal Form (BCNF)

  • A table is in BCNF if it is in 3NF and there are no transitive dependencies in a table, and every determinant is a candidate key
  • Eliminate transitive dependencies and ensure that every determinant is a candidate key

Chapter 6: Relational Algebra

  • Relational Algebra: a formal system for manipulating relational databases
  • Relational Algebra Operations: select, project, join, union, difference, and rename

Querying a Relational Database

  • Select Operation: retrieves a subset of rows from a table based on a condition
  • Project Operation: retrieves a subset of columns from a table
  • Join Operation: combines rows from two or more tables based on a common column
  • Union Operation: combines rows from two or more tables
  • Difference Operation: retrieves rows from one table that are not present in another table
  • Rename Operation: renames a table or column

Advanced Querying

  • Aggregation Functions: sum, count, avg, max, and min
  • Grouping: groups rows based on a common column
  • Having Clause: filters groups based on a condition
  • Subqueries: a query nested inside another query

Query Optimization

  • Query Optimization: the process of improving the performance of a query
  • Query Optimization Techniques: indexing, caching, and rewriting queries

ER Model: Entity-Relationship Diagram

  • ER Model: used to represent the structure of data in a database
  • Entity: a thing or concept that has existence and can be described with a set of attributes (e.g., employee, product)
  • Attribute: a characteristic or feature of an entity (e.g., employee name, product price)
  • Relationship: a connection between two or more entities (e.g., employee works on project, product belongs to category)

Types of Entities

  • Weak Entity: an entity that cannot exist without another entity (e.g., employee's dependent)
  • Strong Entity: an entity that can exist independently (e.g., employee, product)

Types of Attributes

  • Single-valued Attribute: an attribute that has a single value (e.g., employee name)
  • Multi-valued Attribute: an attribute that can have multiple values (e.g., employee's phone numbers)
  • Derived Attribute: an attribute that is calculated from other attributes (e.g., employee's age)
  • Composite Attribute: an attribute that is composed of multiple attributes (e.g., address)

Relationships

  • One-to-One (1:1) Relationship: a relationship between two entities where one entity has a unique relationship with another entity (e.g., employee and their dependent)
  • One-to-Many (1:N) Relationship: a relationship between two entities where one entity has multiple relationships with another entity (e.g., employee and their projects)
  • Many-to-Many (M:N) Relationship: a relationship between two entities where both entities have multiple relationships with each other (e.g., products and categories)

ER Diagram Notation

  • Entity: represented by a rectangle
  • Attribute: represented by a column or a field within an entity
  • Relationship: represented by a line connecting two entities
  • Cardinality: represented by a number or a symbol indicating the type of relationship (e.g., 1, *, +)

Chapter 5: Database Normalization

  • Database Normalization: the process of organizing the data in a database to minimize data redundancy and improve data integrity
  • Goals of Normalization: to eliminate data redundancy, improve data integrity, and reduce data anomaly

First Normal Form (1NF)

  • Define a table as a relation with a primary key
  • Eliminate repeating groups in a table

Second Normal Form (2NF)

  • A table is in 2NF if it is in 1NF and all non-key attributes are fully functional dependent on the primary key
  • Eliminate partial dependencies in a table

Third Normal Form (3NF)

  • A table is in 3NF if it is in 2NF and there are no transitive dependencies in a table
  • Eliminate transitive dependencies in a table

Boyce-Codd Normal Form (BCNF)

  • A table is in BCNF if it is in 3NF and there are no transitive dependencies in a table, and every determinant is a candidate key
  • Eliminate transitive dependencies and ensure that every determinant is a candidate key

Chapter 6: Relational Algebra

  • Relational Algebra: a formal system for manipulating relational databases
  • Relational Algebra Operations: select, project, join, union, difference, and rename

Querying a Relational Database

  • Select Operation: retrieves a subset of rows from a table based on a condition
  • Project Operation: retrieves a subset of columns from a table
  • Join Operation: combines rows from two or more tables based on a common column
  • Union Operation: combines rows from two or more tables
  • Difference Operation: retrieves rows from one table that are not present in another table
  • Rename Operation: renames a table or column

Advanced Querying

  • Aggregation Functions: sum, count, avg, max, and min
  • Grouping: groups rows based on a common column
  • Having Clause: filters groups based on a condition
  • Subqueries: a query nested inside another query

Query Optimization

  • Query Optimization: the process of improving the performance of a query
  • Query Optimization Techniques: indexing, caching, and rewriting queries

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

Description

This quiz covers the basics of ER diagrams, including symbols and their meanings, with examples. It is a fundamental concept in database management systems.

More Like This

ER Diagram Extensions Quiz
8 questions

ER Diagram Extensions Quiz

EfficaciousMarigold avatar
EfficaciousMarigold
ER Diagrams Overview
14 questions

ER Diagrams Overview

BeauteousQuantum avatar
BeauteousQuantum
Database Design ER Diagrams Overview
10 questions
Database Design and ER Diagrams
45 questions
Use Quizgecko on...
Browser
Browser