SlideShare a Scribd company logo
Introduction to Windows
Phone & Database
Session 6#
1
2
3
4
5
Discussion on your apps
Introduction to Database
What’s DBMS
SQL Database Manipulation
Exercises
Agenda
Your Apps
Your Apps
Your Apps
Your Apps
 Pros
 Readable Code
 Didn’t fail any test case
 Simple interface
 Cons
 Very abstract interface ( Not impressive )
Score 7 / 10
Your Apps
Your Apps
 Pros
 Readable Code
 Didn’t fail any test case
 Simple interface
 Cons
 Non matching colors
 Some parts in the layout are not responsive
Score 6.5 / 10
Your Apps
Your Apps
 Pros
 Readable Code
 Didn’t fail any test case
 Simple interface
 Cons
 Non matching colors
 Not responsive
Score 5.5 / 10
Your apps
Your Apps
 Pros
 Readable Code
 All test cases passed
 Elegant interface
 Cons
 Some components are responsive and some are not
Score 7 / 10
Your Apps
Your Apps
 Pros
 Readable Code
 Failed a test case ( Only one ) 
 Elegant interface
 Developed more functionalities
 Cons
 One of his extra functionalities produces wrong output
 His design is not creative
 Over handling to exception that will never happen (Long code)
Score 8 / 10
Your Apps
Your Apps
 Pros
 Readable Code
 All test cases passed
 Creative interface
 Cons
 Some components are responsive and some are not
Score 8 / 10
What is Database
 A structured set of data held in a computer, especially one that is
accessible in various ways.
Types of database
Database Management System
 A database management system (DBMS) is system software for creating and
managing databases.
 The DBMS provides users and programmers with a systematic way to
 Create
 Read
 Update
 Manage data
Data manipulation
Structured Query Language
 Structured Query Language (SQL) is a standard
computer language for relational database management and data
manipulation.
 SQL is used to query, insert, update and modify data.
Manipulation level
Database
Tables
Queries
Create
 Database:
CREATE DATABASE DB_name ;
 Table:
 CREATE TABLE table_name(
column1 datatype,
column2 datatype,
..... ,
columnN datatype,
PRIMARY KEY( one or more columns )
);
 Query:
 INSERT INTO TABLE_NAME VALUES (value1, value2,
value3,...valueN);
 INSERT INTO TABLE_NAME (column1, column2,
column3,...columnN) VALUES (value1, value2, value3,...valueN);
Data Types
 CHARACTER [(length)] or CHAR [(length)]
 VARCHAR (length)
 BOOLEAN
 SMALLINT
 INTEGER
 FLOAT
 DATE
 TIME
 BLOB
Read
 Database:
 USE DatabaseName;
 Query:
SELECT column FROM table_name;
SELECT column1, column2, …, columnN FROM table_name;
SELECT * FROM table_name;
Update
 Query:
 UPDATE table_name SET column1 = value1, column2 = value2....,
columnN = valueN WHERE [condition];
Exercise
Delete
 Database:
 DROP DATABASE DatabaseName;
 Table:
 DROP TABLE table_name;
 Query:
 DELETE FROM table_name WHERE condition;
Exercise
Aggregate Functions
 Reference : https://www.w3schools.com/sql/sql_functions.asp
AVG() Returns the average value
COUNT() Returns the number of rows
FIRST() Returns the first value
LAST() Returns the last value
MAX() Returns the largest value
MIN() Returns the smallest value
ROUND() Rounds a numeric field to the number
of decimals specified
SUM() Returns the sum
Examples
 SELECT COUNT(*) FROM table_name;
 The COUNT(*) function returns the number of records in a table:
 SELECT COUNT(column_name) FROM table_name;
 The COUNT(column_name) function returns the number of values
(NULL values will not be counted) of the specified column
 SELECT AVG(column) AS averageOfCol FROM Products;
 Return the average of col and name it averageOfCol
Foreign Key
 A FOREIGN KEY is a key used to link two tables together.
 A FOREIGN KEY in a table points to a PRIMARY KEY in another table.
