SlideShare una empresa de Scribd logo
1 de 42
DARI BAB :  PHYSICAL ELEMENTS OF DATA Dimara Kusuma Hakim, ST. STRUKTUR DAN PENYIMPANAN BASISDATA
[object Object],Physical Storage
Physical Storage tables, views, and data types. ,[object Object],[object Object],[object Object],[object Object]
cont… ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Views ,[object Object],[object Object],[object Object]
cont… ,[object Object],[object Object]
cont… ,[object Object]
[object Object]
several reasons to use views : ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Data Types ,[object Object],[object Object],[object Object]
[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object]
User   -   De   fined Data Types ,[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],Referential Integrity
Referential Integrity ,[object Object],[object Object]
Referential Integrity  - Example ,[object Object],[object Object]
Primary Keys ,[object Object],[object Object]
Choosing PK from Candidate Keys - RULES ,[object Object],[object Object],[object Object]
Where is the Candidate Key ? ,[object Object]
Recommended for PK    SKU ,[object Object]
CREATE TABLE Products( sku  int  NOT NULL  PRIMARY KEY, modelnumber  varchar(25) NOT NULL, name  varchar(100) NOT NULL, manufacturer  varchar(25) NOT NULL, description  varchar(255) NOT NULL, warrantydetails  varchar(500) NOT NULL, price  money NOT NULL, weight  decimal(5, 2) NOT NULL, shippingweight  decimal(5, 2) NOT NULL, height  decimal(4, 2) NOT NULL, width  decimal(4, 2) NOT NULL, depth  decimal(4, 2) NOT NULL, isserialized  bit NOT NULL, status  tinyint NOT NULL )
a different column name in each table that holds the primary key ? ,[object Object]
[object Object]
Autonumber ? Identity / Sequence / etc.. ,[object Object]
GUID ? ,[object Object],[object Object]
Foreign Key ,[object Object],[object Object]
Data from the employee and vehicle tables showing the relationship between the tables
CREATE TABLE dbo.vehicle( objid int IDENTITY(1,1) NOT NULL, make varchar(50) NOT NULL, model varchar(50)NOT NULL, year char(4) NOT NULL, employee_objid int NOT NULL, CONSTRAINT PK_vehicle PRIMARY KEY (objid), CONSTRAINT FK_vehicle_employee FOREIGN KEY(employee_objid) REFERENCES employee (objid) )
what to do if an update or delete is issued on the parent  table  ? ,[object Object],[object Object],[object Object]
Another solution     CASCADE ,[object Object],[object Object]
Cascade ,[object Object],[object Object]
Constraints ,[object Object],[object Object]
Implementing Referential Integrity ,[object Object],[object Object],[object Object]
One-to-Many Relationships ,[object Object]
One-to-One Relationships ,[object Object],[object Object]
Many-to-Many Relationships ,[object Object],[object Object],[object Object]
Many-to-many relationship between a Student and a Class table
[object Object],[object Object],[object Object],Programming

Más contenido relacionado

La actualidad más candente

La actualidad más candente (18)

Sql basics
Sql basicsSql basics
Sql basics
 
SQL : introduction
SQL : introductionSQL : introduction
SQL : introduction
 
SQL for interview
SQL for interviewSQL for interview
SQL for interview
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
 
Structure query language (sql)
Structure query language (sql)Structure query language (sql)
Structure query language (sql)
 
Sql intro & ddl 1
Sql intro & ddl 1Sql intro & ddl 1
Sql intro & ddl 1
 
Chapter 4 Structured Query Language
Chapter 4 Structured Query LanguageChapter 4 Structured Query Language
Chapter 4 Structured Query Language
 
SQL Overview
SQL OverviewSQL Overview
SQL Overview
 
Lession 6.introduction to records
Lession 6.introduction to recordsLession 6.introduction to records
Lession 6.introduction to records
 
SQL_Part1
SQL_Part1SQL_Part1
SQL_Part1
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
 
Sql intro & ddl 1
Sql intro & ddl 1Sql intro & ddl 1
Sql intro & ddl 1
 
Introduction to SQL (for Chicago Booth MBA technology club)
Introduction to SQL (for Chicago Booth MBA technology club)Introduction to SQL (for Chicago Booth MBA technology club)
Introduction to SQL (for Chicago Booth MBA technology club)
 
12 SQL
12 SQL12 SQL
12 SQL
 
SQL Basics
SQL BasicsSQL Basics
SQL Basics
 
introdution to SQL and SQL functions
introdution to SQL and SQL functionsintrodution to SQL and SQL functions
introdution to SQL and SQL functions
 
SQL Queries Information
SQL Queries InformationSQL Queries Information
SQL Queries Information
 
