SlideShare a Scribd company logo
1 of 42
Download to read offline
DATABASE OF
E-COMMERCE
COMPANY
P R E PA R E D B Y :
SEDA SADAY
190104006
EMRE KARA
200104022
DATABASEOF E-COMMERCE COMPANY
The database protects and maintains data and can perform basic operations such as associating it
with other data. By using the database, the data can be used more easily, the desired data can be
easily accessed, and new information can be produced to help solve various problems. It provides
efficiency and security in data entry and access by collecting data in a center, allowing everyone to
access, correction, delete or view these data within their authority.
In this project, I created a relational database using data from an e-commerce company. The
purpose of using the database in this project is to provide easy and fast access to data and to
perform transactions . It also stores a lot of data with very little space. It is easy to add new data
and to edit or delete old data. I can easily query sales transactions, product information, stocks and
customer information in this database. We can manage the database , perform storage,
reproduction and updating. An e-commerce company is required to keep the information of
members and products on the shopping site. For this, the data must be stored in the database.For
example, in order for the products to reach the customers, the address information of the
customers must be stored in a database. The database makes the application more useful by
preventing unnecessary data duplication. It ensures that the data is consistent.
Entities Their Attributes
Customer Ssn, FirstName, LastName, Email, Phone, Street, City, Zip, Creditcard_ID
Orders Order_ID, Essn,Customer_name, To_Street, To_city, To_state, To_zip, Ship_date, Product_ID, Ouantity, TotalPayment
Product Product_ID, ProductName, Product_type, unitPrice, Supplier_ID, Stock_ID
Shipment Shipment_ID, Product_ID, Order_ID, PackingTime, ShipOrderDate
Payment Creditcard_ID, Creditcard_type, CreditcardNumber, ExpMonth, ExpYear, TotalPayment
Supplier Supplier_ID, SupplierName, SupplierEmail, SupplierPhone
Stock_item Stock_ID, stocknumber, stockname, unitPrice
Users Username, password
Primary key must be unique. It cannot be changed and cannot be left blank.
Foreign keys don’t have to be unique.They can be repeated in a table.There can be multiple
foreign keys in one entity.
Caıluım n Nlame
Ssn
Fi
rstıNarme
La
stıf'/Jarıne
Ermai
l
� pıhl]ne
Street
,
Oity.
Zip
Tabıle Mame: _l
rn_sm_
1 m
_
e
_
r
________________�I Schıema: e_mımneroe
aharse t/Col latiaın: .__Iu_tffi_m _b4
_______
v__.l l utffim b4_ 0900_ai_d v I Engi
n
e:' _IIn_n _oD _B___
Caım men'ts:
Datatııpe PK NINI IJJQ B IJJNI ZF AI G Derauıl tfExp ress iaın
CH R{91) 0 0 □ □ □ □ □ □
V RCH R{:15) □ 0 □ □ □ □ □ □
V. ·RCH. ·R{lS) □ 0 □ □ □ □ □ □
· ROH R{30) □ 0 □ □ □ □ □ □
V RCH R{:12) □ 0 □ □ □ □ □ □
V. ·RCH ·R{SO) □ 0 □ □ □ □ □ □
V . RCH . R{:15) □ 0 □ □ □ □ □ □
V ROH. R{S}. □ 0 □ □ □ □ □ □
Creditcard ID INT □ 0 □ □ □ □ □ □
□ □ □ □ □ □ □ □
Defining the Attribute's Data Type
Textual Data Types
CHAR(length) : Includes text (characters,numbers,punctuations...).CHAR has as characteristicthat it always
saves a fixed amount of positions.
VARCHAR(length) : Includes text (characters,numbers, punctuation...).VARCHAR is the same as CHAR, the
difference is that VARCHAR only takes as much space as necessary.
TEXT : can contain large amounts of text.
Numberical Data Types
INT: Contains a positive or negative whole number. A lot of databases have variations of the INT, such as
TINYINT,SMALLINT,MEDIUMINT, BIGINT,INT2,INT4,INT8. These variations differ from the INT only in the size
of the figure that fits into it.
FLOAT,DOUBLE: The same idea as INT, but can also store floating point numbers.
Date / Time Data Types
Date: YYYY.MM.DD
Date Time: YYYY.MM.DD hh:mm:ss
Other Types
• BLOB : for binary datasuch as files.
• INET : for IP addresses. Also useable for netmasks.
CUSTOMER TABLE
ORDERS TABLE
PRODUCT TABLE
PAYMENT TABLE
SHIPMENT TABLE
SUPPLIER TABLE
STOCK_ITEM TABLE
USERS TABLE
Data Description Language
• Create: Defines objects. Primary keys are defined here.
• Alter: Makes changes on objects. Foreign keys are defined here.
• Drop: Deletes objects.
Data Processing Language
• Insert: Inserts data into the table
• Update: Updates the data in the table
• Delete: Deletes the data in table.
• Select: Selects the data we want in the table and reports it.
CODE
NESTEDQURIES
ER Diagrams Symbols & Notations
Entity Relationship Diagram Symbols & Notations mainly contains three basic symbols
which are rectangle, oval and diamond to represent relationships between elements,
entities and attributes.ER Diagram is a visual representation of data that describes how
data is related to each other using different ERD Symbols and Notations.
Following are the main components and its symbols in ER Diagrams:
• Rectangles: This Entity Relationship Diagram symbol represents entity types
• Ellipses : Symbol represent attributes
• Diamonds: This symbol represents relationship types
• Lines: It links attributes to entity types and entity types with other relationship types
• Primary key: attributes are underlined
• Double Ellipses: Represent multi-valued attributes
Cardinality
Defines the numerical attributes of the relationship between two entities or
entity sets.
Different types of cardinal relationships are:
• One-to-One Relationships
• One-to-Many Relationships
• Many-to-One Relationships
• Many-to-Many Relationships
1.One-to-one:One entity from entity set X can be associatedwith at most one entity of
entity set Y and vice versa.
2.One-to-many:One entity from entity set X can be associatedwith multiple entities of entity
set Y, but an entity from entity set Y can be associated with at least one entity.
3. Many-to-One:More than one entity from entity set X can be associatedwith at most one
entity of entity set Y. However, an entity from entity set Y may or may not be associated
with more than one entity from entity set X.
4. Many-to-Many: One entity from X can be associatedwith more than one entity from Y
and vice versa.
ENTITY RELATIONSHIP DIAGRAM
Relationships Between Entities and Their Types
• While a customer may purchase multiple products, multiple customers may purchase a
product .
• While a customer can place multiple orders, a customer can place an order.
• While a customer can make a transaction from one credit card, more than one customer
can make a transaction from a credit card.

