SlideShare a Scribd company logo
1 of 31
Collecting Information
Task 3: Keys
and
Relationships
What does Primary Key mean?
Definition - A primary key is a special
relational database table column (or
combination of columns) designated to
uniquely identify all table records.
A primary key is used as a unique
identifier to quickly parse data within
the database and find the relation
between different tables. A relational
database cannot have more than one
primary key.
A primary key’s main features
are:
It must contain a unique value for
each row of data.
It cannot contain null values.
Every row must have a primary key
value.
A primary key is either an existing
table column or a column that is
specifically generated by the database
according to a defined sequence.
Collecting Information
identify a
primary key
How do you identify a primary
key?
The primary key consists of one or
more columns whose data contained
within are used to
uniquely identify each row in the table.
You can think of them as an address. If
the rows in a table were mailboxes,
then the primary key would be the
listing of street addresses.
https://www.youtube.co
m/watch?v=Py6F4vF5n
Primary
Key
Video
What is primary key and
example?
 A primary key is either an existing
table column or a column that is
specifically generated by the
database according to a defined
sequence. For example, students
are routinely assigned unique
identification (ID) numbers, and all
adults receive government-
assigned and uniquely-identifiable
Social Security numbers
What is the function of primary
key?
 The main purpose of a primary key is to
implement a relationship between two
tables in a relational database
Can a table have two primary
keys?
 A table can have only one primary key,
which may consist of single
or multiple fields. When multiple fields are
used as a primary key, they are called a
composite key. If a table has a primary
key defined on any field(s), then you
cannot have two records having the same
value of that field(s).
Is it mandatory for the primary key to
be given a value when a new record
is inserted?
Primary keys must contain
unique values. A primary key column
cannot have NULL values. ... If a table
has a primary key defined on any
field(s), then you cannot have
two records having the same value of
that field(s). Note − You would use
these concepts while creating database
tables.
ID FIELD
An identity column is a column (also
known as a field) in a database table that is
made up of values generated by
the database.
What is ID field?
Fields are elements in a table. ...
A field may be designated as a primary key,
where it has a unique value for each record,
is indexed, and identifies a record.
https://www.youtube.com/watch?v=kG5edDF
ilhw
ID FIELD
ID FIELD
 An ID field is normally designated as
a primary key, and it is usually placed
into a second table in order to create a
relationship between them.
Example of ID Field
 Admission no
 Registration No
 Employee No
 NIC (National Identity card Number).
 Student GR No
TABLE
RELATIONSHIPS
TABLE RELATIONSHIPS
 What are the 3 types of relationships
in a database?
 There are three types of relationships
between the data you are likely to
encounter at this stage in the design:
one-to-one, one-to-many, and many-
to-many. To be able to identify these
relationships, you need to examine the
data and have an understanding of
what business rules apply to the data
and tables
What is table relationship
in database?
 A relationship, in the context
of databases, is a situation that exists
between two relational database
tables when one table has a foreign key
that references the primary key of the
other table.
 Relationships allow
relational databases to split and store
data in different tables, while linking
disparate data items.
What is an example of a one to
one relationship?
A one-to-one relationship exists
when each row in one table has
only one related row in a second table.
For example, a business might decide
to assign one office to
exactly one employee.
Thus, one employee can have
only one office. The same business
might also decide that a department can
have only one manager
What is a many to one
relationship?
 A many-to-one relationship is
where one entity (typically a column or
set of columns) contains values that
refer to another entity (a column or set
of columns) that has unique values
What is the most common
type of relationship between
two tables?
one-to-many relationship
 A one-to-many relationship is
the most common
relationship found between tables in
a relational database.
 The following is an example of
a form used in a database to display
the data from two tables with a one-
to-many relationship.
Many-to-many relationships
https://fmhelp.filemaker.com › help › fmp ›
FMP_Help › many-to-many-r...
Many-to-many relationships. A many-to-
many relationship occurs
When multiple records in a table are
associated with multiple records in
another table. For example, a many-to-
many relationship exists between
customers and products: customers can
purchase various products, and products
can be purchased by many customers.
Collecting Information
Record &
Fields
In Database
What is a table record?
 In database, a table is a data
