SlideShare uma empresa Scribd logo
1 de 19
Review of database basics
Fields Attributes ‘ atomic’ Data types Primary key Validation rules Input masks L: letter A-Z (required) ?: letter A-Z (optional) 0: number 0-9 (required) 9: number (optional) range (or limit) check,  e.g. between 10 and 20, >10 list check,  e.g. ‘a’ OR ‘b’ OR ‘c’ (better as a dropdown list) Design a database to store personal information of 6 th  Form students
tables queries (select some data only) macros forms (on screen) reports (on paper) what the user can see add a new student see all students see all in Year 13 list of all students list of all in Year 13 ? Design a database to store personal information of 6 th  Form students
Primary key? Starter   £4.00 3 13 1125 £2.00 2 12 1125 £4.00 1 13 1124 £3.00 1 14 1123 £2.00 2 12 1123 £4.00 3 13 1122 £2.00 2 12 1122 price quantitySold stockNum orderNum
Database exercise
Project number Project name Employee number Employee name Rate category Hourly rate 1. consider single table Consider the Employees and Projects table on the webpage 2. assign primary key(s)? Project number  Project name Employee number  Employee name Rate category Hourly rate 5. spot another (less obvious) Employee number  Employee name Rate category Hourly rate Project number Employee number 6. …and remove it Employee number  Employee name Rate category Project number Employee number Project number  Project name Rate category Hourly rate 3. spot repeated groups of data… Project number  Project name Employee number  Employee name Rate category Hourly rate 4. …and remove them Employee number  Employee name Rate category Hourly rate Project number Employee number Project number  Project name
Entity-relationship  diagrams
Entity-relationship  diagrams
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
form student  ONE  form(s)  contains   ONE  student(s)  MANY  MANY event world record ONE  event(s)   has   ONE  world record(s) MANY  MANY employee project ONE  employee(s)  can work on   ONE  project(s)  MANY  MANY (  ) (  ) (  ) (  ) (  ) (  )
event world record ONE  event(s)   has   ONE  world record(s) MANY  MANY (  ) (  ) event world record might as well merge into the one table (nothing to be gained from having two) a ONE-to-ONE relationship
form student  ONE  form(s)  contains   ONE  student(s)  MANY  MANY (  ) (  ) This is what you are after It makes your database more efficient a ONE-to-MANY relationship form student
employee project ONE  employee(s)  can work on   ONE  project(s)  MANY  MANY (  ) (  ) Impossible to do in your database! Needs to be resolved… a MANY-to-MANY relationship employee project employee project employee_project Use a ‘link’ table between them  
husband wife mother child ward patient employee company car person main residence publisher book author book film actor film director student A-level course customer product stock item supplier ,[object Object],[object Object],[object Object],[object Object],[object Object]
Hospital ERD exercise A hospital is organised into wards. Each ward has a ward number and a name recorded, along with the number of beds in that ward.  Each ward is staffed by nurses. They have their staff number and name recorded and are assigned to a single ward. Each patient in the hospital has a patient identification number and their name, address and date of birth are recorded. Each patient is under the care of a single consultant and is assigned to a single ward.  Each consultant is responsible for a number of patients. Consultants have their staff number, name and specialism recorded. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Extension: Consider students, teachers and courses in the same way
Police Database exercise A system for tracking the officers on different cases is needed within a police unit. Each officer belongs to a single department. Officers are allocated to cases. Each officer can be allocated to more than one case at any given time and each case could be worked on by a number of officers. Each case has a single supervising officer (or ‘supervisor’) in charge of it who may supervise more than one case at a time. The following information needs to be stored: case ID number; type of case; description of the case; the date a case is opened (and closed); the result of the case; officers’ name, rank, department and gender; supervisors’ name and rank Extension : where would the date an officer was assigned to a case go? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Extension: Consider a library in the same way.
publisher book author film actor director student course customer product stock item supplier staff employee project Others to practice with
Project number Project name Employee number Employee name Rate category Hourly rate 1. consider single table Consider the Employees and Projects table on the webpage 2. assign primary key(s)? Project number  Project name Employee number  Employee name Rate category Hourly rate 5. spot another (less obvious) Employee number  Employee name Rate category Hourly rate Project number Employee number 6. …and remove it Employee number  Employee name Rate category Project number Employee number Project number  Project name Rate category Hourly rate 3. spot repeated groups of data… Project number  Project name Employee number  Employee name Rate category Hourly rate 4. …and remove them Employee number  Employee name Rate category Hourly rate Project number Employee number Project number  Project name
Impossible to do in your database! Needs to be ‘resolved’… a MANY-to-MANY relationship employee project 1. first ERD Consider the Employees and Projects table again: employee project employee_project Use a ‘link’ table between them 2. second ERD employee project employee_project Employee number Employee name Rate category Hourly rate Employee number Project number Project number Project name 3. consider attributes 4. spot repeated group of data and remove  employee project employee_project Employee number Employee name Rate category Employee number Project number Project number Project name rate Rate category Hourly rate

