SlideShare uma empresa Scribd logo
1 de 13
Disclaimer: This presentation is prepared by trainees of
baabtra as a part of mentoring program. This is not official
document of baabtra –Mentoring Partner
Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt .
Ltd
DATABASE DESIGNING


       Reshmi
       reshmi@ymail.com
       www.facebook.com/reshmi.
         ramaswami
       twitter.com/username
       in.linkedin.com/in/profilena
         me
       Phonenumber
DATABASE
• A Database is a Structured collection of data.

• It acts as a container for related tables.

For eg. It could hold all your customer and order
  information.

• To create database
      Eg: Createdb Mydb;
PROBLEM STATEMENT

• Design a database for a travelling agency to
  track its customers and their booking. It can
  have maximum two tables.
1.Tbl_customer

             Fields        Datatype
Vchr_Customer_name         varchar(20)
pk_bint_Client_id          Big int
vchr_email_id              Varchar(20)
bln_gender                 Boolean
bint_cust_phone            Bigint
2.Tbl_booking


           Fields       Datatype
pk_ticket_no            integer
vchr_Source             varchar(20)
vchr_Destination        varchar(20)
dat_Date_of_jrny        date
dat_Date_of_Bookg       date
fk_bint_Client_id       bigint
CREATE TABLE
• To create a new table:

• CREATE TABLE table_name
           (
           column_name1 data_type,
           column_name2 data_type,
           …
           );
 Create table tbl_Client_details(pk_bint_Client_id bigint PRIMARY
  KEY,vchr_Client_name varchar(50),vchr_email_id
  varchar(50),bln_gender boolean,bint_phone_num bigint);
INSERTING IN TABLE
• To insert values into a table:

• INSERT INTO table_name
  VALUES(value1 , value2 , value3 , …);

 INSERT INTO tbl_Client_details
  VALUES(2,'B','b@gmail.com',55,'0',977788822);
SELECT COMMAND
• To view contents of a table:

• SELECT * FROM table_name;



 Select * from tbl_Client_details.
Displays all the contents in the table tbl_Client_details.
DECLARING PRIMARY & FOREIGN
               KEYS
• To declare primary key:
 Create Table table_1
  ( primary int PRIMARY KEY,
      column2 data_type,….
  );

• To declare foreign key:
 Create Table table_2
  ( foreign int REFERENCES table_1(primary)
      column2 data_type,….
  );
If this presentation helped you, please visit our
           page facebook.com/baabtra and like it.
               Thanks in advance.
www.baabtra.com | www.massbaab.com |www.baabte.com
Contact Us

Mais conteúdo relacionado

Destaque

Data capture
Data captureData capture
Data capturekmodasia
 
Design And Purification Of Proteins
Design And Purification Of ProteinsDesign And Purification Of Proteins
Design And Purification Of Proteinssol777
 
Gene expression profiling in breast carcinoma
Gene expression profiling in breast carcinomaGene expression profiling in breast carcinoma
Gene expression profiling in breast carcinomaghoshparthanrs
 
Importance of database design (1)
Importance of database design (1)Importance of database design (1)
Importance of database design (1)yhen06
 
Database Design Process
Database Design ProcessDatabase Design Process
Database Design Processmussawir20
 
Comparative genomics
Comparative genomicsComparative genomics
Comparative genomicshemantbreeder
 
Database design process
Database design processDatabase design process
Database design processTayyab Hameed
 
Introduction to Data Abstraction
Introduction to Data AbstractionIntroduction to Data Abstraction
Introduction to Data AbstractionDennis Gajo
 
Database Design Slide 1
Database Design Slide 1Database Design Slide 1
Database Design Slide 1ahfiki
 
Protein Purification Slides
Protein Purification SlidesProtein Purification Slides
Protein Purification SlidesQuanina Quan
 

Destaque (15)

Database design
Database designDatabase design
Database design
 
Data capture
Data captureData capture
Data capture
 
Database Design
Database DesignDatabase Design
Database Design
 
Gene expression profiling i
Gene expression profiling  iGene expression profiling  i
Gene expression profiling i
 
Design And Purification Of Proteins
Design And Purification Of ProteinsDesign And Purification Of Proteins
Design And Purification Of Proteins
 
Gene expression profiling in breast carcinoma
Gene expression profiling in breast carcinomaGene expression profiling in breast carcinoma
Gene expression profiling in breast carcinoma
 
Importance of database design (1)
Importance of database design (1)Importance of database design (1)
Importance of database design (1)
 
Database Design Process
Database Design ProcessDatabase Design Process
Database Design Process
 