PersonID LastName FirstName Age
1 Hansen Ola 20
2 Svendson Tove 23
3 Pettersen Kari 21
OrderID OrderNumber PersonID
1 1321312 3
2 2131222 3
3 2311313 1
4 3311233 2
Foreign key
 CREATE TABLE Orders (
OrderID int NOT NULL PRIMARY KEY,
OrderNumber int NOT NULL,
PersonID int,
FOREIGN KEY (PersonID) REFERENCES Persons(PersonID)
);
Dependent Table
 Table with no primary key
 Any record belong to another record in another table
PersonID Last Name First Name Age
1 Mohey Sandra 20
2 Samir Mohamed 23
3 Zakryia Noha 21
PersonID Children Name
1 Hamda Mohey
1 Tamer Mohey
2 Magdy Samir
2 Kenzy Samir
Exercise
Session 6#
Session 6#

More Related Content

What's hot

Sql Basics | Edureka
Sql Basics | EdurekaSql Basics | Edureka
Sql Basics | Edureka
Edureka!
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
Ehsan Hamzei
 
SQL Overview
SQL OverviewSQL Overview
SQL Overview
Stewart Rogers
 
SQL Server Learning Drive
SQL Server Learning Drive SQL Server Learning Drive
SQL Server Learning Drive
TechandMate
 
Introduction to structured query language (sql)
Introduction to structured query language (sql)Introduction to structured query language (sql)
Introduction to structured query language (sql)
Sabana Maharjan
 
Introduction to sql
Introduction to sqlIntroduction to sql
Introduction to sql
VARSHAKUMARI49
 
MS SQL Server 1
MS SQL Server 1MS SQL Server 1
MS SQL Server 1Iblesoft
 
SQL Queries
SQL QueriesSQL Queries
SQL Queries
Nilt1234
 
Relational database management system
Relational database management systemRelational database management system
Relational database management system
Praveen Soni
 
Sql
SqlSql
Structure query language (sql)
Structure query language (sql)Structure query language (sql)
Structure query language (sql)
Nalina Kumari
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
Mahir Haque
 
Ms sql server ii
Ms sql server  iiMs sql server  ii
Ms sql server iiIblesoft
 
Introduction to-sql
Introduction to-sqlIntroduction to-sql
Introduction to-sql
BG Java EE Course
 
introdution to SQL and SQL functions
introdution to SQL and SQL functionsintrodution to SQL and SQL functions
introdution to SQL and SQL functions
farwa waqar
 
Xml part4
Xml part4Xml part4
Xml part4
NOHA AW
 
Chapter 4 Structured Query Language
Chapter 4 Structured Query LanguageChapter 4 Structured Query Language
Chapter 4 Structured Query Language
Eddyzulham Mahluzydde
 
PostgreSQL Tutorial for Beginners | Edureka
PostgreSQL Tutorial for Beginners | EdurekaPostgreSQL Tutorial for Beginners | Edureka
PostgreSQL Tutorial for Beginners | Edureka
Edureka!
 
A must Sql notes for beginners
A must Sql notes for beginnersA must Sql notes for beginners
A must Sql notes for beginners
Ram Sagar Mourya
 

What's hot (20)

Sql Basics | Edureka
Sql Basics | EdurekaSql Basics | Edureka
Sql Basics | Edureka
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
 
SQL Overview
SQL OverviewSQL Overview
SQL Overview
 
SQL Server Learning Drive
SQL Server Learning Drive SQL Server Learning Drive
SQL Server Learning Drive
 
Introduction to structured query language (sql)
Introduction to structured query language (sql)Introduction to structured query language (sql)
Introduction to structured query language (sql)
 
Introduction to sql
Introduction to sqlIntroduction to sql
Introduction to sql
 
MS SQL Server 1
MS SQL Server 1MS SQL Server 1
MS SQL Server 1
 
SQL Queries
SQL QueriesSQL Queries
SQL Queries
 
Relational database management system
Relational database management systemRelational database management system
Relational database management system
 