Mais conteúdo relacionado

Mais procurados

INF 103(ASH) Learn/newtonhelp.com
INF 103(ASH) Learn/newtonhelp.comINF 103(ASH) Learn/newtonhelp.com
INF 103(ASH) Learn/newtonhelp.comlechenau48
 
Entity-Relationship Data Model in DBMS
Entity-Relationship Data Model in DBMSEntity-Relationship Data Model in DBMS
Entity-Relationship Data Model in DBMSProf Ansari
 
03 Ch3 Notes Revised
03 Ch3 Notes Revised03 Ch3 Notes Revised
03 Ch3 Notes Revisedguest6f408c
 
Data Entry in CSpro
Data Entry in CSproData Entry in CSpro
Data Entry in CSproprabhustat
 
Data modelingpresentation
Data modelingpresentationData modelingpresentation
Data modelingpresentationfikirabc
 
Data Models & Introduction to UML
Data Models & Introduction to UML Data Models & Introduction to UML
Data Models & Introduction to UML نبيله نواز
 
Introduction to Data Modeling
Introduction to Data ModelingIntroduction to Data Modeling
Introduction to Data Modelingguest02ff4b5
 
Skipl List implementation - Part 2
Skipl List implementation - Part 2Skipl List implementation - Part 2
Skipl List implementation - Part 2Amrith Krishna
 

Mais procurados (9)

INF 103(ASH) Learn/newtonhelp.com
INF 103(ASH) Learn/newtonhelp.comINF 103(ASH) Learn/newtonhelp.com
INF 103(ASH) Learn/newtonhelp.com
 
Entity-Relationship Data Model in DBMS
Entity-Relationship Data Model in DBMSEntity-Relationship Data Model in DBMS
Entity-Relationship Data Model in DBMS
 
03 Ch3 Notes Revised
03 Ch3 Notes Revised03 Ch3 Notes Revised
03 Ch3 Notes Revised
 
Data Entry in CSpro
Data Entry in CSproData Entry in CSpro
Data Entry in CSpro
 
Data modelingpresentation
Data modelingpresentationData modelingpresentation
Data modelingpresentation
 
Unit02 dbms
Unit02 dbmsUnit02 dbms
Unit02 dbms
 
Data Models & Introduction to UML
Data Models & Introduction to UML Data Models & Introduction to UML
Data Models & Introduction to UML
 
Introduction to Data Modeling
Introduction to Data ModelingIntroduction to Data Modeling
Introduction to Data Modeling
 
Skipl List implementation - Part 2
Skipl List implementation - Part 2Skipl List implementation - Part 2
Skipl List implementation - Part 2
 

Destaque

Database management systems 3 - Data Modelling
Database management systems 3 - Data ModellingDatabase management systems 3 - Data Modelling
Database management systems 3 - Data ModellingNickkisha Farrell
 
