This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: 1 115107 Tutorial 2 Jia Yi Lu 2009 S2 1 Creating Relational Databases Topics • Converting an ER model into a relational data model Jia Yi Lu 2009 S2 2 • Implementing a database using DBMS Converting an ER model into a relational data model • Relational model – the scheme/structure of a relational database – all data are organized in tables Output: a list of tables including their columns Pks and FKs Jia Yi Lu 2009 S2 3 a list of tables including their columns, Pks and FKs PK: PK: A primary key is a field or combination of fields that uniquely identify a record in a table. FK: FK: A foreign is a field used to link two tables together. It is a PK from one table and is insert it into the other table where it becomes FK. • How ? – one to many relationship type – many to many relationships type Converting one-to-many relationships • A separate relation (table) to represent each of the entity types • To represent the “one-to-many” relationship add an additional attribute to relationship, add an additional attribute to the “many” side corresponding to the primary key on the “one” side....
View Full Document
- Spring '10
- Relational Database, Relational model, Jia Yi Lu