structure where data can be organized
in fields (columns) & records (rows).
For example, information of the
employees of an organization needs
to be stored. ... A record represents
set of related data. Complete set of
values for all column/field is
called record or row
What are the fields in a
database?
 In computer science, data that has
several parts, known as a record, can
be divided into fields. Relational
databases arrange data as sets of
database records, so called rows.
Each record consists of several fields;
the fields of all records form the
columns. Examples of fields: name,
gender, hair colour
What is record with example?
Records are composed of fields, each of
which contains one item of information. A
set of records constitutes a file.
 For example, a personnel file might
contain records that have three fields: a
name field, an address field, and a
phone number field. In relational
database management
systems, records are called tuples
• a data structure consisting of multiple
parts.
What is the difference between a
field and a record?
 Fields and records are two basic
components of a database, which is
an organized collection of information,
or data. The term "fields" refers to
columns, or vertical categories of data
while the term "records" refers to
rows, or horizontal groupings of
unique field data.

What is Field record and table in
database?
 Data is stored in records. A record is
composed of fields and contains all
the data about one particular person,
company, or item in a database. In
this database, a record contains the
data for one customer support incident
report. Records appear as rows in
the database table
What are fields in Excel?
 Each individual item of information in a
database record – such as a
telephone number or street number –
is referred to as a field.
 In Excel, the individual cells of a
worksheet serve as fields, since each
cell can contain a single piece of
information about an object
what is the difference between
database and table?
 Database: collection of organized
data and specific features to access
them. Organized means in the form
of tables, views and stored
procedures, functions etc to access
the data. Table : collection of Rows
and Columns to store the data
What is the relationship between
a database and a table?
 A database is a collection of
interrelated data , these data are
stored in the table which are related to
one another , to search and retrieve
data queries are made . A table is
made up of rows and columns , data
of databases are stored in the table
How is database related to a
table?
A table is a collection of related data
held in a table format within
a database. ... In relational databases,
and flat file databases, a table is a set
of data elements (values) using a model
of vertical columns (identifiable by
name) and horizontal rows, the cell
being the unit where a row and column
intersect.
Should all tables have a primary
key?
It is a good practice to have a PK on
every table, but it's not a MUST. ...
"PRIMARY KEY constraints identify the
column or set of columns
that have values that uniquely identify a
row in a table. No two rows in
a table can have the same primary
key value. You cannot enter NULL for
any column in a primary key
GOOD BYE

More Related Content

What's hot

Python Collections
Python CollectionsPython Collections
Python Collectionssachingarg0
 
Introduction of Database Design and Development
Introduction of Database Design and DevelopmentIntroduction of Database Design and Development
Introduction of Database Design and DevelopmentEr. Nawaraj Bhandari
 
Excel tip: COUNTIF and COUNTIFS
Excel tip: COUNTIF and COUNTIFSExcel tip: COUNTIF and COUNTIFS
Excel tip: COUNTIF and COUNTIFSStefania Borchia
 
Data Warehouse Architecture.pptx
Data Warehouse Architecture.pptxData Warehouse Architecture.pptx
Data Warehouse Architecture.pptx22PCS007ANBUF
 
1. SQL Basics - Introduction
1. SQL Basics - Introduction1. SQL Basics - Introduction
1. SQL Basics - IntroductionVarun A M
 
Significance of Data Mining
Significance of Data MiningSignificance of Data Mining
Significance of Data Mining8trackweb
 
Key and its different types
Key and its different typesKey and its different types
Key and its different typesUmair Shakir
 
Excel training by rajesh p
Excel training by rajesh pExcel training by rajesh p
Excel training by rajesh pRajesh P
 
MS Sql Server: Introduction To Database Concepts
MS Sql Server: Introduction To Database ConceptsMS Sql Server: Introduction To Database Concepts
MS Sql Server: Introduction To Database ConceptsDataminingTools Inc
 
