SlideShare una empresa de Scribd logo
1 de 36
Creating a Database Chapter 13
DDL - D ata  D efinition  L anguage ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
DDL consists of ,[object Object],[object Object],[object Object]
Create Table ,[object Object],[object Object],[object Object],[object Object],[object Object]
Create Table (contd.)-Column Definitions ,[object Object],[object Object],[object Object],[object Object],[object Object]
Create table example create table  classmaster ( classid  varchar2(4) primary key, classname  varchar2(15) not null unique, intake  number(3));
Create table example Create table  classmaster2 ( classid  varchar2(4) , classname  varchar2(15) not null , intake  number(3), doa  date default '01-JUL-10', primary key(classid), unique(classname), check (intake between 0 and 100), Constraint  fk_clm_clname  foreign key(classname)  references classmaster(classname)  ) ;
Create table example Create table  studentmaster (  regno  varchar2(4) primary key, classid  varchar2(14) constraint  fk_sm_clsmstr   references  classmaster(classid) on delete set null, sfname   varchar2(20) not null, slname   varchar2(20) not null, DOB  date, DOA  date default ’01-JUL-10’, AdmStatus  char(1) check (admstatus in ('A','C','P')), freeship  char(1) check (freeship in ('Y','N')), check( doa>dob)); );
Creating table from another table ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Constraints ,[object Object],[object Object]
Removing a table ,[object Object],drop table classmaster2; Example:
Changing table definition ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],ALTER TABLE statement can:
Adding a column ,[object Object],[object Object],[object Object]
Dropping a column ,[object Object],This statement drops the column named intake from the table classmaster.
Change the default value for a column ,[object Object],[object Object],[object Object]
Add or drop primary key for a column ,[object Object],[object Object],(Column_name) (Table_name)
Add or drop foreign key for a column ,[object Object],[object Object],[object Object],[object Object]
How to know constraint name ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Add or drop UNIQUE constraint for a column ,[object Object],[object Object],[object Object],[object Object]
Add or drop CHECK constraint for a column ,[object Object],[object Object],[object Object],[object Object]
Add or drop NOT NULL constraint for a column ,[object Object],[object Object],[object Object],[object Object],[object Object]
Creating assertions and domains ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Creating  and Dropping Alias/Synonyms ,[object Object],[object Object],[object Object],[object Object],[object Object]
Indexes ,[object Object],[object Object],[object Object],[object Object]
Advantages- ,[object Object],[object Object]
Disadvantages ,[object Object],[object Object],[object Object],[object Object]
Example Indexes ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Types of Indexes ,[object Object],[object Object],[object Object],[object Object],[object Object]
Database structure ,[object Object],[object Object],[object Object],[object Object]
Single database architecture ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Multi database architecture ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Multi database architecture(contd.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Multi Location Architecture ,[object Object],[object Object],[object Object],[object Object],[object Object]
Multi Location Architecture(contd.) ,[object Object],[object Object],[object Object]
Databases on multiple servers ,[object Object],[object Object],[object Object],[object Object],[object Object]
THANKS

Más contenido relacionado

La actualidad más candente

introdution to SQL and SQL functions
introdution to SQL and SQL functionsintrodution to SQL and SQL functions
introdution to SQL and SQL functionsfarwa waqar
 
File systems versus a dbms
File systems versus a dbmsFile systems versus a dbms
File systems versus a dbmsRituBhargava7
 
Lecture 01 introduction to database
Lecture 01 introduction to databaseLecture 01 introduction to database
Lecture 01 introduction to databaseemailharmeet
 
Database Keys & Relationship
Database Keys & RelationshipDatabase Keys & Relationship
Database Keys & RelationshipBellal Hossain
 
Codd's rules
Codd's rulesCodd's rules
Codd's rulesMohd Arif
 
2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMSkoolkampus
 
SQL - Structured query language introduction
SQL - Structured query language introductionSQL - Structured query language introduction
SQL - Structured query language introductionSmriti Jain
 
Architecture of dbms(lecture 3)
Architecture of dbms(lecture 3)Architecture of dbms(lecture 3)
Architecture of dbms(lecture 3)Ravinder Kamboj
 
Database Design
Database DesignDatabase Design
Database Designlearnt
 
Function of Operating system
Function of Operating systemFunction of Operating system
Function of Operating systemAmit Mehla
 
Database Management System Introduction
Database Management System IntroductionDatabase Management System Introduction
Database Management System IntroductionSmriti Jain
 
Database Relationships
Database RelationshipsDatabase Relationships
Database Relationshipswmassie
 
Introduction to database
Introduction to databaseIntroduction to database
Introduction to databaseArpee Callejo
 
SQL Queries Information
SQL Queries InformationSQL Queries Information
SQL Queries InformationNishant Munjal
 

La actualidad más candente (20)

File management
File managementFile management
File management
 
MySQL for beginners
MySQL for beginnersMySQL for beginners
MySQL for beginners
 
introdution to SQL and SQL functions
introdution to SQL and SQL functionsintrodution to SQL and SQL functions
introdution to SQL and SQL functions
 
File systems versus a dbms
File systems versus a dbmsFile systems versus a dbms
File systems versus a dbms
 
MYSQL.ppt
MYSQL.pptMYSQL.ppt
MYSQL.ppt
 
Introduction to ms access
Introduction to ms accessIntroduction to ms access
Introduction to ms access
 
Lecture 01 introduction to database
Lecture 01 introduction to databaseLecture 01 introduction to database
Lecture 01 introduction to database
 
Database Keys & Relationship
Database Keys & RelationshipDatabase Keys & Relationship
Database Keys & Relationship
 
Create table
Create tableCreate table
Create table
 
Codd's rules
Codd's rulesCodd's rules
Codd's rules
 
2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS
 
Rdbms
RdbmsRdbms
Rdbms
 
SQL - Structured query language introduction
SQL - Structured query language introductionSQL - Structured query language introduction
SQL - Structured query language introduction
 
Architecture of dbms(lecture 3)
Architecture of dbms(lecture 3)Architecture of dbms(lecture 3)
Architecture of dbms(lecture 3)
 
Database Design
Database DesignDatabase Design
Database Design
 
Function of Operating system
Function of Operating systemFunction of Operating system
Function of Operating system
 
Database Management System Introduction
Database Management System IntroductionDatabase Management System Introduction
Database Management System Introduction
 
Database Relationships
Database RelationshipsDatabase Relationships
Database Relationships
 
Introduction to database
Introduction to databaseIntroduction to database
Introduction to database
 
SQL Queries Information
SQL Queries InformationSQL Queries Information
SQL Queries Information
 

Destacado

Steps of-creating-a-database
Steps of-creating-a-databaseSteps of-creating-a-database
Steps of-creating-a-databaseAIMS Education
 
Database Design Process
Database Design ProcessDatabase Design Process
Database Design Processmussawir20
 
Database design process
Database design processDatabase design process
Database design processTayyab Hameed
 
Database Design Slide 1
Database Design Slide 1Database Design Slide 1
Database Design Slide 1ahfiki
 
Types of databases
Types of databasesTypes of databases
Types of databasesPAQUIAAIZEL
 
Practical auto layout
Practical auto layoutPractical auto layout
Practical auto layoutInferis
 
Creating Database 2010
Creating Database 2010Creating Database 2010
Creating Database 2010tgushi12
 
New: Two Methods of Installing Drupal on Windows XP with XAMPP
New: Two Methods of Installing Drupal on Windows XP with XAMPPNew: Two Methods of Installing Drupal on Windows XP with XAMPP
New: Two Methods of Installing Drupal on Windows XP with XAMPPRupesh Kumar
 
PROJECT MANAGEMENT - (2016) SEM-VI - PRACTICAL (SLIP) QUESTIONS
PROJECT MANAGEMENT - (2016) SEM-VI - PRACTICAL (SLIP) QUESTIONSPROJECT MANAGEMENT - (2016) SEM-VI - PRACTICAL (SLIP) QUESTIONS
PROJECT MANAGEMENT - (2016) SEM-VI - PRACTICAL (SLIP) QUESTIONSSatyendra Singh
 
Step by step how to create database with phpmyadmin
Step by step how to create database with phpmyadminStep by step how to create database with phpmyadmin
Step by step how to create database with phpmyadminFathimah Azkiya
 

Destacado (20)

Steps of-creating-a-database
Steps of-creating-a-databaseSteps of-creating-a-database
Steps of-creating-a-database
 
Base1
Base1Base1
Base1
 
Creating database
Creating databaseCreating database
Creating database
 
Databases
DatabasesDatabases
Databases
 
Database Design Process
Database Design ProcessDatabase Design Process
Database Design Process
 
Database design process
Database design processDatabase design process
Database design process
 
Database Design Slide 1
Database Design Slide 1Database Design Slide 1
Database Design Slide 1
 
Introduction to database
Introduction to databaseIntroduction to database
Introduction to database
 
Types dbms
Types dbmsTypes dbms
Types dbms
 
Types of databases
Types of databasesTypes of databases
Types of databases
 
Views
ViewsViews
Views
 
Practical auto layout
Practical auto layoutPractical auto layout
Practical auto layout
 
Farhim NEW
Farhim NEWFarhim NEW
Farhim NEW
 
Sql wksht-2
Sql wksht-2Sql wksht-2
Sql wksht-2
 
Creating Database 2010
Creating Database 2010Creating Database 2010
Creating Database 2010
 
It test
It testIt test
It test
 
New: Two Methods of Installing Drupal on Windows XP with XAMPP
New: Two Methods of Installing Drupal on Windows XP with XAMPPNew: Two Methods of Installing Drupal on Windows XP with XAMPP
New: Two Methods of Installing Drupal on Windows XP with XAMPP
 
PROJECT MANAGEMENT - (2016) SEM-VI - PRACTICAL (SLIP) QUESTIONS
PROJECT MANAGEMENT - (2016) SEM-VI - PRACTICAL (SLIP) QUESTIONSPROJECT MANAGEMENT - (2016) SEM-VI - PRACTICAL (SLIP) QUESTIONS
PROJECT MANAGEMENT - (2016) SEM-VI - PRACTICAL (SLIP) QUESTIONS
 
GIS
GISGIS
GIS
 
Step by step how to create database with phpmyadmin
Step by step how to create database with phpmyadminStep by step how to create database with phpmyadmin
Step by step how to create database with phpmyadmin
 

Similar a Creating a database

Similar a Creating a database (20)

Database models and DBMS languages
Database models and DBMS languagesDatabase models and DBMS languages
Database models and DBMS languages
 
STRUCTURED QUERY LANGUAGE
STRUCTURED QUERY LANGUAGESTRUCTURED QUERY LANGUAGE
STRUCTURED QUERY LANGUAGE
 
COMPUTERS SQL
COMPUTERS SQL COMPUTERS SQL
COMPUTERS SQL
 
Module 3
Module 3Module 3
Module 3
 
Sql Commands_Dr.R.Shalini.ppt
Sql Commands_Dr.R.Shalini.pptSql Commands_Dr.R.Shalini.ppt
Sql Commands_Dr.R.Shalini.ppt
 
MySQL Essential Training
MySQL Essential TrainingMySQL Essential Training
MySQL Essential Training
 
Sql smart reference_by_prasad
Sql smart reference_by_prasadSql smart reference_by_prasad
Sql smart reference_by_prasad
 
Sql smart reference_by_prasad
Sql smart reference_by_prasadSql smart reference_by_prasad
Sql smart reference_by_prasad
 
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with ExamplesDML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
 
SQL Queries - DDL Commands
SQL Queries - DDL CommandsSQL Queries - DDL Commands
SQL Queries - DDL Commands
 
Lab
LabLab
Lab
 
DBMS.pdf
DBMS.pdfDBMS.pdf
DBMS.pdf
 
Unit-1 SQL fundamentals.docx SQL commands used to create table, insert values...
Unit-1 SQL fundamentals.docx SQL commands used to create table, insert values...Unit-1 SQL fundamentals.docx SQL commands used to create table, insert values...
Unit-1 SQL fundamentals.docx SQL commands used to create table, insert values...
 
Les10 Creating And Managing Tables
Les10 Creating And Managing TablesLes10 Creating And Managing Tables
Les10 Creating And Managing Tables
 
Database COMPLETE
Database COMPLETEDatabase COMPLETE
Database COMPLETE
 
Oracle sql material
Oracle sql materialOracle sql material
Oracle sql material
 
SQL : Structured Query Language
SQL : Structured Query LanguageSQL : Structured Query Language
SQL : Structured Query Language
 
SQL
SQLSQL
SQL
 
DBMS and SQL(structured query language) .pptx
DBMS and SQL(structured query language) .pptxDBMS and SQL(structured query language) .pptx
DBMS and SQL(structured query language) .pptx
 
Introduction to sql new
Introduction to sql newIntroduction to sql new
Introduction to sql new
 

Último

Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 

Último (20)

Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 

Creating a database

  • 1. Creating a Database Chapter 13
  • 2.
  • 3.
  • 4.
  • 5.
  • 6. Create table example create table classmaster ( classid varchar2(4) primary key, classname varchar2(15) not null unique, intake number(3));
  • 7. Create table example Create table classmaster2 ( classid varchar2(4) , classname varchar2(15) not null , intake number(3), doa date default '01-JUL-10', primary key(classid), unique(classname), check (intake between 0 and 100), Constraint fk_clm_clname foreign key(classname) references classmaster(classname) ) ;
  • 8. Create table example Create table studentmaster ( regno varchar2(4) primary key, classid varchar2(14) constraint fk_sm_clsmstr references classmaster(classid) on delete set null, sfname varchar2(20) not null, slname varchar2(20) not null, DOB date, DOA date default ’01-JUL-10’, AdmStatus char(1) check (admstatus in ('A','C','P')), freeship char(1) check (freeship in ('Y','N')), check( doa>dob)); );
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.