Erd for teaching staff
Erd for teaching staffErd for teaching staff
Erd for teaching staffMrsjalland
 
A2 databases
A2 databasesA2 databases
A2 databasesc.west
 
Normalization
NormalizationNormalization
NormalizationJTHSICT
 
Er diagram practical examples
Er diagram practical examplesEr diagram practical examples
Er diagram practical examplesRahul Khanwani
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship DiagramRakhi Mukherji
 
Entity Relationship Diagram presentation
Entity Relationship Diagram presentationEntity Relationship Diagram presentation
Entity Relationship Diagram presentationSopov Chan
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship DiagramShakila Mahjabin
 
Entity relationship diagram (erd)
Entity relationship diagram (erd)Entity relationship diagram (erd)
Entity relationship diagram (erd)tameemyousaf
 

Destaque (11)

Database management systems 3 - Data Modelling
Database management systems 3 - Data ModellingDatabase management systems 3 - Data Modelling
Database management systems 3 - Data Modelling
 
Erd for teaching staff
Erd for teaching staffErd for teaching staff
Erd for teaching staff
 
A2 databases
A2 databasesA2 databases
A2 databases
 
Normalization
NormalizationNormalization
Normalization
 
Er diagram practical examples
Er diagram practical examplesEr diagram practical examples
Er diagram practical examples
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
 
Erd examples
Erd examplesErd examples
Erd examples
 
Entity Relationship Diagram presentation
Entity Relationship Diagram presentationEntity Relationship Diagram presentation
Entity Relationship Diagram presentation
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
 
Entity relationship diagram (erd)
Entity relationship diagram (erd)Entity relationship diagram (erd)
Entity relationship diagram (erd)
 
Erd practice exercises
Erd practice exercisesErd practice exercises
Erd practice exercises
 

Semelhante a databases2

Excel analysis assignment this is an independent assignment me
Excel analysis assignment this is an independent assignment meExcel analysis assignment this is an independent assignment me
Excel analysis assignment this is an independent assignment mejoney4
 
Normalization
NormalizationNormalization
NormalizationAbuSahama
 
Introduction to Data Science With R Notes
Introduction to Data Science With R NotesIntroduction to Data Science With R Notes
Introduction to Data Science With R NotesLakshmiSarvani6
 
Introduction of Database Design and Development
Introduction of Database Design and DevelopmentIntroduction of Database Design and Development
Introduction of Database Design and DevelopmentEr. Nawaraj Bhandari
 
Object oriented software engineering concepts
Object oriented software engineering conceptsObject oriented software engineering concepts
Object oriented software engineering conceptsKomal Singh
 
1 Exploratory Data Analysis (EDA) by Melvin Ott, PhD.docx
1 Exploratory Data Analysis (EDA) by Melvin Ott, PhD.docx1 Exploratory Data Analysis (EDA) by Melvin Ott, PhD.docx
1 Exploratory Data Analysis (EDA) by Melvin Ott, PhD.docxhoney725342
 
Aen007 Kenigsberg 091807
Aen007 Kenigsberg 091807Aen007 Kenigsberg 091807
Aen007 Kenigsberg 091807Dreamforce07
 
CIS 515 Enhance teaching / snaptutorial.com
CIS 515 Enhance teaching / snaptutorial.com CIS 515 Enhance teaching / snaptutorial.com
CIS 515 Enhance teaching / snaptutorial.com donaldzs56
 
er diagram case study.pdf
er diagram case study.pdfer diagram case study.pdf
er diagram case study.pdfSabitraGyawali1
 
Data Modeling PPT
Data Modeling PPTData Modeling PPT
Data Modeling PPTTrinath
 
MISY 3331 Advanced Database ConceptsAssignment 3Dr. Sotirios .docx
MISY 3331 Advanced Database ConceptsAssignment 3Dr.  Sotirios .docxMISY 3331 Advanced Database ConceptsAssignment 3Dr.  Sotirios .docx
MISY 3331 Advanced Database ConceptsAssignment 3Dr. Sotirios .docxaltheaboyer
 