Comparative genomics
Comparative genomicsComparative genomics
Comparative genomics
 
Techniques for protein purification
Techniques for protein purificationTechniques for protein purification
Techniques for protein purification
 
Database design process
Database design processDatabase design process
Database design process
 
Protein purification
Protein purificationProtein purification
Protein purification
 
Introduction to Data Abstraction
Introduction to Data AbstractionIntroduction to Data Abstraction
Introduction to Data Abstraction
 
Database Design Slide 1
Database Design Slide 1Database Design Slide 1
Database Design Slide 1
 
Protein Purification Slides
Protein Purification SlidesProtein Purification Slides
Protein Purification Slides
 

Semelhante a Database design

Using SQL Developer ONLY!Your assignment is to create an auditing .pdf
Using SQL Developer ONLY!Your assignment is to create an auditing .pdfUsing SQL Developer ONLY!Your assignment is to create an auditing .pdf
Using SQL Developer ONLY!Your assignment is to create an auditing .pdfmohammedfootwear
 
on SQL Managment studio(For the following exercise, use the Week 5.pdf
on SQL Managment studio(For the following exercise, use the Week 5.pdfon SQL Managment studio(For the following exercise, use the Week 5.pdf
on SQL Managment studio(For the following exercise, use the Week 5.pdfformaxekochi
 
SQL Server 2008 Portfolio
SQL Server 2008 PortfolioSQL Server 2008 Portfolio
SQL Server 2008 Portfoliolilredlokita
 
Using ddl statements to create and manage tables
Using ddl statements to create and manage tablesUsing ddl statements to create and manage tables
Using ddl statements to create and manage tablesSyed Zaid Irshad
 
Advanced PLSQL Optimizing for Better Performance
Advanced PLSQL Optimizing for Better PerformanceAdvanced PLSQL Optimizing for Better Performance
Advanced PLSQL Optimizing for Better PerformanceZohar Elkayam
 
rails-migrations_1
rails-migrations_1rails-migrations_1
rails-migrations_1brecke
 
Part 2Provider Database (MS Access)Use the project descriptio.docx
Part 2Provider Database (MS Access)Use the project descriptio.docxPart 2Provider Database (MS Access)Use the project descriptio.docx
Part 2Provider Database (MS Access)Use the project descriptio.docxdunnramage
 
Case Study Part 2 - Provider Database (Access) AssignmentsPart.docx
Case Study Part 2 - Provider Database (Access) AssignmentsPart.docxCase Study Part 2 - Provider Database (Access) AssignmentsPart.docx
Case Study Part 2 - Provider Database (Access) AssignmentsPart.docxmichelljubborjudd
 
Les09 (using ddl statements to create and manage tables)
Les09 (using ddl statements to create and manage tables)Les09 (using ddl statements to create and manage tables)
Les09 (using ddl statements to create and manage tables)Achmad Solichin
 
PL/SQL New and Advanced Features for Extreme Performance
PL/SQL New and Advanced Features for Extreme PerformancePL/SQL New and Advanced Features for Extreme Performance
PL/SQL New and Advanced Features for Extreme PerformanceZohar Elkayam
 
Advanced PL/SQL Optimizing for Better Performance 2016
Advanced PL/SQL Optimizing for Better Performance 2016Advanced PL/SQL Optimizing for Better Performance 2016
Advanced PL/SQL Optimizing for Better Performance 2016Zohar Elkayam
 
Part 2Provider Database (MS Access)Use the project description HE.docx
Part 2Provider Database (MS Access)Use the project description HE.docxPart 2Provider Database (MS Access)Use the project description HE.docx
Part 2Provider Database (MS Access)Use the project description HE.docxdanhaley45372
 
Part 2Provider Database (MS Access)Use the project description HE.docx
Part 2Provider Database (MS Access)Use the project description HE.docxPart 2Provider Database (MS Access)Use the project description HE.docx
Part 2Provider Database (MS Access)Use the project description HE.docxherbertwilson5999
 
BBA 2 Semester DBMS All assignment
BBA 2 Semester DBMS All assignmentBBA 2 Semester DBMS All assignment
BBA 2 Semester DBMS All assignmentRoshan Kumar
 
MariaDB for Developers and Operators (DevOps)
MariaDB for Developers and Operators (DevOps)MariaDB for Developers and Operators (DevOps)
MariaDB for Developers and Operators (DevOps)Colin Charles
 
Build .NET Applications with Reporting and Dashboard
Build .NET Applications with Reporting and DashboardBuild .NET Applications with Reporting and Dashboard
Build .NET Applications with Reporting and DashboardIron Speed
 
CIS 310 ACCESS AssignmentObjective of this assignment is to pr.docx
CIS 310 ACCESS AssignmentObjective of this assignment is to pr.docxCIS 310 ACCESS AssignmentObjective of this assignment is to pr.docx
CIS 310 ACCESS AssignmentObjective of this assignment is to pr.docxclarebernice
 

Semelhante a Database design (20)

Using SQL Developer ONLY!Your assignment is to create an auditing .pdf
Using SQL Developer ONLY!Your assignment is to create an auditing .pdfUsing SQL Developer ONLY!Your assignment is to create an auditing .pdf
Using SQL Developer ONLY!Your assignment is to create an auditing .pdf
 
on SQL Managment studio(For the following exercise, use the Week 5.pdf
on SQL Managment studio(For the following exercise, use the Week 5.pdfon SQL Managment studio(For the following exercise, use the Week 5.pdf
on SQL Managment studio(For the following exercise, use the Week 5.pdf
 
SQL Server 2008 Portfolio
SQL Server 2008 PortfolioSQL Server 2008 Portfolio
SQL Server 2008 Portfolio
 
Using ddl statements to create and manage tables
Using ddl statements to create and manage tablesUsing ddl statements to create and manage tables
Using ddl statements to create and manage tables
 
Database
Database Database
Database
 
Advanced PLSQL Optimizing for Better Performance
Advanced PLSQL Optimizing for Better PerformanceAdvanced PLSQL Optimizing for Better Performance
Advanced PLSQL Optimizing for Better Performance
 
rails-migrations_1
rails-migrations_1rails-migrations_1
rails-migrations_1
 
Part 2Provider Database (MS Access)Use the project descriptio.docx
Part 2Provider Database (MS Access)Use the project descriptio.docxPart 2Provider Database (MS Access)Use the project descriptio.docx
Part 2Provider Database (MS Access)Use the project descriptio.docx
 
Case Study Part 2 - Provider Database (Access) AssignmentsPart.docx
Case Study Part 2 - Provider Database (Access) AssignmentsPart.docxCase Study Part 2 - Provider Database (Access) AssignmentsPart.docx
Case Study Part 2 - Provider Database (Access) AssignmentsPart.docx
 
Les09
Les09Les09
Les09
 
Les09 (using ddl statements to create and manage tables)
Les09 (using ddl statements to create and manage tables)Les09 (using ddl statements to create and manage tables)
Les09 (using ddl statements to create and manage tables)
 
PL/SQL New and Advanced Features for Extreme Performance
PL/SQL New and Advanced Features for Extreme PerformancePL/SQL New and Advanced Features for Extreme Performance
PL/SQL New and Advanced Features for Extreme Performance
 
Advanced PL/SQL Optimizing for Better Performance 2016
Advanced PL/SQL Optimizing for Better Performance 2016Advanced PL/SQL Optimizing for Better Performance 2016
Advanced PL/SQL Optimizing for Better Performance 2016
 
My Sql concepts
My Sql conceptsMy Sql concepts
My Sql concepts
 
Part 2Provider Database (MS Access)Use the project description HE.docx
Part 2Provider Database (MS Access)Use the project description HE.docxPart 2Provider Database (MS Access)Use the project description HE.docx
Part 2Provider Database (MS Access)Use the project description HE.docx
 
Part 2Provider Database (MS Access)Use the project description HE.docx
Part 2Provider Database (MS Access)Use the project description HE.docxPart 2Provider Database (MS Access)Use the project description HE.docx
Part 2Provider Database (MS Access)Use the project description HE.docx
 
BBA 2 Semester DBMS All assignment
BBA 2 Semester DBMS All assignmentBBA 2 Semester DBMS All assignment
BBA 2 Semester DBMS All assignment
 
MariaDB for Developers and Operators (DevOps)
MariaDB for Developers and Operators (DevOps)MariaDB for Developers and Operators (DevOps)
MariaDB for Developers and Operators (DevOps)
 
Build .NET Applications with Reporting and Dashboard
Build .NET Applications with Reporting and DashboardBuild .NET Applications with Reporting and Dashboard
Build .NET Applications with Reporting and Dashboard
 
CIS 310 ACCESS AssignmentObjective of this assignment is to pr.docx
CIS 310 ACCESS AssignmentObjective of this assignment is to pr.docxCIS 310 ACCESS AssignmentObjective of this assignment is to pr.docx
CIS 310 ACCESS AssignmentObjective of this assignment is to pr.docx
 

Mais de baabtra.com - No. 1 supplier of quality freshers

Mais de baabtra.com - No. 1 supplier of quality freshers (20)

Agile methodology and scrum development
Agile methodology and scrum developmentAgile methodology and scrum development
Agile methodology and scrum development
 
Best coding practices
Best coding practicesBest coding practices
Best coding practices
 
Core java - baabtra
Core java - baabtraCore java - baabtra
Core java - baabtra
 
Acquiring new skills what you should know
Acquiring new skills   what you should knowAcquiring new skills   what you should know
Acquiring new skills what you should know
 
Baabtra.com programming at school
Baabtra.com programming at schoolBaabtra.com programming at school
Baabtra.com programming at school
 
99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love 99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love
 
Php sessions & cookies
Php sessions & cookiesPhp sessions & cookies
Php sessions & cookies
 
Php database connectivity
Php database connectivityPhp database connectivity
Php database connectivity
 
Chapter 6 database normalisation
Chapter 6  database normalisationChapter 6  database normalisation
Chapter 6 database normalisation
 
Chapter 5 transactions and dcl statements
Chapter 5  transactions and dcl statementsChapter 5  transactions and dcl statements
Chapter 5 transactions and dcl statements
 
Chapter 4 functions, views, indexing
Chapter 4  functions, views, indexingChapter 4  functions, views, indexing
Chapter 4 functions, views, indexing
 
Chapter 3 stored procedures
Chapter 3 stored proceduresChapter 3 stored procedures
Chapter 3 stored procedures
 
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
Chapter 2  grouping,scalar and aggergate functions,joins   inner join,outer joinChapter 2  grouping,scalar and aggergate functions,joins   inner join,outer join
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Microsoft holo lens
Microsoft holo lensMicrosoft holo lens
Microsoft holo lens
 
Blue brain
Blue brainBlue brain
Blue brain
 
5g
5g5g
5g
 
Aptitude skills baabtra
Aptitude skills baabtraAptitude skills baabtra
Aptitude skills baabtra
 
Gd baabtra
Gd baabtraGd baabtra
Gd baabtra
 

Database design

  • 1.
  • 2. Disclaimer: This presentation is prepared by trainees of baabtra as a part of mentoring program. This is not official document of baabtra –Mentoring Partner Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt . Ltd
  • 3. DATABASE DESIGNING Reshmi reshmi@ymail.com www.facebook.com/reshmi. ramaswami twitter.com/username in.linkedin.com/in/profilena me Phonenumber
  • 4. DATABASE • A Database is a Structured collection of data. • It acts as a container for related tables. For eg. It could hold all your customer and order information. • To create database Eg: Createdb Mydb;
  • 5. PROBLEM STATEMENT • Design a database for a travelling agency to track its customers and their booking. It can have maximum two tables.
  • 6. 1.Tbl_customer Fields Datatype Vchr_Customer_name varchar(20) pk_bint_Client_id Big int vchr_email_id Varchar(20) bln_gender Boolean bint_cust_phone Bigint
  • 7. 2.Tbl_booking Fields Datatype pk_ticket_no integer vchr_Source varchar(20) vchr_Destination varchar(20) dat_Date_of_jrny date dat_Date_of_Bookg date fk_bint_Client_id bigint
  • 8. CREATE TABLE • To create a new table: • CREATE TABLE table_name ( column_name1 data_type, column_name2 data_type, … );  Create table tbl_Client_details(pk_bint_Client_id bigint PRIMARY KEY,vchr_Client_name varchar(50),vchr_email_id varchar(50),bln_gender boolean,bint_phone_num bigint);
  • 9. INSERTING IN TABLE • To insert values into a table: • INSERT INTO table_name VALUES(value1 , value2 , value3 , …);  INSERT INTO tbl_Client_details VALUES(2,'B','b@gmail.com',55,'0',977788822);
  • 10. SELECT COMMAND • To view contents of a table: • SELECT * FROM table_name;  Select * from tbl_Client_details. Displays all the contents in the table tbl_Client_details.
  • 11. DECLARING PRIMARY & FOREIGN KEYS • To declare primary key:  Create Table table_1 ( primary int PRIMARY KEY, column2 data_type,…. ); • To declare foreign key:  Create Table table_2 ( foreign int REFERENCES table_1(primary) column2 data_type,…. );
  • 12. If this presentation helped you, please visit our page facebook.com/baabtra and like it. Thanks in advance. www.baabtra.com | www.massbaab.com |www.baabte.com