SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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
 

Andere mochten auch

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
 

Andere mochten auch (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
 

Ähnlich wie Database Basics Review

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
 

Ähnlich wie Database Basics Review (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
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 

Kürzlich hochgeladen (20)

"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 

Database Basics Review

  • 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