SlideShare a Scribd company logo
1 of 23
What is a “Database”
• A Database is a collection of related data.
  – Facts that can be recorded and have specific
    meaning.
  – Represents some aspect of the real world.
  – A database is a logically coherent collection of
    data. Random assortment of data cannot be
    construed as a database.
  – A database is designed, built, and populated for a
    specific purpose.
What is a Database Management
      System (DBMS or DMS)
• A general purpose software system that
  facilitates the definition, storing,
  manipulating, security, organization, retrieval,
  and sharing of data in a database.
• The descriptive information about a database
  is called meta-data.
• To interact with a DBMS you must issue
  transactions.
Types of Database Management
                Systems
•   Hierarchical
•   Network
•   Relational
•   Object Oriented
•   XML
•   Experimental models such as Spatial-Temporal
             Note: We will concentrate on Relational
Relational Database
• Characterized by data being arranged to appear as a table of
  data with rows and columns.
• Each column has a unique meaning, name, and data type.
• Each Row must have one or more columns.
• A Database must have one or more related tables.
• There may be several database instances on one machine.
• How the data is physically organized and stored on the
  machine is hidden from the programmer and user.
Definitions
• Attribute: A single data item related to a database.
  AKA Field, column
• Candidate Key: A field or group of fields that a could
  be a primary key.
• Cursor: The specific record or tuple in a table or view
  that the database is currently pointing to.
• Data Mining: Automated data analysis techniques
  used to uncover previously undetected relationships
  or information.
Other Definitions
• Domain: The set of allowed values for an attribute.
• Entity: A single object about which data can be
  stored in a database table. Examples: Person,
  specimen, or location.
• ER Diagram: A graph that shows the tables and the
  relationships between each one.
• Foreign Key: An attribute(s) in a table that is a
  primary key in another table.
Other Definitions
• Functional Dependency: When one attribute is
  related to another. Usually uni-directional. Examples:
  Social Security Number -> Name.
• Join: The operation of putting the information in
  multiple tables together in one.
• Normalization: The operation if reducing the amount
  of redundant information in a database.
• SQL: The Structured Query Language standard.
Other Definitions
• Tuple: A row or record.
• View: A view is a “virtual table” that is
  generated on the fly when the view is
  accessed. The view is generally created using a
  pre-defined transaction. Example: You may
  want to generate a table of personnel without
  privacy information and with information
  from other tables includes such as zip code,
  city, state.
Relationships
Database Design
• Define the purpose of the Database
• Gather requirements
• Gather data items based upon requirements (In other words,
  what data will be needed to satisfy the requirements for data
  storage, retrieval and reporting).
   – Name each attribute using standard naming conventions. See if there
     exist standards for the particular area. Example: Darwin Core
     Standard for biological information systems.
   – Define the attribute of each data item.
   – Define range of data values.
   – Define compatibility checks on the data.
Database Design (cont)
• Group related data items into an entity or an object.
  (examples: person, class, organization)
• Take an entity and define the physical tables.
• Normalize Tables:
   – 1st Normal Form: Each attribute must be autonomous and
     there must not be any repeating groups.
   – 2nd Normal Form: Is in 1NF and Only attributes allowed that
     are directly related to the Primary Key.
   – 3rd Normal Form: 2NF and there are no transitive
     dependencies.
   Note: Most databases seldom go beyond 3NF.
