1 / 28

Desing Data base Systems

Desing Data base Systems. Hierarchy database. The structure of data is like a tree Parent-c h i ldren relationship Pointers. Central depot. West depot. East depot. Győr. Pécs. Szeged. Debrecen. Net database. Dairy collection.

waite
Download Presentation

Desing Data base Systems

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. Desing Database Systems

  2. Hierarchy database • The structure of data is like a tree • Parent-children relationship • Pointers Central depot West depot East depot Győr Pécs Szeged Debrecen

  3. Net database Dairy collection The data are connected to eachother like a ring, and these rings are the net model. (graph) Centre Area of Fót Area of Tata Kiss János Tóth Elek Nagy Béla

  4. Relations database • You use databases to organize and relate tables • Databases provide the architecture for storing your data and have additional benefits as well. • More details in the next lecture

  5. Goals of the database design process: • understand your data and why you’re tracking it • • eliminate duplication of data • • eliminate redundant data • • eliminate meaningless data or data we don’t care about • • promote accuracy of data • • promote consistency of data • • make sure we can retrieve the information we need from the database • • support the business functions that use the database • • build a database that lends itself to future growth

  6. Entity Relationship Diagrams(ERD) • What is an ERD? An entity-relationship diagram is a data modeling technique that creates a graphical representation of the entities, and the relationships between entities, within an information system.

  7. Base Feaures of the ERD • Simple, visual, graphical device • The models most important parts are the entities and the relationships • It is built from the attributes of the entities

  8. Entity • An entity is an object or concept about which you want to store information.

  9. Description of the Entities The common description of the entity is a rectangle, which contains the name of the entity: Owner Dog

  10. Type of the Entities EntityAn entity is an object or concept about which you want to store information Weak EntityA weak entity is dependent on another entity to exist.

  11. Attributes • Attributes are the properties or characteristics of an entity.

  12. Description of the Attributes We can describe the attributes of the entity with a connecting ellipse: Date of birth Name Place of birth Sex Person

  13. Types of the Attributes • AttributesAttributes are the properties or characteristics of an entity. • Key attributeA key attribute is the unique, distinguishing characteristic of the entity. For example, an employee's social security number might be the employee's key attribute.

  14. Types of the Attributes • A multivalued attribute can have more than one value. For example, an employee entity can have multiple skill values. • Derived attributeA derived attribute is based on another attribute. For example, an employee's monthly salary is based on the employee's annual salary.

  15. Relationships • Relationships illustrate how two entities share information in the database structure.

  16. Description of the Relationships We can describe the relationship of the entity with a rhombus. We can mark the type of the relationship as well. 1 N Dog has Man If an entity takes part in a connection only partly, we describe it with single line, (Not all men have dogs), if it takes part totally we describe it with a bold line.( We don’t respect the stray dogs)

  17. Types of the Relationship • RelationshipsRelationships illustrate how two entities share information in the database structure. • Weak relationshipTo connect a weak entity with others, you should use a weak relationship notation.

  18. Cardinality Cardinality specifies how many instances of an entity relate to one instance of another entity.

  19. Cardinality • 1:1 (wife-husband) • 1: N (mother-children) • N:M (grandparents-grandchildren)

  20. 1 M N N Employs Employs Department Department Employees Employees 1 Department may employ Many Employees 1 Employee only has one department Examples - Relationship The diagram changes according to your real situation. You may also allow 1 Employee to work for Many Departments

  21. Participation • Total participation • Every child has a mother • Partial participation • Not every woman has a child

  22. 1 N Employs Department Employees Every department must have at least one employee. An employee need not work for any department. Indicate partial participation by using Example - Participation

  23. Recursive relationshipIn some cases, entities can be self-linked. For example, employees can supervise other employees.

  24. Attributes LName FName ID Address Entity Take Entity Description CNum CName Attributes Relationship Courses Students

  25. Simplified car selling model Years Name 1 N buy Car Customer Type Address Price Driving licence

  26. Data Problems: - don’t give back the relationships - repeating data… We have to study….

  27. Customer Years Name N N Car Selling Customer Type Car Price Extension of the model 1 1 sell buy Address Driving licence Date

More Related