• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Interaction
 

Interaction

on

  • 476 views

 

Statistics

Views

Total Views
476
Views on SlideShare
471
Embed Views
5

Actions

Likes
0
Downloads
1
Comments
0

1 Embed 5

http://www.slideshare.net 5

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Interaction Interaction Presentation Transcript

    • Interaction & Database Databases using on the web • WordPress: Blog /Web Application example: Forum • Joomla & Drupal: CMS example: Enterprise CMS (ECMS), Web CMS (WCMS) etc. • osCommerce & Magento: WebShop
    • Classfied database Types Biblographic:  Examples title, abstract and may also include  links  to  full-­‐text  content   Title Title of the document Publication Format Type of document (journal article, fact sheet, video, etc.) Source Publisher or producer of item Abstract Short overview of item Descriptors Words used as index terms to aid in searching Availability Information on where to get item and how much it costs Audience For whom the publication is produced Language Language of the document Physical Details about materials, patient supplies, or accessories Description
    • Classfied database Types Full Text: Type of search •  Two words near each other •  Any word derived from a particular root (for example run, ran, or running) •  Multiple words with distinct weightings •  A word or phrase close to the search word or phrase
    • Classfied database Types Numeric: Name Storage Size Description Range smallInt 2 bytes small-range integer -32768 to +32767 integer 4 bytes usual choice for integer -2147## to +2147## bigInt 8 bytes large-range integer -92233## to 92233## decimal variable user-specified precision, exact no limit numeric variable user-specified precision, exact No limt real 4 bytes variable-precision, inexact 6 decimal digits precision Double 8 bytes variable-precision, inexact 15 decimal digits precision precision serial 4 bytes large auto incrementing integer 1 to 2147483647 bigSerial 8 bytes large auto incrementing integer 1 to 9223372036854775
    • Classfied  database  Types   Image: In wordPress •  The user selects a file from their local file system using the upload field shown •  They then click the "Upload" button which then checked the posted content to see if there is actually an image and just edit and save file
    • Database & SQL SQL  -­‐  Structured Query Language •  Gives you access to databases •  With SQL you can manipulate data in database
    • Database & SQL ER-diagram: showing  the  rela6on  between   the  different  en66es  of  a  database  system   Entity A Rela6on   Entity B
    • Database & SQL Relations/cardinalities: 1 – 1 relation 1 1 1 – m relation 1 m m – n relation m n
    • Database & SQL One to one relationship: •  Tables are associated only once from both sides Countries  table   Capital  ci4es  table   Denmark   Copenhagen   Sweden   Stochklom   Finland   Helsink  
    • Database & SQL One to many relationship: •  Each record in the first table can have many matching records in second table •  But a record in second table has only one matching record in first table Student  table   Student  phone  table   S_id   Name   City   S_id   Phone   1   7534313   1   Lamin   Kolding   1   0391643569   2   Vaidas   Arhus   2   7597696   3   James   vyley   2   0303030303   4   paul   Allbru   3   7592077   5   Saren   Estberg   3   09798303269   4   77411198   4   4466596565  
    • Database & SQL Many to many relation: •  Each record in the first table can have many matching records in second table •  A record in second table can have many matching records in first table Name  table   Phone  table   Mamie  Bajo   7534313   Yuspha  Barrow   7533124   7534313   7533124  
    • Database & SQL Database normalization: •  First normal form requires no multi-valued attributes •  Eliminate duplicative columns from the same table •  Create separate tables for each group Student  courses  table   Student  courses  table   StudentId   Course   12345   3100,3600,3900   Student Course1   Course2   Course3   Id   54321   1300,  2300,  1200   12345   3100   3600   3900   54321   1300   2300   1200  
    • Database & SQL Database normalization: •  First Normal form is satisfied •  The proper way to store this data Student  courses  table   StudentId   Course   12345   3100   12345   3600   12345   3900   54321   1300   54321   2300   54321   1200  
    • Database & SQL The DML part of SQL: •  SELECT - extracts data from a database •  UPDATE - updates data in a database •  DELETE - deletes data from a database •  INSERT INTO - inserts new data into a database
    • Database & SQL DDL statment in SQL: •  CREATE DATABASE - creates a new database •  ALTER DATABASE - modifies a database •  CREATE TABLE - creates a new table •  ALTER TABLE - modifies a table •  DROP TABLE - deletes a table •  CREATE INDEX - creates an index (search key) •  DROP INDEX - deletes an index
    • Database & SQL SQL select statment: •  The SELECT statement is used to select data from a database •  Syntax: SELECT LastName,FirstName FROM Persons Person  table   P_id   LastName   FirstName   Address   City   1   Jabang   Kebba   Skovvejen  14   Kolding   2   Bojang   Buba   Newstreet  2   Arhus   3   Sabally   Ramu   Avenu  11   Copenhagen  
    • Database & SQL SQL select statment continue: •  Now I want to select the content of the columns named "LastName" and "FirstName" from the previous table •  It gives the following result Person  table   LastName   FirstName   Jabang   Kebba   Bojang   Buba   Sabally   Ramu  
    • Database & SQL Conclusion: The end!