More Related Content

What's hot

Net Portfolio Shade
Net Portfolio ShadeNet Portfolio Shade
Net Portfolio Shade
folageshin
 
ILL_Poster_Session
ILL_Poster_SessionILL_Poster_Session
ILL_Poster_Session
Andrew Huff
 
physical and logical data independence
physical and logical data independencephysical and logical data independence
physical and logical data independence
apoorva_upadhyay
 

What's hot (20)

CIS 145 test 1 review
CIS 145 test 1 reviewCIS 145 test 1 review
CIS 145 test 1 review
 
Database Systems - Entity Relationship Modeling (Chapter 4/2)
Database Systems - Entity Relationship Modeling (Chapter 4/2)Database Systems - Entity Relationship Modeling (Chapter 4/2)
Database Systems - Entity Relationship Modeling (Chapter 4/2)
 
Net Portfolio Shade
Net Portfolio ShadeNet Portfolio Shade
Net Portfolio Shade
 
DATA HANDLING FOR SPSS
DATA HANDLING FOR SPSSDATA HANDLING FOR SPSS
DATA HANDLING FOR SPSS
 
Data model
Data modelData model
Data model
 
Spssbaseusersguide160
Spssbaseusersguide160Spssbaseusersguide160
Spssbaseusersguide160
 