Introduction to-sql
Introduction to-sqlIntroduction to-sql
Introduction to-sql
 

Destacado

Chapter 3 data model
Chapter 3 data modelChapter 3 data model
Chapter 3 data modelUra Euro
 
Database Management System Tutorial
Database Management System TutorialDatabase Management System Tutorial
Database Management System TutorialYeonYuRae
 
Introduction: Databases and Database Users
Introduction: Databases and Database UsersIntroduction: Databases and Database Users
Introduction: Databases and Database Userssontumax
 
Dbms tutorial
Dbms tutorialDbms tutorial
Dbms tutorialankindian
 
Chapter 2 Relational Data Model-part 3
Chapter 2 Relational Data Model-part 3Chapter 2 Relational Data Model-part 3
Chapter 2 Relational Data Model-part 3Eddyzulham Mahluzydde
 
Database system-DBMS
Database system-DBMSDatabase system-DBMS
Database system-DBMSikjsamuel
 
2 database system concepts and architecture
2 database system concepts and architecture2 database system concepts and architecture
2 database system concepts and architectureKumar
 
Architecture of-dbms-and-data-independence
Architecture of-dbms-and-data-independenceArchitecture of-dbms-and-data-independence
Architecture of-dbms-and-data-independenceAnuj Modi
 
Database Management Systems (DBMS)
Database Management Systems (DBMS)Database Management Systems (DBMS)
Database Management Systems (DBMS)Dimara Hakim
 
Database Architecture and Basic Concepts
Database Architecture and Basic ConceptsDatabase Architecture and Basic Concepts
Database Architecture and Basic ConceptsTony Wong
 

Destacado (14)

Relational Model
Relational ModelRelational Model
Relational Model
 
Chapter 3 data model
Chapter 3 data modelChapter 3 data model
Chapter 3 data model
 
Database Management System Tutorial
Database Management System TutorialDatabase Management System Tutorial
Database Management System Tutorial
 
Introduction: Databases and Database Users
Introduction: Databases and Database UsersIntroduction: Databases and Database Users
Introduction: Databases and Database Users
 
Dbms tutorial
Dbms tutorialDbms tutorial
Dbms tutorial
 
Chapter 2 Relational Data Model-part 3
Chapter 2 Relational Data Model-part 3Chapter 2 Relational Data Model-part 3
Chapter 2 Relational Data Model-part 3
 
Database system-DBMS
Database system-DBMSDatabase system-DBMS
Database system-DBMS
 
Multimedia Database
Multimedia DatabaseMultimedia Database
Multimedia Database
 
2 database system concepts and architecture
2 database system concepts and architecture2 database system concepts and architecture
2 database system concepts and architecture
 
Architecture of-dbms-and-data-independence
Architecture of-dbms-and-data-independenceArchitecture of-dbms-and-data-independence
Architecture of-dbms-and-data-independence
 
Dbms architecture
Dbms architectureDbms architecture
Dbms architecture
 
Database Management Systems (DBMS)
Database Management Systems (DBMS)Database Management Systems (DBMS)
Database Management Systems (DBMS)
 
Database Architecture and Basic Concepts
Database Architecture and Basic ConceptsDatabase Architecture and Basic Concepts
Database Architecture and Basic Concepts
 
ER Diagram
ER DiagramER Diagram
ER Diagram
 

Similar a Physical elements of data

Similar a Physical elements of data (20)

unit 1 ppt.pptx
unit 1 ppt.pptxunit 1 ppt.pptx
unit 1 ppt.pptx
 
12 SQL
12 SQL12 SQL
12 SQL
 
T-SQL Overview
T-SQL OverviewT-SQL Overview
T-SQL Overview
 
05 Create and Maintain Databases and Tables.pptx
05 Create and Maintain Databases and Tables.pptx05 Create and Maintain Databases and Tables.pptx
05 Create and Maintain Databases and Tables.pptx
 
Steps towards of sql server developer
Steps towards of sql server developerSteps towards of sql server developer
Steps towards of sql server developer
 
Physical Design and Development
Physical Design and DevelopmentPhysical Design and Development
Physical Design and Development
 
BIS06 Physical Database Models
BIS06 Physical Database ModelsBIS06 Physical Database Models
BIS06 Physical Database Models
 
BIS06 Physical Database Models
BIS06 Physical Database ModelsBIS06 Physical Database Models
BIS06 Physical Database Models
 
DBMS Part-3.pptx
DBMS Part-3.pptxDBMS Part-3.pptx
DBMS Part-3.pptx
 
Fg d
Fg dFg d
Fg d
 
SQL -Beginner To Intermediate Level.pdf
SQL -Beginner To Intermediate Level.pdfSQL -Beginner To Intermediate Level.pdf
SQL -Beginner To Intermediate Level.pdf
 
DATABASE-1.pptx
DATABASE-1.pptxDATABASE-1.pptx
DATABASE-1.pptx
 
18 database features
18 database features18 database features
18 database features
 
Module02
Module02Module02
Module02
 
Introduction to sql
Introduction to sqlIntroduction to sql
Introduction to sql
 
01 Microsoft Access
01 Microsoft Access01 Microsoft Access
01 Microsoft Access
 
SQL cheat sheet.pdf
SQL cheat sheet.pdfSQL cheat sheet.pdf
SQL cheat sheet.pdf
 
Oracle
OracleOracle
Oracle
 
MYSQL.ppt
MYSQL.pptMYSQL.ppt
MYSQL.ppt
 
PO WER - Piotr Mariat - Sql
PO WER - Piotr Mariat - SqlPO WER - Piotr Mariat - Sql
PO WER - Piotr Mariat - Sql
 

Más de Dimara Hakim

Más de Dimara Hakim (20)

Simulasi - Pertemuan IV
Simulasi - Pertemuan IVSimulasi - Pertemuan IV
Simulasi - Pertemuan IV
 
Simulasi - Pertemuan II
Simulasi - Pertemuan IISimulasi - Pertemuan II
Simulasi - Pertemuan II
 
Simulasi - Pertemuan III
Simulasi - Pertemuan IIISimulasi - Pertemuan III
Simulasi - Pertemuan III
 
Simulasi - Pertemuan I
Simulasi - Pertemuan ISimulasi - Pertemuan I
Simulasi - Pertemuan I
 
Transaction
TransactionTransaction
Transaction
 
modul6
modul6modul6
modul6
 
JENI Slides-Intro1-Bab06-Struktur kontrol
JENI Slides-Intro1-Bab06-Struktur kontrolJENI Slides-Intro1-Bab06-Struktur kontrol
JENI Slides-Intro1-Bab06-Struktur kontrol
 
Desain Top Down
Desain Top DownDesain Top Down
Desain Top Down
 
Pemrograman Modular
Pemrograman ModularPemrograman Modular
Pemrograman Modular
 
Struktur Level Program
Struktur Level ProgramStruktur Level Program
Struktur Level Program
 
Struktur Level Data
Struktur Level DataStruktur Level Data
Struktur Level Data
 
Denormalisasi
DenormalisasiDenormalisasi
Denormalisasi
 
query optimization
query optimizationquery optimization
query optimization
 
ELS
ELSELS
ELS
 
ASC
ASCASC
ASC
 
PENDAHULUAN. SISTEM, MODEL, DAN SIMULASI
PENDAHULUAN. SISTEM, MODEL, DAN SIMULASIPENDAHULUAN. SISTEM, MODEL, DAN SIMULASI
PENDAHULUAN. SISTEM, MODEL, DAN SIMULASI
 
Tugas 1
Tugas 1Tugas 1
Tugas 1
 
Disk-based storage
Disk-based storageDisk-based storage
Disk-based storage
 
Index
IndexIndex
Index
 
Normalisasi
NormalisasiNormalisasi
Normalisasi
 

Último

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
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
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
 
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
 
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
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
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
 

Último (20)

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
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
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
 
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
 
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
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
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
 

Physical elements of data

  • 1. DARI BAB : PHYSICAL ELEMENTS OF DATA Dimara Kusuma Hakim, ST. STRUKTUR DAN PENYIMPANAN BASISDATA
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25. CREATE TABLE Products( sku int NOT NULL PRIMARY KEY, modelnumber varchar(25) NOT NULL, name varchar(100) NOT NULL, manufacturer varchar(25) NOT NULL, description varchar(255) NOT NULL, warrantydetails varchar(500) NOT NULL, price money NOT NULL, weight decimal(5, 2) NOT NULL, shippingweight decimal(5, 2) NOT NULL, height decimal(4, 2) NOT NULL, width decimal(4, 2) NOT NULL, depth decimal(4, 2) NOT NULL, isserialized bit NOT NULL, status tinyint NOT NULL )
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31. Data from the employee and vehicle tables showing the relationship between the tables
  • 32. CREATE TABLE dbo.vehicle( objid int IDENTITY(1,1) NOT NULL, make varchar(50) NOT NULL, model varchar(50)NOT NULL, year char(4) NOT NULL, employee_objid int NOT NULL, CONSTRAINT PK_vehicle PRIMARY KEY (objid), CONSTRAINT FK_vehicle_employee FOREIGN KEY(employee_objid) REFERENCES employee (objid) )
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41. Many-to-many relationship between a Student and a Class table
  • 42.