SlideShare a Scribd company logo
1 of 32
Download to read offline
Database Design
By
Joysy John
Code First Girls
15 Aug 2013
Agenda
• Introduction
• Tables and Keys
• Types of Relationships
• Normalisation
• Q&A
Computer Engineer, MBA
Founder, Social Entrepreneur
Angel Investor, Ex-Banker, Mother
Education
Corporate & Entrepreneurial Career
Introduction
Tables and Keys
• Entities: An entity is a distinct clearly identifiable object of the database e.g. Book
• Attribute: Each Entity is characterised by a set of attributes e.g. Title
• Entity set: Set of all entities having attributes of the same type
• Relationships: A relationship is a mapping between entity sets
Book
Acc_No
Title
Author
YearofPub
Users
Card_No
Name
Address
Borrowed_By
Card_No
Acc_No
DOI
*
1
*
1
Sample data – library data
Acc_No Name Address Title Author YearofPub CardNo DOI
4Doe Ray 4 sunshine lane Mindset Carol Dweck 2005 103 01/06/2013
8Doe Ray 4 sunshine lane Learning Mindset Carol Dweck 2006 103 01/06/2013
2Jacob John 7 Deer St Mindset Carol Dweck 2005 101 22/05/2013
1John Smith 34 London Road Happy Days A.J. Roy 2009 100 23/07/2013
5John Smith 34 London Road Learn to code Tom Close 2013 100 23/07/2013
6John Smith 34 London Road Ruby on Rails M.H. Bedi 2010 100 23/07/2013
3Mary jane 2 mill drive The art of writing M.B. Thomas 2001 102 15/08/2013
7Mary jane 2 mill drive Learn to code Tom Close 2013 102 15/08/2013
9Mary jane 2 mill drive ABC of photography K. Janice 2012 102 15/08/2013
Exercise: Managing a school
Create Students and Classes tables in a database for managing a
school.
• Each student can register for many classes and each class can
have many students.
• Students must register for a class with their firstname, lastname
and age. They can select multiple classes within the same
subject.
• Class has a class name and belongs to a subject and is taught in
venue assigned to the class.
School data tables
Students
Student_ID
FirstName
LastName
Age
Classes
Class_id
className
Subject
StudentsClasses
Student_ID
Class_id
venue
*
1
*
1
Basic rules:
• One table for one entity set
• One column for one attribute
• One table for one relationship set
• Columns are:
• Key attributes of all participating
entity sets
• All descriptive attributes
1:1 Relationship
N:1 Relationship N:M Relationship
1:N Relationship
Types of Relationships
Example of 1:1 Relationship
1 1
Person
person_id
first_name
last_name
Spouse_contact
person_id
Spouse_name
Email
Phone
Example of 1:N Relationship
* 1
Person
person_id
name
country_id
Country
country_id
country_name
capital
Example of N:M Relationship
*
1
Shop
shop_id
shop_name
location
Prices
product_id
shop_id
price
Product
product_id
product_name
category
1
*
A many-to-many relationship is one where two data tables or entities have
multiple rows that are connected to one or more rows in the other table.
Process of Organising Your Data
What is Normalisation?
Why Normalise?
• Reduces redundancies and dependencies
• Saves space
• Reduces data anomalies
• Makes for easier maintenance
Normal Form
• Normal Forms (NF) are “standardised” rules
• Each builds off the previous form
• Higher the number the more normalised the
data id (1NF, 2NF, 3NF, etc)
Example Data
Parents student Name emergency contact student age classroom teacher school year grade level
John Smith John Smith Jr John Smith 10 C110 Ms Brown 2010 6
Mary Smith John Smith Jr John Smith 10 C110 Ms Brown 2010 6
John Smith John Smith Jr Mary Smith 10 C80 Mr Green 2010 6
Mary Smith John Smith Jr Mary Smith 10 C80 Mr Green 2010 6
John Smith April Smith John Smith 9 A25 Ms Baker 2009 5
Mary Smith April Smith John Smith 9 A25 Ms Baker 2009 5
John Smith April Smith Mary Smith 9 A99 Mr Close 2009 5
Mary Smith April Smith Mary Smith 9 A99 Mr Close 2009 5
Dave Harris Julie Harris Dave Harris 6 A10 Mr Jones 2010 3
Base Table We Will Start With
First Normal Form
• Remove “repeating” data
• A primary key can be defined
Primary key can uniquely
identify any row in a table
Parents student Name emergency contact student age classroom teacher school year grade level
John Smith John Smith Jr John Smith 10 C110 Ms Brown 2010 6
Mary Smith John Smith Jr John Smith 10 C110 Ms Brown 2010 6
John Smith John Smith Jr Mary Smith 10 C80 Mr Green 2010 6
Mary Smith John Smith Jr Mary Smith 10 C80 Mr Green 2010 6
John Smith April Smith John Smith 9 A25 Ms Baker 2009 5
Mary Smith April Smith John Smith 9 A25 Ms Baker 2009 5
John Smith April Smith Mary Smith 9 A99 Mr Close 2009 5
Mary Smith April Smith Mary Smith 9 A99 Mr Close 2009 5
Dave Harris Julie Harris Dave Harris 6 A10 Mr Jones 2010 3
Second Normal Form
• Meet all requirements of 1NF
• Isolate repeated subsets of data
• Create the relationships
Normalised tables
*
*
*
1
Normalised tables with relationships
1
1
*
1
Third Normal Form
• Meet all requirements of 2NF
• Pull out data that is not dependent on primary
key
Exercise: Task Table
Task
task_id
Name
Due_date
description
project
completed
Project
project_id
name
Task
task_id
Name
Due_date
description
Project_id
completed
Allow Tasks to be assigned to a user
(1:N relationship)
Task
task_id
Name
Due_date
description
Project_id
completed
User_id
User
user_id
name
*
1
Allow Tasks to be tagged with tags
(N:M relationship)
Task
task_id
name
due_date
description
project_id
completed
Tag
tag_id
name
TagTask
id
tag_id
task_id
*
1
* 1
Basics of Database Design