Sql
SqlSql
Sql
 
Structure query language (sql)
Structure query language (sql)Structure query language (sql)
Structure query language (sql)
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
 
Ms sql server ii
Ms sql server  iiMs sql server  ii
Ms sql server ii
 
Introduction to-sql
Introduction to-sqlIntroduction to-sql
Introduction to-sql
 
introdution to SQL and SQL functions
introdution to SQL and SQL functionsintrodution to SQL and SQL functions
introdution to SQL and SQL functions
 
Nota ms access 2007
Nota ms access 2007Nota ms access 2007
Nota ms access 2007
 
Xml part4
Xml part4Xml part4
Xml part4
 
Chapter 4 Structured Query Language
Chapter 4 Structured Query LanguageChapter 4 Structured Query Language
Chapter 4 Structured Query Language
 
PostgreSQL Tutorial for Beginners | Edureka
PostgreSQL Tutorial for Beginners | EdurekaPostgreSQL Tutorial for Beginners | Edureka
PostgreSQL Tutorial for Beginners | Edureka
 
A must Sql notes for beginners
A must Sql notes for beginnersA must Sql notes for beginners
A must Sql notes for beginners
 

Similar to Session 6#

Getting Started with SQL Language.pptx
Getting Started with SQL Language.pptxGetting Started with SQL Language.pptx
Getting Started with SQL Language.pptx
Cecilia Brusatori
 
MDI Training DB2 Course
MDI Training DB2 CourseMDI Training DB2 Course
MDI Training DB2 CourseMarcus Davage
 
Rdbms day3
Rdbms day3Rdbms day3
Rdbms day3
Nitesh Singh
 
Database Architecture and Basic Concepts
Database Architecture and Basic ConceptsDatabase Architecture and Basic Concepts
Database Architecture and Basic Concepts
Tony Wong
 
Sql intro & ddl 1
Sql intro & ddl 1Sql intro & ddl 1
Sql intro & ddl 1
Dr. C.V. Suresh Babu
 
Sql for biggner
Sql for biggnerSql for biggner
Sql for biggner
Arvind Kumar
 
ORACLE PL SQL
ORACLE PL SQLORACLE PL SQL
ORACLE PL SQL
Srinath Maharana
 
PO WER - Piotr Mariat - Sql
PO WER - Piotr Mariat - SqlPO WER - Piotr Mariat - Sql
PO WER - Piotr Mariat - Sql
Zespół Szkół nr 26
 
Sql tutorial
Sql tutorialSql tutorial
Sql tutorial
Rumman Ansari
 
Introduction to sql new
Introduction to sql newIntroduction to sql new
Introduction to sql newSANTOSH RATH
 
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
 
Physical Design and Development
Physical Design and DevelopmentPhysical Design and Development
Physical Design and Development
Er. Nawaraj Bhandari
 
Les09
Les09Les09
BCS4L1-Database Management lab.pdf
BCS4L1-Database Management lab.pdfBCS4L1-Database Management lab.pdf
BCS4L1-Database Management lab.pdf
KeerthanaP37
 

Similar to Session 6# (20)

Getting Started with SQL Language.pptx
Getting Started with SQL Language.pptxGetting Started with SQL Language.pptx
Getting Started with SQL Language.pptx
 
Sql 2006
Sql 2006Sql 2006
Sql 2006
 
MDI Training DB2 Course
MDI Training DB2 CourseMDI Training DB2 Course
MDI Training DB2 Course
 
Rdbms day3
Rdbms day3Rdbms day3
Rdbms day3
 
Database Architecture and Basic Concepts
Database Architecture and Basic ConceptsDatabase Architecture and Basic Concepts
Database Architecture and Basic Concepts
 
Sql intro & ddl 1
Sql intro & ddl 1Sql intro & ddl 1
Sql intro & ddl 1
 
Sql intro & ddl 1
Sql intro & ddl 1Sql intro & ddl 1
Sql intro & ddl 1
 
Dbms sql-final
Dbms  sql-finalDbms  sql-final
Dbms sql-final
 