Database index by Reema Gajjar
Database index by Reema GajjarDatabase index by Reema Gajjar
Database index by Reema GajjarReema Gajjar
 
Microsoft excel
Microsoft excelMicrosoft excel
Microsoft excelwaszia
 
MS Excel Ch 1 PPT
MS Excel Ch 1 PPTMS Excel Ch 1 PPT
MS Excel Ch 1 PPTprsmith72
 
Dbms Introduction and Basics
Dbms Introduction and BasicsDbms Introduction and Basics
Dbms Introduction and BasicsSHIKHA GAUTAM
 
Data Warehouse Back to Basics: Dimensional Modeling
Data Warehouse Back to Basics: Dimensional ModelingData Warehouse Back to Basics: Dimensional Modeling
Data Warehouse Back to Basics: Dimensional ModelingDunn Solutions Group
 
Schemas for multidimensional databases
Schemas for multidimensional databasesSchemas for multidimensional databases
Schemas for multidimensional databasesyazad dumasia
 
Database Indexes
Database IndexesDatabase Indexes
Database IndexesSperasoft
 

What's hot (20)

Sql Server Basics
Sql Server BasicsSql Server Basics
Sql Server Basics
 
Python Collections
Python CollectionsPython Collections
Python Collections
 
Introduction of Database Design and Development
Introduction of Database Design and DevelopmentIntroduction of Database Design and Development
Introduction of Database Design and Development
 
Excel tip: COUNTIF and COUNTIFS
Excel tip: COUNTIF and COUNTIFSExcel tip: COUNTIF and COUNTIFS
Excel tip: COUNTIF and COUNTIFS
 
Data Warehouse Architecture.pptx
Data Warehouse Architecture.pptxData Warehouse Architecture.pptx
Data Warehouse Architecture.pptx
 
Pivot Tables
Pivot TablesPivot Tables
Pivot Tables
 
1. SQL Basics - Introduction
1. SQL Basics - Introduction1. SQL Basics - Introduction
1. SQL Basics - Introduction
 
Significance of Data Mining
Significance of Data MiningSignificance of Data Mining
Significance of Data Mining
 
Key and its different types
Key and its different typesKey and its different types
Key and its different types
 
Excel training by rajesh p
Excel training by rajesh pExcel training by rajesh p
Excel training by rajesh p
 
Pivot Tables
Pivot TablesPivot Tables
Pivot Tables
 
MS Sql Server: Introduction To Database Concepts
MS Sql Server: Introduction To Database ConceptsMS Sql Server: Introduction To Database Concepts
MS Sql Server: Introduction To Database Concepts
 
Database index by Reema Gajjar
Database index by Reema GajjarDatabase index by Reema Gajjar
Database index by Reema Gajjar
 
Microsoft excel
Microsoft excelMicrosoft excel
Microsoft excel
 
MS Excel Ch 1 PPT
MS Excel Ch 1 PPTMS Excel Ch 1 PPT
MS Excel Ch 1 PPT
 
Dbms Introduction and Basics
Dbms Introduction and BasicsDbms Introduction and Basics
Dbms Introduction and Basics
 
Data Warehouse Back to Basics: Dimensional Modeling
Data Warehouse Back to Basics: Dimensional ModelingData Warehouse Back to Basics: Dimensional Modeling
Data Warehouse Back to Basics: Dimensional Modeling
 
Schemas for multidimensional databases
Schemas for multidimensional databasesSchemas for multidimensional databases
Schemas for multidimensional databases
 
Database Indexes
Database IndexesDatabase Indexes
Database Indexes
 
Deep Dive on Amazon Redshift
Deep Dive on Amazon RedshiftDeep Dive on Amazon Redshift
Deep Dive on Amazon Redshift
 

Similar to Key,ID Field and Tables Relationship

Similar to Key,ID Field and Tables Relationship (20)

Database.pptx
Database.pptxDatabase.pptx
Database.pptx
 
Indexing techniques
Indexing techniquesIndexing techniques
Indexing techniques
 