More Related Content

Similar to Basics of Database Design

3-db-er_3-db-er_3-db-er_3-db-er_3-db-er.pptx
3-db-er_3-db-er_3-db-er_3-db-er_3-db-er.pptx3-db-er_3-db-er_3-db-er_3-db-er_3-db-er.pptx
3-db-er_3-db-er_3-db-er_3-db-er_3-db-er.pptxBUSHRASHAIKH804312
 
Geek Sync | Looking "Normal" and Seeing "Stars": Table Designs Working Together
Geek Sync | Looking "Normal" and Seeing "Stars": Table Designs Working TogetherGeek Sync | Looking "Normal" and Seeing "Stars": Table Designs Working Together
Geek Sync | Looking "Normal" and Seeing "Stars": Table Designs Working TogetherIDERA Software
 
Logical Design and Conceptual Database Design
Logical Design and Conceptual Database DesignLogical Design and Conceptual Database Design
Logical Design and Conceptual Database DesignEr. Nawaraj Bhandari
 

Similar to Basics of Database Design (6)

TNS ppt.pptx
TNS ppt.pptxTNS ppt.pptx
TNS ppt.pptx
 
3-db-er_3-db-er_3-db-er_3-db-er_3-db-er.pptx
3-db-er_3-db-er_3-db-er_3-db-er_3-db-er.pptx3-db-er_3-db-er_3-db-er_3-db-er_3-db-er.pptx
3-db-er_3-db-er_3-db-er_3-db-er_3-db-er.pptx
 
603s129
603s129603s129
603s129
 
Geek Sync | Looking "Normal" and Seeing "Stars": Table Designs Working Together
Geek Sync | Looking "Normal" and Seeing "Stars": Table Designs Working TogetherGeek Sync | Looking "Normal" and Seeing "Stars": Table Designs Working Together
Geek Sync | Looking "Normal" and Seeing "Stars": Table Designs Working Together
 
Data dictionary
Data dictionaryData dictionary
Data dictionary
 
Logical Design and Conceptual Database Design
Logical Design and Conceptual Database DesignLogical Design and Conceptual Database Design
Logical Design and Conceptual Database Design
 

Recently uploaded

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 

Recently uploaded (20)

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