Data Models & Introduction to UML
Data Models & Introduction to UML Data Models & Introduction to UML
Data Models & Introduction to UML
 
Sql
SqlSql
Sql
 
ILL_Poster_Session
ILL_Poster_SessionILL_Poster_Session
ILL_Poster_Session
 
Data modelingpresentation
Data modelingpresentationData modelingpresentation
Data modelingpresentation
 
Presentation dental treatment & management application project
Presentation dental treatment & management application project Presentation dental treatment & management application project
Presentation dental treatment & management application project
 
Chapter2
Chapter2Chapter2
Chapter2
 
Creating a Coding Book in IBM SPSS Statistics
Creating a Coding Book in IBM SPSS StatisticsCreating a Coding Book in IBM SPSS Statistics
Creating a Coding Book in IBM SPSS Statistics
 
XML - Data Modeling
XML - Data ModelingXML - Data Modeling
XML - Data Modeling
 
IBM SPSS Statistics: Download and Upload
IBM SPSS Statistics: Download and UploadIBM SPSS Statistics: Download and Upload
IBM SPSS Statistics: Download and Upload
 
Database Basics
Database BasicsDatabase Basics
Database Basics
 
physical and logical data independence
physical and logical data independencephysical and logical data independence
physical and logical data independence
 
Schema relationship to E-R diagram
Schema relationship to E-R diagramSchema relationship to E-R diagram
Schema relationship to E-R diagram
 
DBMS PPT
DBMS PPTDBMS PPT
DBMS PPT
 
En24877880
En24877880En24877880
En24877880
 

Similar to Database.pdf

D I T211 Chapter 3
D I T211    Chapter 3D I T211    Chapter 3
D I T211 Chapter 3
askme
 
DATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptxDATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptx
JasmineMichael1
 
Wind Turbine Fuzzy Logic Simulink Matalb Model.pdf
Wind Turbine Fuzzy Logic Simulink Matalb Model.pdfWind Turbine Fuzzy Logic Simulink Matalb Model.pdf
Wind Turbine Fuzzy Logic Simulink Matalb Model.pdf
Ibrar Hussain
 
ความรู้เบื้องต้นฐานข้อมูล 1
ความรู้เบื้องต้นฐานข้อมูล 1ความรู้เบื้องต้นฐานข้อมูล 1
ความรู้เบื้องต้นฐานข้อมูล 1
Witoon Thammatuch-aree
 
18 database features
18 database features18 database features
18 database features
Rebecca Jones
 
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
honey725342
 

Similar to Database.pdf (20)

PHP/MySQL Programming Class Lecture 03
PHP/MySQL Programming Class Lecture 03PHP/MySQL Programming Class Lecture 03
PHP/MySQL Programming Class Lecture 03
 
D I T211 Chapter 3
D I T211    Chapter 3D I T211    Chapter 3
D I T211 Chapter 3
 
DBMS Class 3
DBMS Class 3DBMS Class 3
DBMS Class 3
 
DATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptxDATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptx
 
ER Digramms by Harshal wagh
ER Digramms by Harshal waghER Digramms by Harshal wagh
ER Digramms by Harshal wagh
 
Unit 2-Data Modeling.pdf
Unit 2-Data Modeling.pdfUnit 2-Data Modeling.pdf
Unit 2-Data Modeling.pdf
 
Wind Turbine Fuzzy Logic Simulink Matalb Model.pdf
Wind Turbine Fuzzy Logic Simulink Matalb Model.pdfWind Turbine Fuzzy Logic Simulink Matalb Model.pdf
Wind Turbine Fuzzy Logic Simulink Matalb Model.pdf
 
ความรู้เบื้องต้นฐานข้อมูล 1
ความรู้เบื้องต้นฐานข้อมูล 1ความรู้เบื้องต้นฐานข้อมูล 1
ความรู้เบื้องต้นฐานข้อมูล 1
 