Sql for biggner
Sql for biggnerSql for biggner
Sql for biggner
 
ORACLE PL SQL
ORACLE PL SQLORACLE PL SQL
ORACLE PL SQL
 
PO WER - Piotr Mariat - Sql
PO WER - Piotr Mariat - SqlPO WER - Piotr Mariat - Sql
PO WER - Piotr Mariat - Sql
 
Sql tutorial
Sql tutorialSql tutorial
Sql tutorial
 
Less08 Schema
Less08 SchemaLess08 Schema
Less08 Schema
 
Introduction to sql new
Introduction to sql newIntroduction to sql new
Introduction to sql new
 
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)
 
Physical Design and Development
Physical Design and DevelopmentPhysical Design and Development
Physical Design and Development
 
lovely
lovelylovely
lovely
 
Les09
Les09Les09
Les09
 
BCS4L1-Database Management lab.pdf
BCS4L1-Database Management lab.pdfBCS4L1-Database Management lab.pdf
BCS4L1-Database Management lab.pdf
 
Module02
Module02Module02
Module02
 

More from Mohamed Samir

Fight for the quality of architecture against delivery - JobStack Cegedim
Fight for the quality of architecture against delivery - JobStack Cegedim Fight for the quality of architecture against delivery - JobStack Cegedim
Fight for the quality of architecture against delivery - JobStack Cegedim
Mohamed Samir
 
An evaluation of FaaS platforms as a foundation for serverless big data proce...
An evaluation of FaaS platforms as a foundation for serverless big data proce...An evaluation of FaaS platforms as a foundation for serverless big data proce...
An evaluation of FaaS platforms as a foundation for serverless big data proce...
Mohamed Samir
 
Serverless Computing Model
Serverless Computing ModelServerless Computing Model
Serverless Computing Model
Mohamed Samir
 
Session 5#
Session 5#Session 5#
Session 5#
Mohamed Samir
 
Session 4#
Session 4#Session 4#
Session 4#
Mohamed Samir
 
Session 3#
Session 3#Session 3#
Session 3#
Mohamed Samir
 
Session#2
Session#2Session#2
Session#2
Mohamed Samir
 
Session#1
Session#1Session#1
Session#1
Mohamed Samir
 

More from Mohamed Samir (8)

Fight for the quality of architecture against delivery - JobStack Cegedim
Fight for the quality of architecture against delivery - JobStack Cegedim Fight for the quality of architecture against delivery - JobStack Cegedim
Fight for the quality of architecture against delivery - JobStack Cegedim
 
An evaluation of FaaS platforms as a foundation for serverless big data proce...
An evaluation of FaaS platforms as a foundation for serverless big data proce...An evaluation of FaaS platforms as a foundation for serverless big data proce...
An evaluation of FaaS platforms as a foundation for serverless big data proce...
 
Serverless Computing Model
Serverless Computing ModelServerless Computing Model
Serverless Computing Model
 
Session 5#
Session 5#Session 5#
Session 5#
 
Session 4#
Session 4#Session 4#
Session 4#
 
Session 3#
Session 3#Session 3#
Session 3#
 
Session#2
Session#2Session#2
Session#2
 
Session#1
Session#1Session#1
Session#1
 

Recently uploaded

MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
bennyroshan06
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
AzmatAli747758
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
rosedainty
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
Celine George
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
Vivekanand Anglo Vedic Academy
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 

Recently uploaded (20)

MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 

