GoConqr has a new look! Let us know what you think.

Flashcards

Databases Topic 4

jaydeeees Database University English 34 cards

Cards in this deck (34)

  1. 1Database DesignThree phase of database design:
    - Conceptual database design
    - Logical database design
    - Physical database design
  2. 2Conceptual Database DesignData model is built using the information in users' requirements specification.
    Conceptual data models can be drawn using Entity-Relationship diagrams, UML, or other modelling techniques.
  3. 3Logical database designProcess of constructing a model of the data used in an enterprise based on a specific data model, but independent of a particular DBMS and other physical considerations.
  4. 4Physical database designProcess of producing a description of the database implementation in secondary storage,
    Tailored to a specific DBMS system.
  5. 5Data ModellingData modelling is used to represent what data is of interest to an organisation - the main 'things' of interest, their characteristics, and how they are related to one another.
  6. 6Why bother with data models?Ensures we understand:
    - Each user's perspective of the data;
    - Nature of the data itself, independence of its physical representations;
    - Use of data across user views.
  7. 7Main purpose of data modellingTo assist in understanding the meaning (semantics) if the data;
    To facilitate communication about the information requirements.
  8. 8Entity Relationship Modelling (ER Modelling)Most commonly used techniques for conceptual data modelling
    - Entity Relationship Diagram (ERDs)
  9. 9What ER Modelling isA concise way of representing the data requirements of the problem at hand.
    Finding out what you know and don't know about that problem.
  10. 10What ER Modelling is NOTNOT something you do after you've built the database.
    NOT something you do because you been told to create an ERD.
  11. 11Entities and attributesAn entity is a something of relevance to the system being modeled - something you are interested in storing information.
    It has properties - characteristics that describe it, which we call attributes.
  12. 12Eg. EntitiesEMPLOYEE could be an entity in a data model for a HR system.
    EMPLOYEE would represent the set of all individual employees in the system.
    Each EMPLOYEE could be described by ATTRIBUTES such as name, address, phone etc.
  13. 13Drawing entities and attributesEntities are dawn with a rectangle and named with a simple singular, noun.
    Eg, EMPLOYEE, not EMPLOYEES
    Attributes are shown on the diagram in some notations, not in others.
  14. 14Identifier AttributesThere is always one attribute, or combination of attributes, whose value is unique and which we can use to identify the individual entity instance.
    Entities have identifiers, tables have primary keys.
  15. 15Entities and TablesPrinciple difference between an entity and a table (relation) is that you can express a relationship between entities without using foreign keys.
  16. 16Eg. Entities and attributesEMPLOYEE
    *EmployeeNumber
    EmployeeName
    Phone
    Email
    HireDate
    ReviewDate
  17. 17RelationshipsEntities can be associated with one another in relationships.
    A relationship can involve two or more entities.
  18. 18How many relationships?Eg. Each SCHOOL can have many STAFF members in it. However STAFF member belongs to only one SCHOOL
    Thus, the relationship between school and staff is one-to-many.
  19. 19Maximum CardinalityMaximum cardinality of a relationship describes the maximum number of occurrences of one entity that are associated with a single occurrence of the other.
  20. 20Minimum CardinalityThe minimum cardinality of a relationship describes the minimum number of occurrences of one entity that are associated with a single occurrence of the other.
  21. 21Minimum Cardinality (Optionality; Participation)Minimum cardinality of 0 means an optional relationship.
    Minimum cardinality of 1 means a mandatory relationship.
  22. 22Types of CardinalityThe basic types are:
    - One-to-one (1:1)
    - One-to-many (1:N)
    - Many-to-many (M:N)
  23. 23Many-to-many relationshipsM:N relationships are sometimes called non-specific relationships.
    -Can't implement a M:N relationship directly as tables
  24. 24Resolving an M:N relationship using an associative entityCreate another entity to represent the combination of the participating entities:
    Student - Offering (M:N)
    Student - Enrollment -Offering
    Enrollment is known as an associative entity (AE).
    The PKs of the AE is the combination of the PKs from the related entities.
  25. 25More than one relationship between the same entities.PERSON -leads- PROJECT
    PERSON - works on- PROJECT
  26. 26Weak EntitiesWeak entities are those whose instances cannot exist without an instance of another entity.
    - It is existence-dependent on the owner entity.
  27. 27How to construct an ERD?1. Identify entities, attributes, relationships
    2. Sketch the ERD
    - Normalize the ERD
    - Remove multivalued attributes, resolve M:N relationships
    3. Check for 'syntax errors'
  28. 28Another method for constructing an ERD1. Discover entities
    2. Construct context data model
    3. Identify keys of each entity
    4. Create fully attributes data model
    5. Improve data model using normalization
  29. 29How do you know if you've got it right?- Syntax errors: Errors in the 'grammar' of the technique - using notation incorrectly
    - Logic errors: Errors that mean that system isn't represented correctly
    - Run-time errors: Errors that mean system won't perform correctly over time
  30. 30Syntax Errors: CheckEntities named correctly? (Singular, Unique, Represent types not instances)
    Primary keys indicated?
    Relationships have complete cardinality indicated at both ends?
  31. 31Logic Errors: CheckAre your entities really entities?
    Attributes really attributes?
    Relationships really relationships?
    Correct entities related?
    Cardinality of relationship correct?
  32. 32Are your entities really entities?Eg. "Dream Home Real Estate has several branches..."
    Dream Home Real Estate is not a Entity.
    Entity should be named AGENCY.
  33. 33Modelling attributes as entitiesIf you cant define any attributes of an entity consider whether it is really an entity in itself or just and attribute of the related entity.
  34. 34Summary on ERDA valuable modelling tool for database design:
    Specify the meaning of a system
    Explain designer's understanding of the system to the client
    Basis for logical database design

Information

Description
Conceptual Database Design
Created by
jaydeeees · Aug 2015
Updated
Aug 27, 2016
Views
18
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?