Basics of Database Design

  • 1. Database Design By Joysy John Code First Girls 15 Aug 2013
  • 2. Agenda • Introduction • Tables and Keys • Types of Relationships • Normalisation • Q&A
  • 3. Computer Engineer, MBA Founder, Social Entrepreneur Angel Investor, Ex-Banker, Mother Education Corporate & Entrepreneurial Career Introduction
  • 4. Tables and Keys • Entities: An entity is a distinct clearly identifiable object of the database e.g. Book • Attribute: Each Entity is characterised by a set of attributes e.g. Title • Entity set: Set of all entities having attributes of the same type • Relationships: A relationship is a mapping between entity sets Book Acc_No Title Author YearofPub Users Card_No Name Address Borrowed_By Card_No Acc_No DOI * 1 * 1
  • 5. Sample data – library data Acc_No Name Address Title Author YearofPub CardNo DOI 4Doe Ray 4 sunshine lane Mindset Carol Dweck 2005 103 01/06/2013 8Doe Ray 4 sunshine lane Learning Mindset Carol Dweck 2006 103 01/06/2013 2Jacob John 7 Deer St Mindset Carol Dweck 2005 101 22/05/2013 1John Smith 34 London Road Happy Days A.J. Roy 2009 100 23/07/2013 5John Smith 34 London Road Learn to code Tom Close 2013 100 23/07/2013 6John Smith 34 London Road Ruby on Rails M.H. Bedi 2010 100 23/07/2013 3Mary jane 2 mill drive The art of writing M.B. Thomas 2001 102 15/08/2013 7Mary jane 2 mill drive Learn to code Tom Close 2013 102 15/08/2013 9Mary jane 2 mill drive ABC of photography K. Janice 2012 102 15/08/2013
  • 6. Exercise: Managing a school Create Students and Classes tables in a database for managing a school. • Each student can register for many classes and each class can have many students. • Students must register for a class with their firstname, lastname and age. They can select multiple classes within the same subject. • Class has a class name and belongs to a subject and is taught in venue assigned to the class.
  • 8. Basic rules: • One table for one entity set • One column for one attribute • One table for one relationship set • Columns are: • Key attributes of all participating entity sets • All descriptive attributes
  • 9. 1:1 Relationship N:1 Relationship N:M Relationship 1:N Relationship Types of Relationships
  • 10. Example of 1:1 Relationship 1 1 Person person_id first_name last_name Spouse_contact person_id Spouse_name Email Phone
  • 11. Example of 1:N Relationship * 1 Person person_id name country_id Country country_id country_name capital
  • 12. Example of N:M Relationship * 1 Shop shop_id shop_name location Prices product_id shop_id price Product product_id product_name category 1 * A many-to-many relationship is one where two data tables or entities have multiple rows that are connected to one or more rows in the other table.
  • 13. Process of Organising Your Data What is Normalisation?
  • 14. Why Normalise? • Reduces redundancies and dependencies • Saves space • Reduces data anomalies • Makes for easier maintenance
  • 15. Normal Form • Normal Forms (NF) are “standardised” rules • Each builds off the previous form • Higher the number the more normalised the data id (1NF, 2NF, 3NF, etc)
  • 16. Example Data Parents student Name emergency contact student age classroom teacher school year grade level John Smith John Smith Jr John Smith 10 C110 Ms Brown 2010 6 Mary Smith John Smith Jr John Smith 10 C110 Ms Brown 2010 6 John Smith John Smith Jr Mary Smith 10 C80 Mr Green 2010 6 Mary Smith John Smith Jr Mary Smith 10 C80 Mr Green 2010 6 John Smith April Smith John Smith 9 A25 Ms Baker 2009 5 Mary Smith April Smith John Smith 9 A25 Ms Baker 2009 5 John Smith April Smith Mary Smith 9 A99 Mr Close 2009 5 Mary Smith April Smith Mary Smith 9 A99 Mr Close 2009 5 Dave Harris Julie Harris Dave Harris 6 A10 Mr Jones 2010 3
  • 17. Base Table We Will Start With
  • 18. First Normal Form • Remove “repeating” data • A primary key can be defined Primary key can uniquely identify any row in a table
  • 19. Parents student Name emergency contact student age classroom teacher school year grade level John Smith John Smith Jr John Smith 10 C110 Ms Brown 2010 6 Mary Smith John Smith Jr John Smith 10 C110 Ms Brown 2010 6 John Smith John Smith Jr Mary Smith 10 C80 Mr Green 2010 6 Mary Smith John Smith Jr Mary Smith 10 C80 Mr Green 2010 6 John Smith April Smith John Smith 9 A25 Ms Baker 2009 5 Mary Smith April Smith John Smith 9 A25 Ms Baker 2009 5 John Smith April Smith Mary Smith 9 A99 Mr Close 2009 5 Mary Smith April Smith Mary Smith 9 A99 Mr Close 2009 5 Dave Harris Julie Harris Dave Harris 6 A10 Mr Jones 2010 3
  • 20.
  • 21. Second Normal Form • Meet all requirements of 1NF • Isolate repeated subsets of data • Create the relationships
  • 22.
  • 23.
  • 24.
  • 26. * * * 1 Normalised tables with relationships 1 1 * 1
  • 27. Third Normal Form • Meet all requirements of 2NF • Pull out data that is not dependent on primary key
  • 28.
  • 30. Allow Tasks to be assigned to a user (1:N relationship) Task task_id Name Due_date description Project_id completed User_id User user_id name * 1
  • 31. Allow Tasks to be tagged with tags (N:M relationship) Task task_id name due_date description project_id completed Tag tag_id name TagTask id tag_id task_id * 1 * 1