Session 6#

  • 1. Introduction to Windows Phone & Database Session 6#
  • 2. 1 2 3 4 5 Discussion on your apps Introduction to Database What’s DBMS SQL Database Manipulation Exercises Agenda
  • 6. Your Apps  Pros  Readable Code  Didn’t fail any test case  Simple interface  Cons  Very abstract interface ( Not impressive ) Score 7 / 10
  • 8. Your Apps  Pros  Readable Code  Didn’t fail any test case  Simple interface  Cons  Non matching colors  Some parts in the layout are not responsive Score 6.5 / 10
  • 10. Your Apps  Pros  Readable Code  Didn’t fail any test case  Simple interface  Cons  Non matching colors  Not responsive Score 5.5 / 10
  • 12. Your Apps  Pros  Readable Code  All test cases passed  Elegant interface  Cons  Some components are responsive and some are not Score 7 / 10
  • 14. Your Apps  Pros  Readable Code  Failed a test case ( Only one )   Elegant interface  Developed more functionalities  Cons  One of his extra functionalities produces wrong output  His design is not creative  Over handling to exception that will never happen (Long code) Score 8 / 10
  • 16. Your Apps  Pros  Readable Code  All test cases passed  Creative interface  Cons  Some components are responsive and some are not Score 8 / 10
  • 17. What is Database  A structured set of data held in a computer, especially one that is accessible in various ways.
  • 19. Database Management System  A database management system (DBMS) is system software for creating and managing databases.  The DBMS provides users and programmers with a systematic way to  Create  Read  Update  Manage data
  • 21. Structured Query Language  Structured Query Language (SQL) is a standard computer language for relational database management and data manipulation.  SQL is used to query, insert, update and modify data.
  • 23. Create  Database: CREATE DATABASE DB_name ;  Table:  CREATE TABLE table_name( column1 datatype, column2 datatype, ..... , columnN datatype, PRIMARY KEY( one or more columns ) );  Query:  INSERT INTO TABLE_NAME VALUES (value1, value2, value3,...valueN);  INSERT INTO TABLE_NAME (column1, column2, column3,...columnN) VALUES (value1, value2, value3,...valueN);
  • 24. Data Types  CHARACTER [(length)] or CHAR [(length)]  VARCHAR (length)  BOOLEAN  SMALLINT  INTEGER  FLOAT  DATE  TIME  BLOB
  • 25. Read  Database:  USE DatabaseName;  Query: SELECT column FROM table_name; SELECT column1, column2, …, columnN FROM table_name; SELECT * FROM table_name;
  • 26. Update  Query:  UPDATE table_name SET column1 = value1, column2 = value2...., columnN = valueN WHERE [condition];
  • 28. Delete  Database:  DROP DATABASE DatabaseName;  Table:  DROP TABLE table_name;  Query:  DELETE FROM table_name WHERE condition;
  • 30. Aggregate Functions  Reference : https://www.w3schools.com/sql/sql_functions.asp AVG() Returns the average value COUNT() Returns the number of rows FIRST() Returns the first value LAST() Returns the last value MAX() Returns the largest value MIN() Returns the smallest value ROUND() Rounds a numeric field to the number of decimals specified SUM() Returns the sum
  • 31. Examples  SELECT COUNT(*) FROM table_name;  The COUNT(*) function returns the number of records in a table:  SELECT COUNT(column_name) FROM table_name;  The COUNT(column_name) function returns the number of values (NULL values will not be counted) of the specified column  SELECT AVG(column) AS averageOfCol FROM Products;  Return the average of col and name it averageOfCol
  • 32. Foreign Key  A FOREIGN KEY is a key used to link two tables together.  A FOREIGN KEY in a table points to a PRIMARY KEY in another table. PersonID LastName FirstName Age 1 Hansen Ola 20 2 Svendson Tove 23 3 Pettersen Kari 21 OrderID OrderNumber PersonID 1 1321312 3 2 2131222 3 3 2311313 1 4 3311233 2
  • 33. Foreign key  CREATE TABLE Orders ( OrderID int NOT NULL PRIMARY KEY, OrderNumber int NOT NULL, PersonID int, FOREIGN KEY (PersonID) REFERENCES Persons(PersonID) );
  • 34. Dependent Table  Table with no primary key  Any record belong to another record in another table PersonID Last Name First Name Age 1 Mohey Sandra 20 2 Samir Mohamed 23 3 Zakryia Noha 21 PersonID Children Name 1 Hamda Mohey 1 Tamer Mohey 2 Magdy Samir 2 Kenzy Samir