Database Design (cont)
• Create any additional tables needed to support the
  requirements.
   – Attribute look up ( Examples: specimen sex, form etc.
   – Cross reference tables needed for normalization.
• Create Views.
• Create indexes.
• Decide on visibility of tables and data along with
  security features.
• Create backup and logging strategy.
Entity Relationship Diagrams
E-R Diagrams




Taken from www.smartdraw.com/tutorials/software/erd
E-R Diagrams




Taken from www.smartdraw.com/tutorials/software/erd
E-R Diagrams




Taken from www.smartdraw.com/tutorials/software/erd
Example
# Database: morphbank
#-----------------------------------------------------------
# server version 4.1.1a-alpha-max-degug

DROP TABLE species;
DROP TABLE classification;
DROP TABLE specimen;
DROP TABLE image;
DROP TABLE viewtable;
DROP TABLE imageannotation;
DROP TABLE phylogeneticcharacter;
DROP TABLE phylogeneticcharacterset;
DROP TABLE phylogeneticcharacterstatetable;
DROP TABLE publicationtable;
DROP TABLE usertable;
DROP TABLE grouptable;
Example
#
# Table structure for table 'species'
#
CREATE TABLE species(
SpeciesID int(8) NOT NULL auto_increment,
GenusID int(32) NOT NULL,
FamilyName varchar(128) NOT NULL,
GenusName varchar(128) NOT NULL,
Variety varchar(128),
SpeciesEpithet varchar(128),
SpeciesNameAuthors varchar (128),
SpeciesDescribedYear char(4),
DateIdentified date DEFAULT '0000-00-00',
IdentifiedBy varchar(128) NOT NULL,
PRIMARY KEY (SpeciesID));
Example
# Table Structure for table 'classification'

CREATE TABLE classification(
GenusID int(32) NOT NULL auto_increment,
GenusName varchar(128) NOT NULL,
FamilyName varchar(128) NOT NULL,
OrderName varchar(128) NOT NULL,
ClassName varchar(128),
PhylumName varchar(128) NOT NULL,
KingdomName varchar(128) NOT NULL,
PRIMARY KEY (GenusID));
Example
#
# Table structure for table 'specimen'
#
CREATE TABLE specimen(
MorphBankSpecimenID int(32) NOT NULL,
SpeciesID int(8) NOT NULL,
CatalogNumber int (32) NOT NULL AUTO_INCREMENT,
DateLastModified date NOT NULL default '0000-00-00',
InstitutionCode varchar(128),
CollectionCode varchar(128),
ScientificName varchar(128),
BasisOfRecord char(1),
SubSpecies varchar (128),
TypeStatus varchar (255),
TypeName varchar (128),
CollectionNumber varchar (128),
Example
FieldNumber varchar (128),
CollectorName varchar (128),
DateCollected date NOT NULL DEFAULT '0000-00-00',
TimeofDate time,
ContinentOcean varchar(128),
Country varchar(56),
StateProvince varchar(56),
County varchar(56),
Locality varchar(56),
Latitude double,
Longitude double,
CoordinatePrecision int(8),
MinimumElevation int(32),
Example
MaximumElevation int(32),
MinimumDepth int(32),
MaximumDepth int(32),
Sex varchar(8),
PreparationType varchar(255),
IndividualCount int(32),
PreviousCatalogNumber varchar(128),
RelationshipType varchar(128),
RelatedCatalogItem varchar (128),
DevelopmentalStage varchar (128),
Notes varchar(255),
 PRIMARY KEY(CatalogNumber));
In-Class Exercise
Work on the design of a University database
 system designed to track student, faculty,
 course, classes, degrees, and grades.

More Related Content

What's hot

Access Reports for Tenderfeet (or is that tenderfoots?)
Access Reports for Tenderfeet (or is that tenderfoots?) Access Reports for Tenderfeet (or is that tenderfoots?)
Access Reports for Tenderfeet (or is that tenderfoots?) Alan Manifold
 
Data preprocessing in Data Mining
Data preprocessing  in Data MiningData preprocessing  in Data Mining
Data preprocessing in Data MiningSamad Baseer Khan
 
Data preprocessing in Data Mining
Data preprocessing in Data MiningData preprocessing in Data Mining
Data preprocessing in Data MiningDHIVYADEVAKI
 
Data structures and Alogarithims
Data structures and AlogarithimsData structures and Alogarithims
Data structures and AlogarithimsVictor Palmar
 
Object Relational Database Management System(ORDBMS)
Object Relational Database Management System(ORDBMS)Object Relational Database Management System(ORDBMS)
Object Relational Database Management System(ORDBMS)Rabin BK
 
Databases and its representation
Databases and its representationDatabases and its representation
Databases and its representationRuhull
 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessingHarry Potter
 
Preprocessing
PreprocessingPreprocessing
Preprocessingmmuthuraj
 
Metadata lecture riley_2011
Metadata lecture riley_2011Metadata lecture riley_2011
Metadata lecture riley_2011jmcriley
 
9. Object Relational Databases in DBMS
9. Object Relational Databases in DBMS9. Object Relational Databases in DBMS
9. Object Relational Databases in DBMSkoolkampus
 
Bushra bioinformatic Presentation
Bushra bioinformatic PresentationBushra bioinformatic Presentation
Bushra bioinformatic PresentationNaveed Akhtar Isamu
 
Statistics and Data Mining
Statistics and  Data MiningStatistics and  Data Mining
Statistics and Data MiningR A Akerkar
 
How to build a data dictionary
How to build a data dictionaryHow to build a data dictionary
How to build a data dictionaryPiotr Kononow
 

What's hot (19)

Access Reports for Tenderfeet (or is that tenderfoots?)
Access Reports for Tenderfeet (or is that tenderfoots?) Access Reports for Tenderfeet (or is that tenderfoots?)
Access Reports for Tenderfeet (or is that tenderfoots?)
 
Datapreprocessing
DatapreprocessingDatapreprocessing
Datapreprocessing
 
Introduction to Stata
Introduction to Stata Introduction to Stata
Introduction to Stata
 
Data preprocessing in Data Mining
Data preprocessing  in Data MiningData preprocessing  in Data Mining
Data preprocessing in Data Mining
 
Data preprocessing in Data Mining
Data preprocessing in Data MiningData preprocessing in Data Mining
Data preprocessing in Data Mining
 
Data structures and Alogarithims
Data structures and AlogarithimsData structures and Alogarithims
Data structures and Alogarithims
 
Object Relational Database Management System(ORDBMS)
Object Relational Database Management System(ORDBMS)Object Relational Database Management System(ORDBMS)
Object Relational Database Management System(ORDBMS)
 
Data base.ppt
Data base.pptData base.ppt
Data base.ppt
 
Databases and its representation
Databases and its representationDatabases and its representation
Databases and its representation
 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessing
 
Database Project
Database ProjectDatabase Project
Database Project
 
Preprocessing
PreprocessingPreprocessing
Preprocessing
 
Metadata lecture riley_2011
Metadata lecture riley_2011Metadata lecture riley_2011
Metadata lecture riley_2011
 
9. Object Relational Databases in DBMS
9. Object Relational Databases in DBMS9. Object Relational Databases in DBMS
9. Object Relational Databases in DBMS
 
Bushra bioinformatic Presentation
Bushra bioinformatic PresentationBushra bioinformatic Presentation
Bushra bioinformatic Presentation
 
Ordbms
OrdbmsOrdbms
Ordbms
 
Statistics and Data Mining
Statistics and  Data MiningStatistics and  Data Mining
Statistics and Data Mining
 
How to build a data dictionary
How to build a data dictionaryHow to build a data dictionary
How to build a data dictionary
 
Data Preprocessing
Data PreprocessingData Preprocessing
Data Preprocessing
 

Viewers also liked (20)

Heartbox
HeartboxHeartbox
Heartbox
 
Unit00
Unit00Unit00
Unit00
 
Portfolio
PortfolioPortfolio
Portfolio
 
Apple i phone
Apple i phoneApple i phone
Apple i phone
 
Nintendo Wii U 2013
Nintendo Wii U  2013 Nintendo Wii U  2013
Nintendo Wii U 2013
 
Global health final water quality
Global health final  water qualityGlobal health final  water quality
Global health final water quality
 
Red tacton
Red tactonRed tacton
Red tacton
 
Anthology of Awesome
Anthology of AwesomeAnthology of Awesome
Anthology of Awesome
 
creer je eigen social media identiteit
creer je eigen social media identiteit creer je eigen social media identiteit
creer je eigen social media identiteit
 
Unit5
Unit5Unit5
Unit5
 
Could india host an impressive olympics
Could india  host an impressive olympicsCould india  host an impressive olympics
Could india host an impressive olympics
 
Decimals
DecimalsDecimals
Decimals
 
3 g
3 g3 g
3 g
 
social media in sports for European universities at Enas conference in Lille ...
social media in sports for European universities at Enas conference in Lille ...social media in sports for European universities at Enas conference in Lille ...
social media in sports for European universities at Enas conference in Lille ...
 
Bioexpo powerpoint final
Bioexpo powerpoint finalBioexpo powerpoint final
Bioexpo powerpoint final
 
Cose da mangiare gennaio 2014
Cose da mangiare gennaio 2014Cose da mangiare gennaio 2014
Cose da mangiare gennaio 2014
 
Flower
FlowerFlower
Flower
 
16 april 2011
16 april 201116 april 2011
16 april 2011
 
Workshop linkedin
Workshop linkedinWorkshop linkedin
Workshop linkedin
 
Integers
IntegersIntegers
Integers
 

Similar to What is a Database and its Components

Similar to What is a Database and its Components (20)

Database intro
Database introDatabase intro
Database intro
 
demo2.ppt
demo2.pptdemo2.ppt
demo2.ppt
 
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational model
 
Introduction to data structures (ss)
Introduction to data structures (ss)Introduction to data structures (ss)
Introduction to data structures (ss)
 
DB2 on Mainframe
DB2 on MainframeDB2 on Mainframe
DB2 on Mainframe
 
Ch 2-introduction to dbms
Ch 2-introduction to dbmsCh 2-introduction to dbms
Ch 2-introduction to dbms
 
Dbms Lec Uog 02
Dbms Lec Uog 02Dbms Lec Uog 02
Dbms Lec Uog 02
 
DISE - Database Concepts
DISE - Database ConceptsDISE - Database Concepts
DISE - Database Concepts
 
20IT501_DWDM_PPT_Unit_II.ppt
20IT501_DWDM_PPT_Unit_II.ppt20IT501_DWDM_PPT_Unit_II.ppt
20IT501_DWDM_PPT_Unit_II.ppt
 
20IT501_DWDM_PPT_Unit_II.ppt
20IT501_DWDM_PPT_Unit_II.ppt20IT501_DWDM_PPT_Unit_II.ppt
20IT501_DWDM_PPT_Unit_II.ppt
 
Database_Introduction.pdf
Database_Introduction.pdfDatabase_Introduction.pdf
Database_Introduction.pdf
 
Data structures
Data structuresData structures
Data structures
 
Data_base.pptx
Data_base.pptxData_base.pptx
Data_base.pptx
 
Database system concepts
Database system conceptsDatabase system concepts
Database system concepts
 
Introduction to ms access database
Introduction to ms access databaseIntroduction to ms access database
Introduction to ms access database
 
1. Introduction to Data Structure.pptx
1. Introduction to Data Structure.pptx1. Introduction to Data Structure.pptx
1. Introduction to Data Structure.pptx
 
Dbms Basics
Dbms BasicsDbms Basics
Dbms Basics
 
Data Analytics with R and SQL Server
Data Analytics with R and SQL ServerData Analytics with R and SQL Server
Data Analytics with R and SQL Server
 
Week 1
Week 1Week 1
Week 1
 
RowanDay4.pptx
RowanDay4.pptxRowanDay4.pptx
RowanDay4.pptx
 

More from Naveen Sihag

More from Naveen Sihag (20)

A P J Abdul Kalam
A P J Abdul KalamA P J Abdul Kalam
A P J Abdul Kalam
 
Rise to power adolf hitler
Rise to power adolf hitlerRise to power adolf hitler
Rise to power adolf hitler
 
Networking
NetworkingNetworking
Networking
 
Efective computing
Efective computingEfective computing
Efective computing
 
Bluetooth 1
Bluetooth 1Bluetooth 1
Bluetooth 1
 
Black holes
Black holesBlack holes
Black holes
 
Bluetooth 1
Bluetooth 1Bluetooth 1
Bluetooth 1
 
Black holes
Black holesBlack holes
Black holes
 
Visible light communication
Visible light communicationVisible light communication
Visible light communication
 
Variable frequency drives
Variable frequency drivesVariable frequency drives
Variable frequency drives
 
Usb
UsbUsb
Usb
 
Transducers
TransducersTransducers
Transducers
 
Touch screen technology
Touch screen technologyTouch screen technology
Touch screen technology
 
Solids and semiconductors
Solids and semiconductorsSolids and semiconductors
Solids and semiconductors
 
Sms &mms
Sms &mmsSms &mms
Sms &mms
 
Robotics and collision detection
Robotics and   collision detectionRobotics and   collision detection
Robotics and collision detection
 
Renewable energy
Renewable energyRenewable energy
Renewable energy
 
Pulse code modulation
Pulse code modulationPulse code modulation
Pulse code modulation
 
Paper battery
Paper batteryPaper battery
Paper battery
 
Osi
OsiOsi
Osi
 

What is a Database and its Components

  • 1. What is a “Database” • A Database is a collection of related data. – Facts that can be recorded and have specific meaning. – Represents some aspect of the real world. – A database is a logically coherent collection of data. Random assortment of data cannot be construed as a database. – A database is designed, built, and populated for a specific purpose.
  • 2. What is a Database Management System (DBMS or DMS) • A general purpose software system that facilitates the definition, storing, manipulating, security, organization, retrieval, and sharing of data in a database. • The descriptive information about a database is called meta-data. • To interact with a DBMS you must issue transactions.
  • 3. Types of Database Management Systems • Hierarchical • Network • Relational • Object Oriented • XML • Experimental models such as Spatial-Temporal Note: We will concentrate on Relational
  • 4. Relational Database • Characterized by data being arranged to appear as a table of data with rows and columns. • Each column has a unique meaning, name, and data type. • Each Row must have one or more columns. • A Database must have one or more related tables. • There may be several database instances on one machine. • How the data is physically organized and stored on the machine is hidden from the programmer and user.
  • 5. Definitions • Attribute: A single data item related to a database. AKA Field, column • Candidate Key: A field or group of fields that a could be a primary key. • Cursor: The specific record or tuple in a table or view that the database is currently pointing to. • Data Mining: Automated data analysis techniques used to uncover previously undetected relationships or information.
  • 6. Other Definitions • Domain: The set of allowed values for an attribute. • Entity: A single object about which data can be stored in a database table. Examples: Person, specimen, or location. • ER Diagram: A graph that shows the tables and the relationships between each one. • Foreign Key: An attribute(s) in a table that is a primary key in another table.
  • 7. Other Definitions • Functional Dependency: When one attribute is related to another. Usually uni-directional. Examples: Social Security Number -> Name. • Join: The operation of putting the information in multiple tables together in one. • Normalization: The operation if reducing the amount of redundant information in a database. • SQL: The Structured Query Language standard.
  • 8. Other Definitions • Tuple: A row or record. • View: A view is a “virtual table” that is generated on the fly when the view is accessed. The view is generally created using a pre-defined transaction. Example: You may want to generate a table of personnel without privacy information and with information from other tables includes such as zip code, city, state.
  • 10. Database Design • Define the purpose of the Database • Gather requirements • Gather data items based upon requirements (In other words, what data will be needed to satisfy the requirements for data storage, retrieval and reporting). – Name each attribute using standard naming conventions. See if there exist standards for the particular area. Example: Darwin Core Standard for biological information systems. – Define the attribute of each data item. – Define range of data values. – Define compatibility checks on the data.
  • 11. Database Design (cont) • Group related data items into an entity or an object. (examples: person, class, organization) • Take an entity and define the physical tables. • Normalize Tables: – 1st Normal Form: Each attribute must be autonomous and there must not be any repeating groups. – 2nd Normal Form: Is in 1NF and Only attributes allowed that are directly related to the Primary Key. – 3rd Normal Form: 2NF and there are no transitive dependencies. Note: Most databases seldom go beyond 3NF.
  • 12. Database Design (cont) • Create any additional tables needed to support the requirements. – Attribute look up ( Examples: specimen sex, form etc. – Cross reference tables needed for normalization. • Create Views. • Create indexes. • Decide on visibility of tables and data along with security features. • Create backup and logging strategy.
  • 14. E-R Diagrams Taken from www.smartdraw.com/tutorials/software/erd
  • 15. E-R Diagrams Taken from www.smartdraw.com/tutorials/software/erd
  • 16. E-R Diagrams Taken from www.smartdraw.com/tutorials/software/erd
  • 17. Example # Database: morphbank #----------------------------------------------------------- # server version 4.1.1a-alpha-max-degug DROP TABLE species; DROP TABLE classification; DROP TABLE specimen; DROP TABLE image; DROP TABLE viewtable; DROP TABLE imageannotation; DROP TABLE phylogeneticcharacter; DROP TABLE phylogeneticcharacterset; DROP TABLE phylogeneticcharacterstatetable; DROP TABLE publicationtable; DROP TABLE usertable; DROP TABLE grouptable;
  • 18. Example # # Table structure for table 'species' # CREATE TABLE species( SpeciesID int(8) NOT NULL auto_increment, GenusID int(32) NOT NULL, FamilyName varchar(128) NOT NULL, GenusName varchar(128) NOT NULL, Variety varchar(128), SpeciesEpithet varchar(128), SpeciesNameAuthors varchar (128), SpeciesDescribedYear char(4), DateIdentified date DEFAULT '0000-00-00', IdentifiedBy varchar(128) NOT NULL, PRIMARY KEY (SpeciesID));
  • 19. Example # Table Structure for table 'classification' CREATE TABLE classification( GenusID int(32) NOT NULL auto_increment, GenusName varchar(128) NOT NULL, FamilyName varchar(128) NOT NULL, OrderName varchar(128) NOT NULL, ClassName varchar(128), PhylumName varchar(128) NOT NULL, KingdomName varchar(128) NOT NULL, PRIMARY KEY (GenusID));
  • 20. Example # # Table structure for table 'specimen' # CREATE TABLE specimen( MorphBankSpecimenID int(32) NOT NULL, SpeciesID int(8) NOT NULL, CatalogNumber int (32) NOT NULL AUTO_INCREMENT, DateLastModified date NOT NULL default '0000-00-00', InstitutionCode varchar(128), CollectionCode varchar(128), ScientificName varchar(128), BasisOfRecord char(1), SubSpecies varchar (128), TypeStatus varchar (255), TypeName varchar (128), CollectionNumber varchar (128),
  • 21. Example FieldNumber varchar (128), CollectorName varchar (128), DateCollected date NOT NULL DEFAULT '0000-00-00', TimeofDate time, ContinentOcean varchar(128), Country varchar(56), StateProvince varchar(56), County varchar(56), Locality varchar(56), Latitude double, Longitude double, CoordinatePrecision int(8), MinimumElevation int(32),
  • 22. Example MaximumElevation int(32), MinimumDepth int(32), MaximumDepth int(32), Sex varchar(8), PreparationType varchar(255), IndividualCount int(32), PreviousCatalogNumber varchar(128), RelationshipType varchar(128), RelatedCatalogItem varchar (128), DevelopmentalStage varchar (128), Notes varchar(255), PRIMARY KEY(CatalogNumber));
  • 23. In-Class Exercise Work on the design of a University database system designed to track student, faculty, course, classes, degrees, and grades.