Data resource management
Data resource managementData resource management
Data resource management
 
Manjeet Singh.pptx
Manjeet Singh.pptxManjeet Singh.pptx
Manjeet Singh.pptx
 
Data processing
Data processingData processing
Data processing
 
introductiontodatabases-151106233350-lva1-app6892(2).pptx
introductiontodatabases-151106233350-lva1-app6892(2).pptxintroductiontodatabases-151106233350-lva1-app6892(2).pptx
introductiontodatabases-151106233350-lva1-app6892(2).pptx
 
Introduction to databases
Introduction to databasesIntroduction to databases
Introduction to databases
 
DB- Lect #1 Intro.pdf
DB- Lect #1 Intro.pdfDB- Lect #1 Intro.pdf
DB- Lect #1 Intro.pdf
 
DATABASE CONCEPTS AND PRACTICAL EXAMPLES
DATABASE CONCEPTS AND PRACTICAL EXAMPLESDATABASE CONCEPTS AND PRACTICAL EXAMPLES
DATABASE CONCEPTS AND PRACTICAL EXAMPLES
 
2. Introduction to Data Structure.pdf
2. Introduction to Data Structure.pdf2. Introduction to Data Structure.pdf
2. Introduction to Data Structure.pdf
 
DBMS-Unit-2.pptx
DBMS-Unit-2.pptxDBMS-Unit-2.pptx
DBMS-Unit-2.pptx
 
CIS145 Final Review
CIS145 Final ReviewCIS145 Final Review
CIS145 Final Review
 
database concepts.pptx
database concepts.pptxdatabase concepts.pptx
database concepts.pptx
 
Introduction to Data Structure
Introduction to Data StructureIntroduction to Data Structure
Introduction to Data Structure
 
Cis145 Final Review
Cis145 Final ReviewCis145 Final Review
Cis145 Final Review
 
ARRAYS IN C++ CBSE AND STATE +2 COMPUTER SCIENCE
ARRAYS IN C++ CBSE AND STATE +2 COMPUTER SCIENCEARRAYS IN C++ CBSE AND STATE +2 COMPUTER SCIENCE
ARRAYS IN C++ CBSE AND STATE +2 COMPUTER SCIENCE
 
Data structure & algorithms introduction
Data structure & algorithms introductionData structure & algorithms introduction
Data structure & algorithms introduction
 
Create a table access - office
Create a table   access - officeCreate a table   access - office
Create a table access - office
 
Relational Model
Relational ModelRelational Model
Relational Model
 
The Relational Model
The Relational ModelThe Relational Model
The Relational Model
 

More from ShouaQureshi

scanners touchscreen bar code readers
scanners touchscreen bar code readersscanners touchscreen bar code readers
scanners touchscreen bar code readersShouaQureshi
 
impact and non impact printers
impact and non impact printers impact and non impact printers
impact and non impact printers ShouaQureshi
 
Input and output devices
Input and output devicesInput and output devices
Input and output devicesShouaQureshi
 
Multiple choice questions chapter 1
Multiple choice questions  chapter 1Multiple choice questions  chapter 1
Multiple choice questions chapter 1ShouaQureshi
 
Hacker cracker cybercrime-computer security
Hacker cracker cybercrime-computer securityHacker cracker cybercrime-computer security
Hacker cracker cybercrime-computer securityShouaQureshi
 
Malware and its types
Malware and its typesMalware and its types
Malware and its typesShouaQureshi
 
Class ix ms word part 1
Class ix ms word part 1Class ix ms word part 1
Class ix ms word part 1ShouaQureshi
 
Word processing part 2 lecture and assignment updated
Word processing part 2 lecture and assignment updatedWord processing part 2 lecture and assignment updated
Word processing part 2 lecture and assignment updatedShouaQureshi
 
Manupulating and formatting data
Manupulating and formatting dataManupulating and formatting data
Manupulating and formatting dataShouaQureshi
 
Protect computer from malware
Protect computer from malwareProtect computer from malware
Protect computer from malwareShouaQureshi
 