Discovering User's Topics of Interest in Recommender Systems
Discovering User's Topics of Interest in Recommender SystemsDiscovering User's Topics of Interest in Recommender Systems
Discovering User's Topics of Interest in Recommender SystemsGabriel Moreira
 

Semelhante a databases2 (20)

Excel analysis assignment this is an independent assignment me
Excel analysis assignment this is an independent assignment meExcel analysis assignment this is an independent assignment me
Excel analysis assignment this is an independent assignment me
 
Normalization
NormalizationNormalization
Normalization
 
Computer sec2-1st term
Computer sec2-1st termComputer sec2-1st term
Computer sec2-1st term
 
Introduction to Data Science With R Notes
Introduction to Data Science With R NotesIntroduction to Data Science With R Notes
Introduction to Data Science With R Notes
 
Introduction of Database Design and Development
Introduction of Database Design and DevelopmentIntroduction of Database Design and Development
Introduction of Database Design and Development
 
Object oriented software engineering concepts
Object oriented software engineering conceptsObject oriented software engineering concepts
Object oriented software engineering concepts
 
1 Exploratory Data Analysis (EDA) by Melvin Ott, PhD.docx
1 Exploratory Data Analysis (EDA) by Melvin Ott, PhD.docx1 Exploratory Data Analysis (EDA) by Melvin Ott, PhD.docx
1 Exploratory Data Analysis (EDA) by Melvin Ott, PhD.docx
 
Measurement And Validation
Measurement And ValidationMeasurement And Validation
Measurement And Validation
 
Sq lite module4
Sq lite module4Sq lite module4
Sq lite module4
 
DATA MODELING.pptx
DATA MODELING.pptxDATA MODELING.pptx
DATA MODELING.pptx
 
Database part3-
Database part3-Database part3-
Database part3-
 
Data Models
Data ModelsData Models
Data Models
 
Aen007 Kenigsberg 091807
Aen007 Kenigsberg 091807Aen007 Kenigsberg 091807
Aen007 Kenigsberg 091807
 
CIS 515 Enhance teaching / snaptutorial.com
CIS 515 Enhance teaching / snaptutorial.com CIS 515 Enhance teaching / snaptutorial.com
CIS 515 Enhance teaching / snaptutorial.com
 
Db lec 02_new
Db lec 02_newDb lec 02_new
Db lec 02_new
 
er diagram case study.pdf
er diagram case study.pdfer diagram case study.pdf
er diagram case study.pdf
 
Data Modeling PPT
Data Modeling PPTData Modeling PPT
Data Modeling PPT
 
MISY 3331 Advanced Database ConceptsAssignment 3Dr. Sotirios .docx
MISY 3331 Advanced Database ConceptsAssignment 3Dr.  Sotirios .docxMISY 3331 Advanced Database ConceptsAssignment 3Dr.  Sotirios .docx
MISY 3331 Advanced Database ConceptsAssignment 3Dr. Sotirios .docx
 
Bc0041
Bc0041Bc0041
Bc0041
 
Discovering User's Topics of Interest in Recommender Systems
Discovering User's Topics of Interest in Recommender SystemsDiscovering User's Topics of Interest in Recommender Systems
Discovering User's Topics of Interest in Recommender Systems
 

Mais de c.west

Do Review Improve
Do Review ImproveDo Review Improve
Do Review Improvec.west
 
Making A Presentation (Student Version)
Making A Presentation (Student Version)Making A Presentation (Student Version)
Making A Presentation (Student Version)c.west
 
Reading Level Tools In Word
Reading Level Tools In WordReading Level Tools In Word
Reading Level Tools In Wordc.west
 
Software
SoftwareSoftware
Softwarec.west
 
Printing & Colour Separation
Printing & Colour SeparationPrinting & Colour Separation
Printing & Colour Separationc.west
 