18 database features
18 database features18 database features
18 database features
 
Entityrelationshipmodel
EntityrelationshipmodelEntityrelationshipmodel
Entityrelationshipmodel
 
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
 
Revision ch 3
Revision ch 3Revision ch 3
Revision ch 3
 
8.pptx
8.pptx8.pptx
8.pptx
 
Data resource management
Data resource managementData resource management
Data resource management
 
Data modelling interview question
Data modelling interview questionData modelling interview question
Data modelling interview question
 
Data Types
Data TypesData Types
Data Types
 
Lecture7.pptx
Lecture7.pptxLecture7.pptx
Lecture7.pptx
 
C++ data types
C++ data typesC++ data types
C++ data types
 
Common Data Model - A Business Database!
Common Data Model - A Business Database!Common Data Model - A Business Database!
Common Data Model - A Business Database!
 
ER MODEL
ER MODELER MODEL
ER MODEL
 

Recently uploaded

FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
MarinCaroMartnezBerg
 
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
amitlee9823
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
amitlee9823
 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
amitlee9823
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
amitlee9823
 

Recently uploaded (20)

FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
 
Predicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science ProjectPredicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science Project
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFx
 
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFx
 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Research
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysis
 
Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFx
 
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
 
Week-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionWeek-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interaction
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptx
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 
ELKO dropshipping via API with DroFx.pptx
ELKO dropshipping via API with DroFx.pptxELKO dropshipping via API with DroFx.pptx
ELKO dropshipping via API with DroFx.pptx
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signals
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptx
 
Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptx
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptx
 