More from ShouaQureshi (18)

touchscreens
touchscreenstouchscreens
touchscreens
 
3D Priinters
3D Priinters 3D Priinters
3D Priinters
 
2D and 3D Cutter
2D and 3D Cutter 2D and 3D Cutter
2D and 3D Cutter
 
scanners touchscreen bar code readers
scanners touchscreen bar code readersscanners touchscreen bar code readers
scanners touchscreen bar code readers
 
impact and non impact printers
impact and non impact printers impact and non impact printers
impact and non impact printers
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
2d and 3d cutters
2d and 3d cutters2d and 3d cutters
2d and 3d cutters
 
Input and output devices
Input and output devicesInput and output devices
Input and output devices
 
Malware part 2
Malware part 2Malware part 2
Malware part 2
 
Malware part 1
Malware part 1Malware part 1
Malware part 1
 
Multiple choice questions chapter 1
Multiple choice questions  chapter 1Multiple choice questions  chapter 1
Multiple choice questions chapter 1
 
Hacker cracker cybercrime-computer security
Hacker cracker cybercrime-computer securityHacker cracker cybercrime-computer security
Hacker cracker cybercrime-computer security
 
Malware and its types
Malware and its typesMalware and its types
Malware and its types
 
Class ix ms word part 1
Class ix ms word part 1Class ix ms word part 1
Class ix ms word part 1
 
Word processing part 2 lecture and assignment updated
Word processing part 2 lecture and assignment updatedWord processing part 2 lecture and assignment updated
Word processing part 2 lecture and assignment updated
 
Spreadsheet new
Spreadsheet newSpreadsheet new
Spreadsheet new
 
Manupulating and formatting data
Manupulating and formatting dataManupulating and formatting data
Manupulating and formatting data
 
Protect computer from malware
Protect computer from malwareProtect computer from malware
Protect computer from malware
 

Recently uploaded

Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 

Recently uploaded (20)

Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 