Hardware
HardwareHardware
Hardwarec.west
 
Stage 3 - Creating your project
Stage 3 - Creating your projectStage 3 - Creating your project
Stage 3 - Creating your projectc.west
 
Stage 2 - Deciding on a project
Stage 2 - Deciding on a projectStage 2 - Deciding on a project
Stage 2 - Deciding on a projectc.west
 
Stage 1 - Finding out
Stage 1 - Finding outStage 1 - Finding out
Stage 1 - Finding outc.west
 
Environment Collages G2
Environment Collages G2Environment Collages G2
Environment Collages G2c.west
 
Environment Collages G1
Environment Collages G1Environment Collages G1
Environment Collages G1c.west
 
Unit 6 Poster And Advert Design
Unit 6   Poster And Advert DesignUnit 6   Poster And Advert Design
Unit 6 Poster And Advert Designc.west
 
Unit 5 Page Design
Unit 5   Page DesignUnit 5   Page Design
Unit 5 Page Designc.west
 
Unit 4 Using The Internet
Unit 4   Using The InternetUnit 4   Using The Internet
Unit 4 Using The Internetc.west
 
Unit 3 Spreadsheets
Unit 3   SpreadsheetsUnit 3   Spreadsheets
Unit 3 Spreadsheetsc.west
 
Unit 2 Business Documents
Unit 2   Business DocumentsUnit 2   Business Documents
Unit 2 Business Documentsc.west
 
Unit 1 Logo Design
Unit 1   Logo DesignUnit 1   Logo Design
Unit 1 Logo Designc.west
 
5. Production Form
5. Production Form5. Production Form
5. Production Formc.west
 
4. Delivery Notes
4. Delivery Notes4. Delivery Notes
4. Delivery Notesc.west
 
3. Order Form
3. Order Form3. Order Form
3. Order Formc.west
 

Mais de c.west (20)

Do Review Improve
Do Review ImproveDo Review Improve
Do Review Improve
 
Making A Presentation (Student Version)
Making A Presentation (Student Version)Making A Presentation (Student Version)
Making A Presentation (Student Version)
 
Reading Level Tools In Word
Reading Level Tools In WordReading Level Tools In Word
Reading Level Tools In Word
 
Software
SoftwareSoftware
Software
 
Printing & Colour Separation
Printing & Colour SeparationPrinting & Colour Separation
Printing & Colour Separation
 
Hardware
HardwareHardware
Hardware
 
Stage 3 - Creating your project
Stage 3 - Creating your projectStage 3 - Creating your project
Stage 3 - Creating your project
 
Stage 2 - Deciding on a project
Stage 2 - Deciding on a projectStage 2 - Deciding on a project
Stage 2 - Deciding on a project
 
Stage 1 - Finding out
Stage 1 - Finding outStage 1 - Finding out
Stage 1 - Finding out
 
Environment Collages G2
Environment Collages G2Environment Collages G2
Environment Collages G2
 
Environment Collages G1
Environment Collages G1Environment Collages G1
Environment Collages G1
 
Unit 6 Poster And Advert Design
Unit 6   Poster And Advert DesignUnit 6   Poster And Advert Design
Unit 6 Poster And Advert Design
 
Unit 5 Page Design
Unit 5   Page DesignUnit 5   Page Design
Unit 5 Page Design
 
Unit 4 Using The Internet
Unit 4   Using The InternetUnit 4   Using The Internet
Unit 4 Using The Internet
 
Unit 3 Spreadsheets
Unit 3   SpreadsheetsUnit 3   Spreadsheets
Unit 3 Spreadsheets
 
Unit 2 Business Documents
Unit 2   Business DocumentsUnit 2   Business Documents
Unit 2 Business Documents
 
Unit 1 Logo Design
Unit 1   Logo DesignUnit 1   Logo Design
Unit 1 Logo Design
 
5. Production Form
5. Production Form5. Production Form
5. Production Form
 
