Relational Schema in Database is a very important topic. This Presentation presents them very easily to understand.
Size: 231.07 KB
Language: en
Added: Feb 25, 2021
Slides: 14 pages
Slide Content
Welcome to our Presentation Presentation Topic: Relational Schema
Group Members Rifat Rahman ID: 162-15-1049 Hasan Haider ID: 162-15-1041 Arifur Jaman ID: 153-15-607 Shahedul Islam ID: 162-15-1029 Mohammad Salim Hosen ID: 162-15-1044
Relational Model After designing the conceptual model of Database using ER diagram, we need to convert the conceptual model in the relational model which can be implemented using any RDMBS languages like Oracle SQL, MySQL etc. Relational Model: Relational Model represents how data is stored in Relational Databases. A relational database stores data in the form of relations (tables).
Relational Schema Relational Schema is a important terminology of Relational Model. Relation Schema: A relation schema represents name of the relation with its attributes. e.g.; STUDENT (ROLL_NO, NAME, ADDRESS, PHONE and AGE) is relation schema for STUDENT. If a schema has more than 1 relation, it is called Relational Schema.
ER Diagram to Relational Schema Conversion The ER diagram represents the conceptual level of database design meanwhile the relational schema is the logical level for the database design. So to Convert ER diagram to Relational Schema We will be following some simple rules.
Entities and Simple Attributes: An entity type within ER diagram is turned into a table. Each attribute turns into a column (attribute) in the table. The key attribute of the entity is the primary key of the table which is usually underlined. Persons( personid , name, lastname , email )
Multi-Valued Attributes A multi-valued attribute is usually represented with a double-line oval. If you have a multi-valued attribute, take the attribute and turn it into a new entity or table of its own. Add the primary (id) column of the parent entity as a foreign key within the new table. Persons( personid , name, lastname , email ) Phones ( phoneid , personid , phone )
Specilization or Generalization Create tables for all higher-level entities. Create tables for lower-level entities. Add primary keys of higher-level entities in the table of lower-level entities. In lower-level tables, add all other attributes of lower-level entities.