Key,ID Field and Tables Relationship

  • 1. Collecting Information Task 3: Keys and Relationships
  • 2. What does Primary Key mean? Definition - A primary key is a special relational database table column (or combination of columns) designated to uniquely identify all table records. A primary key is used as a unique identifier to quickly parse data within the database and find the relation between different tables. A relational database cannot have more than one primary key.
  • 3. A primary key’s main features are: It must contain a unique value for each row of data. It cannot contain null values. Every row must have a primary key value. A primary key is either an existing table column or a column that is specifically generated by the database according to a defined sequence.
  • 5. How do you identify a primary key? The primary key consists of one or more columns whose data contained within are used to uniquely identify each row in the table. You can think of them as an address. If the rows in a table were mailboxes, then the primary key would be the listing of street addresses. https://www.youtube.co m/watch?v=Py6F4vF5n Primary Key Video
  • 6. What is primary key and example?  A primary key is either an existing table column or a column that is specifically generated by the database according to a defined sequence. For example, students are routinely assigned unique identification (ID) numbers, and all adults receive government- assigned and uniquely-identifiable Social Security numbers
  • 7. What is the function of primary key?  The main purpose of a primary key is to implement a relationship between two tables in a relational database Can a table have two primary keys?  A table can have only one primary key, which may consist of single or multiple fields. When multiple fields are used as a primary key, they are called a composite key. If a table has a primary key defined on any field(s), then you cannot have two records having the same value of that field(s).
  • 8. Is it mandatory for the primary key to be given a value when a new record is inserted? Primary keys must contain unique values. A primary key column cannot have NULL values. ... If a table has a primary key defined on any field(s), then you cannot have two records having the same value of that field(s). Note − You would use these concepts while creating database tables.
  • 10. An identity column is a column (also known as a field) in a database table that is made up of values generated by the database. What is ID field? Fields are elements in a table. ... A field may be designated as a primary key, where it has a unique value for each record, is indexed, and identifies a record. https://www.youtube.com/watch?v=kG5edDF ilhw ID FIELD
  • 11. ID FIELD  An ID field is normally designated as a primary key, and it is usually placed into a second table in order to create a relationship between them.
  • 12. Example of ID Field  Admission no  Registration No  Employee No  NIC (National Identity card Number).  Student GR No
  • 14. TABLE RELATIONSHIPS  What are the 3 types of relationships in a database?  There are three types of relationships between the data you are likely to encounter at this stage in the design: one-to-one, one-to-many, and many- to-many. To be able to identify these relationships, you need to examine the data and have an understanding of what business rules apply to the data and tables
  • 15. What is table relationship in database?  A relationship, in the context of databases, is a situation that exists between two relational database tables when one table has a foreign key that references the primary key of the other table.  Relationships allow relational databases to split and store data in different tables, while linking disparate data items.
  • 16. What is an example of a one to one relationship? A one-to-one relationship exists when each row in one table has only one related row in a second table. For example, a business might decide to assign one office to exactly one employee. Thus, one employee can have only one office. The same business might also decide that a department can have only one manager
  • 17. What is a many to one relationship?  A many-to-one relationship is where one entity (typically a column or set of columns) contains values that refer to another entity (a column or set of columns) that has unique values
  • 18. What is the most common type of relationship between two tables? one-to-many relationship  A one-to-many relationship is the most common relationship found between tables in a relational database.  The following is an example of a form used in a database to display the data from two tables with a one- to-many relationship.
  • 19. Many-to-many relationships https://fmhelp.filemaker.com › help › fmp › FMP_Help › many-to-many-r... Many-to-many relationships. A many-to- many relationship occurs When multiple records in a table are associated with multiple records in another table. For example, a many-to- many relationship exists between customers and products: customers can purchase various products, and products can be purchased by many customers.
  • 21. What is a table record?  In database, a table is a data structure where data can be organized in fields (columns) & records (rows). For example, information of the employees of an organization needs to be stored. ... A record represents set of related data. Complete set of values for all column/field is called record or row
  • 22. What are the fields in a database?  In computer science, data that has several parts, known as a record, can be divided into fields. Relational databases arrange data as sets of database records, so called rows. Each record consists of several fields; the fields of all records form the columns. Examples of fields: name, gender, hair colour
  • 23. What is record with example? Records are composed of fields, each of which contains one item of information. A set of records constitutes a file.  For example, a personnel file might contain records that have three fields: a name field, an address field, and a phone number field. In relational database management systems, records are called tuples • a data structure consisting of multiple parts.
  • 24. What is the difference between a field and a record?  Fields and records are two basic components of a database, which is an organized collection of information, or data. The term "fields" refers to columns, or vertical categories of data while the term "records" refers to rows, or horizontal groupings of unique field data. 
  • 25. What is Field record and table in database?  Data is stored in records. A record is composed of fields and contains all the data about one particular person, company, or item in a database. In this database, a record contains the data for one customer support incident report. Records appear as rows in the database table
  • 26. What are fields in Excel?  Each individual item of information in a database record – such as a telephone number or street number – is referred to as a field.  In Excel, the individual cells of a worksheet serve as fields, since each cell can contain a single piece of information about an object
  • 27. what is the difference between database and table?  Database: collection of organized data and specific features to access them. Organized means in the form of tables, views and stored procedures, functions etc to access the data. Table : collection of Rows and Columns to store the data
  • 28. What is the relationship between a database and a table?  A database is a collection of interrelated data , these data are stored in the table which are related to one another , to search and retrieve data queries are made . A table is made up of rows and columns , data of databases are stored in the table
  • 29. How is database related to a table? A table is a collection of related data held in a table format within a database. ... In relational databases, and flat file databases, a table is a set of data elements (values) using a model of vertical columns (identifiable by name) and horizontal rows, the cell being the unit where a row and column intersect.
  • 30. Should all tables have a primary key? It is a good practice to have a PK on every table, but it's not a MUST. ... "PRIMARY KEY constraints identify the column or set of columns that have values that uniquely identify a row in a table. No two rows in a table can have the same primary key value. You cannot enter NULL for any column in a primary key