4. Delivery Notes
4. Delivery Notes4. Delivery Notes
4. Delivery Notes
 
3. Order Form
3. Order Form3. Order Form
3. Order Form
 

Último

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
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
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
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
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
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
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 

Último (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
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
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
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
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 

databases2

  • 2. Fields Attributes ‘ atomic’ Data types Primary key Validation rules Input masks L: letter A-Z (required) ?: letter A-Z (optional) 0: number 0-9 (required) 9: number (optional) range (or limit) check, e.g. between 10 and 20, >10 list check, e.g. ‘a’ OR ‘b’ OR ‘c’ (better as a dropdown list) Design a database to store personal information of 6 th Form students
  • 3. tables queries (select some data only) macros forms (on screen) reports (on paper) what the user can see add a new student see all students see all in Year 13 list of all students list of all in Year 13 ? Design a database to store personal information of 6 th Form students
  • 4. Primary key? Starter £4.00 3 13 1125 £2.00 2 12 1125 £4.00 1 13 1124 £3.00 1 14 1123 £2.00 2 12 1123 £4.00 3 13 1122 £2.00 2 12 1122 price quantitySold stockNum orderNum
  • 6. Project number Project name Employee number Employee name Rate category Hourly rate 1. consider single table Consider the Employees and Projects table on the webpage 2. assign primary key(s)? Project number Project name Employee number Employee name Rate category Hourly rate 5. spot another (less obvious) Employee number Employee name Rate category Hourly rate Project number Employee number 6. …and remove it Employee number Employee name Rate category Project number Employee number Project number Project name Rate category Hourly rate 3. spot repeated groups of data… Project number Project name Employee number Employee name Rate category Hourly rate 4. …and remove them Employee number Employee name Rate category Hourly rate Project number Employee number Project number Project name
  • 9.
  • 10. form student ONE form(s) contains ONE student(s) MANY MANY event world record ONE event(s) has ONE world record(s) MANY MANY employee project ONE employee(s) can work on ONE project(s) MANY MANY ( ) ( ) ( ) ( ) ( ) ( )
  • 11. event world record ONE event(s) has ONE world record(s) MANY MANY ( ) ( ) event world record might as well merge into the one table (nothing to be gained from having two) a ONE-to-ONE relationship
  • 12. form student ONE form(s) contains ONE student(s) MANY MANY ( ) ( ) This is what you are after It makes your database more efficient a ONE-to-MANY relationship form student
  • 13. employee project ONE employee(s) can work on ONE project(s) MANY MANY ( ) ( ) Impossible to do in your database! Needs to be resolved… a MANY-to-MANY relationship employee project employee project employee_project Use a ‘link’ table between them  
  • 14.
  • 15.
  • 16.
  • 17. publisher book author film actor director student course customer product stock item supplier staff employee project Others to practice with
  • 18. Project number Project name Employee number Employee name Rate category Hourly rate 1. consider single table Consider the Employees and Projects table on the webpage 2. assign primary key(s)? Project number Project name Employee number Employee name Rate category Hourly rate 5. spot another (less obvious) Employee number Employee name Rate category Hourly rate Project number Employee number 6. …and remove it Employee number Employee name Rate category Project number Employee number Project number Project name Rate category Hourly rate 3. spot repeated groups of data… Project number Project name Employee number Employee name Rate category Hourly rate 4. …and remove them Employee number Employee name Rate category Hourly rate Project number Employee number Project number Project name
  • 19. Impossible to do in your database! Needs to be ‘resolved’… a MANY-to-MANY relationship employee project 1. first ERD Consider the Employees and Projects table again: employee project employee_project Use a ‘link’ table between them 2. second ERD employee project employee_project Employee number Employee name Rate category Hourly rate Employee number Project number Project number Project name 3. consider attributes 4. spot repeated group of data and remove employee project employee_project Employee number Employee name Rate category Employee number Project number Project number Project name rate Rate category Hourly rate