Database.pdf

  • 1. DATABASE OF E-COMMERCE COMPANY P R E PA R E D B Y : SEDA SADAY 190104006 EMRE KARA 200104022
  • 2. DATABASEOF E-COMMERCE COMPANY The database protects and maintains data and can perform basic operations such as associating it with other data. By using the database, the data can be used more easily, the desired data can be easily accessed, and new information can be produced to help solve various problems. It provides efficiency and security in data entry and access by collecting data in a center, allowing everyone to access, correction, delete or view these data within their authority. In this project, I created a relational database using data from an e-commerce company. The purpose of using the database in this project is to provide easy and fast access to data and to perform transactions . It also stores a lot of data with very little space. It is easy to add new data and to edit or delete old data. I can easily query sales transactions, product information, stocks and customer information in this database. We can manage the database , perform storage, reproduction and updating. An e-commerce company is required to keep the information of members and products on the shopping site. For this, the data must be stored in the database.For example, in order for the products to reach the customers, the address information of the customers must be stored in a database. The database makes the application more useful by preventing unnecessary data duplication. It ensures that the data is consistent.
  • 3. Entities Their Attributes Customer Ssn, FirstName, LastName, Email, Phone, Street, City, Zip, Creditcard_ID Orders Order_ID, Essn,Customer_name, To_Street, To_city, To_state, To_zip, Ship_date, Product_ID, Ouantity, TotalPayment Product Product_ID, ProductName, Product_type, unitPrice, Supplier_ID, Stock_ID Shipment Shipment_ID, Product_ID, Order_ID, PackingTime, ShipOrderDate Payment Creditcard_ID, Creditcard_type, CreditcardNumber, ExpMonth, ExpYear, TotalPayment Supplier Supplier_ID, SupplierName, SupplierEmail, SupplierPhone Stock_item Stock_ID, stocknumber, stockname, unitPrice Users Username, password
  • 4. Primary key must be unique. It cannot be changed and cannot be left blank. Foreign keys don’t have to be unique.They can be repeated in a table.There can be multiple foreign keys in one entity.
  • 5. Caıluım n Nlame Ssn Fi rstıNarme La stıf'/Jarıne Ermai l � pıhl]ne Street , Oity. Zip Tabıle Mame: _l rn_sm_ 1 m _ e _ r ________________�I Schıema: e_mımneroe aharse t/Col latiaın: .__Iu_tffi_m _b4 _______ v__.l l utffim b4_ 0900_ai_d v I Engi n e:' _IIn_n _oD _B___ Caım men'ts: Datatııpe PK NINI IJJQ B IJJNI ZF AI G Derauıl tfExp ress iaın CH R{91) 0 0 □ □ □ □ □ □ V RCH R{:15) □ 0 □ □ □ □ □ □ V. ·RCH. ·R{lS) □ 0 □ □ □ □ □ □ · ROH R{30) □ 0 □ □ □ □ □ □ V RCH R{:12) □ 0 □ □ □ □ □ □ V. ·RCH ·R{SO) □ 0 □ □ □ □ □ □ V . RCH . R{:15) □ 0 □ □ □ □ □ □ V ROH. R{S}. □ 0 □ □ □ □ □ □ Creditcard ID INT □ 0 □ □ □ □ □ □ □ □ □ □ □ □ □ □
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14. Defining the Attribute's Data Type Textual Data Types CHAR(length) : Includes text (characters,numbers,punctuations...).CHAR has as characteristicthat it always saves a fixed amount of positions. VARCHAR(length) : Includes text (characters,numbers, punctuation...).VARCHAR is the same as CHAR, the difference is that VARCHAR only takes as much space as necessary. TEXT : can contain large amounts of text. Numberical Data Types INT: Contains a positive or negative whole number. A lot of databases have variations of the INT, such as TINYINT,SMALLINT,MEDIUMINT, BIGINT,INT2,INT4,INT8. These variations differ from the INT only in the size of the figure that fits into it. FLOAT,DOUBLE: The same idea as INT, but can also store floating point numbers. Date / Time Data Types Date: YYYY.MM.DD Date Time: YYYY.MM.DD hh:mm:ss Other Types • BLOB : for binary datasuch as files. • INET : for IP addresses. Also useable for netmasks.
  • 23. Data Description Language • Create: Defines objects. Primary keys are defined here. • Alter: Makes changes on objects. Foreign keys are defined here. • Drop: Deletes objects. Data Processing Language • Insert: Inserts data into the table • Update: Updates the data in the table • Delete: Deletes the data in table. • Select: Selects the data we want in the table and reports it.
  • 24. CODE
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 35. ER Diagrams Symbols & Notations Entity Relationship Diagram Symbols & Notations mainly contains three basic symbols which are rectangle, oval and diamond to represent relationships between elements, entities and attributes.ER Diagram is a visual representation of data that describes how data is related to each other using different ERD Symbols and Notations. Following are the main components and its symbols in ER Diagrams: • Rectangles: This Entity Relationship Diagram symbol represents entity types • Ellipses : Symbol represent attributes • Diamonds: This symbol represents relationship types • Lines: It links attributes to entity types and entity types with other relationship types • Primary key: attributes are underlined • Double Ellipses: Represent multi-valued attributes
  • 36.
  • 37. Cardinality Defines the numerical attributes of the relationship between two entities or entity sets. Different types of cardinal relationships are: • One-to-One Relationships • One-to-Many Relationships • Many-to-One Relationships • Many-to-Many Relationships
  • 38.
  • 39. 1.One-to-one:One entity from entity set X can be associatedwith at most one entity of entity set Y and vice versa. 2.One-to-many:One entity from entity set X can be associatedwith multiple entities of entity set Y, but an entity from entity set Y can be associated with at least one entity. 3. Many-to-One:More than one entity from entity set X can be associatedwith at most one entity of entity set Y. However, an entity from entity set Y may or may not be associated with more than one entity from entity set X. 4. Many-to-Many: One entity from X can be associatedwith more than one entity from Y and vice versa.
  • 40.
  • 42. Relationships Between Entities and Their Types • While a customer may purchase multiple products, multiple customers may purchase a product . • While a customer can place multiple orders, a customer can place an order. • While a customer can make a transaction from one credit card, more than one customer can make a transaction from a credit card.