0% found this document useful (0 votes)
10 views4 pages

EY training notes

The document outlines a training session on SQL, focusing on the installation of MySQL Workbench and key database concepts. It explains the importance of primary and foreign keys, various database relationships, and provides examples of one-to-one and one-to-many relationships. Additionally, it touches on permissions and transaction control in database management.

Uploaded by

sharanyav810
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views4 pages

EY training notes

The document outlines a training session on SQL, focusing on the installation of MySQL Workbench and key database concepts. It explains the importance of primary and foreign keys, various database relationships, and provides examples of one-to-one and one-to-many relationships. Additionally, it touches on permissions and transaction control in database management.

Uploaded by

sharanyav810
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

EY TRAINING

Day 1 -SQL
-Sowmya Shree BV [data base trainer]

INSTALLATION OF THE SOFTWARE : MY SQL WORKBENCH

LINK : https://dev.mysql.com/downloads/installer/

select the second one 333.1 MB

REQUIREMENTS :

• connector 0.8.33
• workbench 0.8.33
• server 0.8.33
select full custom while installing

• multiple databases
• open SQL script ->file
• select the database and line so it execute as there are many databases

INTRODUCTION

• Database management is the most part when you have huge data
• varchar is for String
• consider + and - for date and time
• + current date + further
• _ current - previous date

example :

6oct
+ 5(days) =11 oct
-5
1 oct
• Date , days or week can be considered

TWO MAJOR KEYS

• primary key
• foreign key

Primary key : Unique identifier of a table , Each and every table must have at least one pk .

Foreign key : when you represent a relationship between tables you create a foreign key by adding the
column nothing but referring to another table primary key.

DATABASE RELATIONSHIPS

1) one to one 1:1


2) one to many 1:N 1..N
3) many to one N:1
4) many to many N:N N:M

example of one to one : custom order , one customer has one order.

Cust id name Ord Id


1 C1 1
2 C2 3
Ord id is foreign key now

Ord id Qty

1 5
3 10

Example one to many : one customer has one order , customer 2 has two orders.

many to one :many Customers has one order.

➢ In one to many - foreign key in t2 in 1:N


➢ many to one the foreign key presence in t1
• Association table : both the primary keys will be mapped ans new table formed
create table from the existing table

• composite key - more than one primary key both foreign key referencing to another table.

IDENTIFYING RELATIONSHIP AND NON -IDENTIFYING RELATIONSHIP

Says that it’s a one to many • Yellow is primary key


• Red is foreign key
relation

red is foreign key


• DCL -grant permission and remove permission .
• TCL- n number of command takes places sequentially in single transaction the use this.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy