SlideShare une entreprise Scribd logo
1  sur  46
DATABASE MODELING AND
      SECURITY
WHAT IS DATA MODELING?
   Data modeling is the act of exploring data-oriented
    structures.
   Define key data modeling terms
       Entity type
       Attribute
       Multivalued attribute
       Relationship
       Degree
       Cardinality
       Business Rule
       Associative entity
       Trigger
       Supertype
       Subtype
THE DATA MODELING PROCESS
HOW ARE DATA MODELS USED IN PRACTICE?


 Conceptual data models- These are often created
  as part of initial requirements envisioning efforts to
  explore the high-level static business structures and
  concepts.
 Logical data models-used to explore the domain
  concepts, and their relationships, of problem
  domain.
 Physical data models (PDMs)-PDMs are used to
  design the internal schema of a database, depicting
  the data tables, the data columns of those
  tables, and the relationships between the tables.
A SIMPLE LOGICAL DATA MODEL.
A SIMPLE PHYSICAL DATA MODEL
WHAT ABOUT CONCEPTUAL MODELS?

   Object-Role models(ORM’s) are preferably created
    for conceptual models.
COMMON DATA MODELING NOTATIONS
CONT.
CONT.
HOW TO MODEL DATA

   The following tasks are performed in an iterative
    manner
   Identify entity types
   Identify attributes
   Apply naming conventions
   Identify relationships
   Apply data model patterns
   Assign keys
   Normalize to reduce data redundancy
   Denormalize to improve performance
   1.Identify Entity Types
   Entity - a class of real world objects having common
    characteristics and properties about which we wish to
    record information.An entity can be of normal type or
    weak type.

   2.Identify Attributes
   Attribute - a characteristic of an entity or relationship
   * Identifier - uniquely determines an instance of an entity
   * Identity dependence - when a portion of an identifier is
    inherited from another entity
   * Multi-valued - same attribute having many values for
    one entity
   * Surrogate - system created and controlled unique key
   3. Apply Data Naming Conventions- Every
    organization should have standards and guidelines
    applicable to data modeling, something we should be
    able to obtain from your enterprise administrator.

   Identify Relationships
   Re lat ionship - an association among two or more
    entities
   * occurrence - instance of a relationship is the collective
    instances of the related entities
   * degree - number of entities associated in the
    relationship (binary, ternary, other n-ary)
   * connectivity - one-to-one, one-to-many, many-to-many
   * existence dependency (constraint) -
    optional/mandatory
A LOGICAL DATA MODEL
5.APPLY DATA MODEL PATTERNS
   6.Assign keys-
7. NORMALIZE TO REDUCE DATA REDUNDANCY
 The goal of data normalization is to reduce and
  even eliminate data redundancy.
 Table 2. Data Normalization Rules.
 First normal form (1NF)-An entity type is in 1NF
  when it contains no repeating groups of data.
 Second normal form (2NF)-An entity type is in
  2NF when it is in 1NF and when all of its non-key
  attributes are fully dependent on its primary key.
 Third normal form (3NF)-An entity type is in 3NF
  when it is in 2NF and when all of its attributes are
  directly dependent on the primary key.
8. DENORMALIZE TO IMPROVE PERFORMANCE
   The rules of data normalization focus on reducing
    data redundancy, not on improving performance of
    data access. An important part of data modeling is
    to denormalize portions of your data schema to
    improve database access times.
DATABASE SECURITY
CONTENTS
 Definitions
 Countermeasures
 Security Controls
 Data Protection and Privacy
 Statistical Databases
 Web Database Security Issues and Solutions
 SQL Injection
DATABASE SECURITY DEFINITION
   Definition :
       The protection of the database against
        intentional or unintentional threats using
        computer-based or non-computer-based
        controls
   Areas in which to reduce risk:
       theft and fraud
       loss of confidentiality
       loss of privacy
       loss of integrity
       loss of availability
COUNTERMEASURES

 Ways to reduce risk
 Include
     Computer Based Controls
     Non-computer Based Controls
COMPUTER BASED CONTROLS
   Security of a DBMS is only as good as the OS
   Computer based Security controls available:
       authorization and authentication
       views
       backup and recovery
       Integrity
       Encryption
        ▪   within database and data transport
     RAID – for fault tolerance
     associated procedures
        ▪   e.g. backup, auditing, testing, upgrading, virus checking
NON-COMPUTER BASED CONTROLS
   Include:
       Security policy and contingency plan
       personnel controls
       secure positioning of equipment
       escrow agreements
       maintenance agreements
       physical access controls
           Both internal and external
DATA SECURITY
 Two(original) broad approaches to data
 security:
    Discretionary access control
      a given user has different access rights (privileges) on
       different objects
      flexible, but limited to which rights users can have on an

       object
      privileges can be passed on at user’s discretion

    Mandatory access control
      each data object is labelled with a certain classification
       level
      each user is given a certain clearance level

      rigid, hierarchic
ROLE BASED ACCESS CONTROL
A specific function within an organisation
 Authorizations are granted to the roles
     Instead of users
 Users  are made members of roles
 Privileges can not be passed on to other
  users
 Simplifies authorization management

 Supported in SQL
SYSTEM R AUTHORIZATION MODEL
 One
    of the first authorization model for
 RDBMS
     As part of System R RDBMS
 Based    on concept of ‘Protection Objects’
     Tables and views
 Access    modes
     SELECT
     INSERT
     DELETE
     UPDATE
 Not   all applicable for views
SYSTEM R AUTHORIZATION MODEL
 Userscan give access to other users
 through use of
     GRANT and REVOKE
 Removing REVOKE is recursive
 System R has a closed world policy
     If no authorization then access is denied
     However authorization can be granted later
 Negative    authorization
     Denials are expressed
     Denials take precedence
SQL FACILITIES
   SQL supports discretionary access control using
    view mechanism and authorization system
   e.g. CREATE VIEW S_NINE_TO_FIVE AS
                     SELECT S.S#, S.SNAME, S.STATUS, S.CITY
                     FROM S
                     WHERE to_char(SYSDATE, 'HH24:MI:SS‘) >=
        ‘09:00:00’
                     AND to_char(SYSDATE, 'HH24:MI:SS‘) <= ‘17:00:00’;

         GRANT SELECT, UPDATE (STATUS)
         ON S_NINE_TO_FIVE
         TO Purchasing;
       parameterised view
   Also referential and entity integrity
ORACLE SECURITY
   Oracle supports 2 types of privileges
       System privileges
         Rights to perform action on schema objects
         e.g. create table spaces, create and delete users

       Object priviliges
         Rights to perform actions on database objects
         e.g. create/delete tables, views, indexes, functions


   Priviliges can be granted to users or roles
ORACLE OBJECT PRIVILEGES
 Table   Privileges
     ALTER, DELETE, INDEX, INSERT, REFERENC
      ES, SELECT, UPDATE
 View    Privileges
     DELETE, INSERT, SELECT, UPDATE
 Privileges   can be granted to users or
 roles, e.g.
      CREATE ROLE admin;
      GRANT INSERT ON my_table TO admin;
      GRANT admin TO fred;
     To revoke/remove roles:
      REVOKE admin FROM barney;
      DROP ROLE admin;
ORACLE VIRTUAL PRIVATE DATABASES

 Fine-grained access control based on tuple-level
  access
 Uses dynamic query modification

 Users are given a specific policy
     The policy returns a specific WHERE clause in the
      query depending on the policy
        SELECT * FROM prop_for_rent

     Becomes
        SELECT * FROM prop_for_rent WHERE prop_type = ‘F’
DATA PROTECTION AND PRIVACY
   Privacy
       concerns the right of an individual not to have personal
        information collected, stored and disclosed either
        willfully or indiscriminately
   Data Protection Act
       the protection of personal data from unlawful
        acquisition, storage and disclosure, and the provision
        of the necessary safeguards to avoid the destruction or
        corruption of the legitimate data held
   New Freedom of Information Act
STATISTICAL DATABASES

A database that permits queries that derive
 aggregated information (e.g. sums,
 averages)
     but not queries that derive individual information
 Tracking
     possible to make inferences from legal queries to
      deduce answers to illegal ones
   SELECT COUNT(*) FROM STATS X WHERE X.SEX=‘M’ AND
    X.OCCUPATION = ‘Programmer’
   SELECT SUM(X.SALARY) FROM STATS X WHERE X.SEX=‘M’
    AND X.OCCUPATION = ‘Programmer’
SIMPLE EXAMPLE
   The following warehouse relation contains information
    about a number of drivers, and the points they have
    stored in races.
   The only queries allowed are those which utilise
    aggregate operators, e.g. using count to find out a
    driver’s total earnings in any one year.
       However using this table, statistical tracking is possible.
       Explain why?
        DriverId   Race            PointsScored      PrizeMoney
        1          Monaco          10                50000
        1          Imola           4                 25000
        2          Monaco          6                 30000
        3          Monaco          8                 40000
        3          Silverstone     10                50000
STATISTICAL DATABASES

   Various strategies can be used to minimize
    problems
     prevent queries from operating on only a few
      database entries
     swap attribute values among tuples
     randomly add in additional entries
     use only a random sample
     maintain history of query results and reject
      queries that use a high number of records
      identical to previous queries
WEB DATABASE SECURITY ISSUES
 Internet   is an open network
     traffic can easily be monitored, e.g. credit card
      numbers
 Challengeis to ensure that information
 conforms to:
     privacy, integrity, authenticity, non-
      fabrication, non-repudiation
 Information     also needs protected on web
  server
 Also need to protect from executable
  content
WEB DATABASE SECURITY SOLUTIONS

 Various      methods can be used
     proxy servers
         improve performance and filter requests
     firewalls
         prevents unauthorised access to/from a private network
     digital certificates
         electronic message attachments to verify that user is
          authentic
     Kerberos
         centralised security server for all data and resources on
          network
WEB DATABASE SECURITY SOLUTIONS

     Secure Sockets Layer and Secure HTTP
      ▪   SSL - secure connection between client and server
      ▪   S-HTTP - individual messages transmitted securely
     Secure Electronic Transactions
      ▪   certificates which splits transactions so that only
          relevant information is provided to each user
     Java - Java Virtual Machine (JVM)
      ▪   class loader - checks applications do not violate system
          integrity by checking class hierarchies
      ▪   bytecode verifier - verify that code will not crash or
          violate system integrity
     ActiveX -
      ▪   uses digital signatures, user is responsible for security
SQL INJECTION
   ‘a technique used to take advantage of non-
    validated input vulnerabilities to pass SQL
    commands through a Web application for execution
    by a backend database’1
     Can chain SQL commands
     Embed SQL commands in a string
     Ability to execute arbitrary SQL queries
SQL INJECTION: EXAMPLE 1
 Form  asking for username and password
 Original Query:


     SQLQuery = “SELECT count(*) FROM
      users WHERE username = „” +
      $usename + “„ AND password = „” +
      $password + “„;”

 Specify   usename and password = ‘ OR “
 1=1 ‘

     SELECT count(*) FROM users WHERE
      username = ‘’ OR 1 = 1 AND password
      = ‘’ OR 1 = 1;
SQL INJECTION : EXAMPLE 2
   SQLQuery = “SELECT * FROM staff WHERE
    staff_no = ” + $name + “;”
       Enter staff_no: 100 OR 1 = 1
   Will give the query:
     SELECT * FROM staff WHERE staff_no =
      100 OR 1 = 1;
   Even worse:
     Enter staff_no: 100; DROP TABLE staff;
      SELECT * FROM sys.user_tables
     Enter staff_no: 100 UNION SELECT SELECT
      Username, Password FROM Users
SQL INJECTION : REMEDIES
   Can include:
     Strip quotation marks and other spurious characters
      from strings
     Use stored procedures
     Limit field lengths or even don’t allow text entries
     Restrict UNION
THE END

Contenu connexe

Tendances

Data modeling star schema
Data modeling star schemaData modeling star schema
Data modeling star schemaSayed Ahmed
 
Data Architecture Brief Overview
Data Architecture Brief OverviewData Architecture Brief Overview
Data Architecture Brief OverviewHal Kalechofsky
 
Building Advanced Analytics Pipelines with Azure Databricks
Building Advanced Analytics Pipelines with Azure DatabricksBuilding Advanced Analytics Pipelines with Azure Databricks
Building Advanced Analytics Pipelines with Azure DatabricksLace Lofranco
 
Is the traditional data warehouse dead?
Is the traditional data warehouse dead?Is the traditional data warehouse dead?
Is the traditional data warehouse dead?James Serra
 
Demystifying Data Warehousing as a Service (GLOC 2019)
Demystifying Data Warehousing as a Service (GLOC 2019)Demystifying Data Warehousing as a Service (GLOC 2019)
Demystifying Data Warehousing as a Service (GLOC 2019)Kent Graziano
 
Snowflake Data Governance
Snowflake Data GovernanceSnowflake Data Governance
Snowflake Data Governancessuser538b022
 
Oracle Security Presentation
Oracle Security PresentationOracle Security Presentation
Oracle Security PresentationFrancisco Alvarez
 
How to identify the correct Master Data subject areas & tooling for your MDM...
How to identify the correct Master Data subject areas & tooling for your MDM...How to identify the correct Master Data subject areas & tooling for your MDM...
How to identify the correct Master Data subject areas & tooling for your MDM...Christopher Bradley
 
Exploring Oracle Multitenant in Oracle Database 12c
Exploring Oracle Multitenant in Oracle Database 12cExploring Oracle Multitenant in Oracle Database 12c
Exploring Oracle Multitenant in Oracle Database 12cZohar Elkayam
 
Why to Use an Oracle Database?
Why to Use an Oracle Database? Why to Use an Oracle Database?
Why to Use an Oracle Database? Markus Michalewicz
 
Activate Data Governance Using the Data Catalog
Activate Data Governance Using the Data CatalogActivate Data Governance Using the Data Catalog
Activate Data Governance Using the Data CatalogDATAVERSITY
 
Introducing the Snowflake Computing Cloud Data Warehouse
Introducing the Snowflake Computing Cloud Data WarehouseIntroducing the Snowflake Computing Cloud Data Warehouse
Introducing the Snowflake Computing Cloud Data WarehouseSnowflake Computing
 
Snowflake Company Presentation
Snowflake Company PresentationSnowflake Company Presentation
Snowflake Company PresentationAndrewJiang18
 
Dimensional modeling in oracle sql developer
Dimensional modeling in oracle sql developerDimensional modeling in oracle sql developer
Dimensional modeling in oracle sql developerJeff Smith
 
[DSC Europe 22] Lakehouse architecture with Delta Lake and Databricks - Draga...
[DSC Europe 22] Lakehouse architecture with Delta Lake and Databricks - Draga...[DSC Europe 22] Lakehouse architecture with Delta Lake and Databricks - Draga...
[DSC Europe 22] Lakehouse architecture with Delta Lake and Databricks - Draga...DataScienceConferenc1
 
Building Dynamic Pipelines in Azure Data Factory (SQLSaturday Oslo)
Building Dynamic Pipelines in Azure Data Factory (SQLSaturday Oslo)Building Dynamic Pipelines in Azure Data Factory (SQLSaturday Oslo)
Building Dynamic Pipelines in Azure Data Factory (SQLSaturday Oslo)Cathrine Wilhelmsen
 
Snowflake Data Science and AI/ML at Scale
Snowflake Data Science and AI/ML at ScaleSnowflake Data Science and AI/ML at Scale
Snowflake Data Science and AI/ML at ScaleAdam Doyle
 

Tendances (20)

Data modeling star schema
Data modeling star schemaData modeling star schema
Data modeling star schema
 
Data modelling 101
Data modelling 101Data modelling 101
Data modelling 101
 
Data Architecture Brief Overview
Data Architecture Brief OverviewData Architecture Brief Overview
Data Architecture Brief Overview
 
Snowflake Datawarehouse Architecturing
Snowflake Datawarehouse ArchitecturingSnowflake Datawarehouse Architecturing
Snowflake Datawarehouse Architecturing
 
Building Advanced Analytics Pipelines with Azure Databricks
Building Advanced Analytics Pipelines with Azure DatabricksBuilding Advanced Analytics Pipelines with Azure Databricks
Building Advanced Analytics Pipelines with Azure Databricks
 
Is the traditional data warehouse dead?
Is the traditional data warehouse dead?Is the traditional data warehouse dead?
Is the traditional data warehouse dead?
 
Demystifying Data Warehousing as a Service (GLOC 2019)
Demystifying Data Warehousing as a Service (GLOC 2019)Demystifying Data Warehousing as a Service (GLOC 2019)
Demystifying Data Warehousing as a Service (GLOC 2019)
 
Snowflake Data Governance
Snowflake Data GovernanceSnowflake Data Governance
Snowflake Data Governance
 
Oracle Security Presentation
Oracle Security PresentationOracle Security Presentation
Oracle Security Presentation
 
How to identify the correct Master Data subject areas & tooling for your MDM...
How to identify the correct Master Data subject areas & tooling for your MDM...How to identify the correct Master Data subject areas & tooling for your MDM...
How to identify the correct Master Data subject areas & tooling for your MDM...
 
Exploring Oracle Multitenant in Oracle Database 12c
Exploring Oracle Multitenant in Oracle Database 12cExploring Oracle Multitenant in Oracle Database 12c
Exploring Oracle Multitenant in Oracle Database 12c
 
Why to Use an Oracle Database?
Why to Use an Oracle Database? Why to Use an Oracle Database?
Why to Use an Oracle Database?
 
Activate Data Governance Using the Data Catalog
Activate Data Governance Using the Data CatalogActivate Data Governance Using the Data Catalog
Activate Data Governance Using the Data Catalog
 
Introducing the Snowflake Computing Cloud Data Warehouse
Introducing the Snowflake Computing Cloud Data WarehouseIntroducing the Snowflake Computing Cloud Data Warehouse
Introducing the Snowflake Computing Cloud Data Warehouse
 
Snowflake Company Presentation
Snowflake Company PresentationSnowflake Company Presentation
Snowflake Company Presentation
 
Dimensional modeling in oracle sql developer
Dimensional modeling in oracle sql developerDimensional modeling in oracle sql developer
Dimensional modeling in oracle sql developer
 
[DSC Europe 22] Lakehouse architecture with Delta Lake and Databricks - Draga...
[DSC Europe 22] Lakehouse architecture with Delta Lake and Databricks - Draga...[DSC Europe 22] Lakehouse architecture with Delta Lake and Databricks - Draga...
[DSC Europe 22] Lakehouse architecture with Delta Lake and Databricks - Draga...
 
Data Mesh 101
Data Mesh 101Data Mesh 101
Data Mesh 101
 
Building Dynamic Pipelines in Azure Data Factory (SQLSaturday Oslo)
Building Dynamic Pipelines in Azure Data Factory (SQLSaturday Oslo)Building Dynamic Pipelines in Azure Data Factory (SQLSaturday Oslo)
Building Dynamic Pipelines in Azure Data Factory (SQLSaturday Oslo)
 
Snowflake Data Science and AI/ML at Scale
Snowflake Data Science and AI/ML at ScaleSnowflake Data Science and AI/ML at Scale
Snowflake Data Science and AI/ML at Scale
 

En vedette

Application security models
Application security modelsApplication security models
Application security modelsERSHUBHAM TIWARI
 
SECURE AND EFFICIENT DATA TRANSMISSION FOR CLUSTER-BASED WIRELESS SENSOR NETW...
SECURE AND EFFICIENT DATA TRANSMISSION FOR CLUSTER-BASED WIRELESS SENSOR NETW...SECURE AND EFFICIENT DATA TRANSMISSION FOR CLUSTER-BASED WIRELESS SENSOR NETW...
SECURE AND EFFICIENT DATA TRANSMISSION FOR CLUSTER-BASED WIRELESS SENSOR NETW...Roshith S Pai
 
Object-Relational Database Systems(ORDBMSs)
Object-Relational Database Systems(ORDBMSs)Object-Relational Database Systems(ORDBMSs)
Object-Relational Database Systems(ORDBMSs)Sahan Walpitagamage
 
Secure Data Transmission
Secure Data TransmissionSecure Data Transmission
Secure Data Transmissionbjp4642
 
Pengenalan dasar sistem basisdata
Pengenalan dasar sistem basisdataPengenalan dasar sistem basisdata
Pengenalan dasar sistem basisdataErza Sofian
 
Metodologías de Desarrollo de Aplicaciones Web Seguras
Metodologías de Desarrollo de Aplicaciones Web SegurasMetodologías de Desarrollo de Aplicaciones Web Seguras
Metodologías de Desarrollo de Aplicaciones Web SegurasHéctor Garduño Real
 
Pengenalan sistem database
Pengenalan sistem databasePengenalan sistem database
Pengenalan sistem databaseFajar Zain
 
Data Modelling
Data ModellingData Modelling
Data ModellingArmina Nur
 
Trends in Data Modeling
Trends in Data ModelingTrends in Data Modeling
Trends in Data ModelingDATAVERSITY
 
Secure and Efficient Data Transmission for Cluster-Based Wireless Sensor Net...
Secure and Efficient Data Transmission  for Cluster-Based Wireless Sensor Net...Secure and Efficient Data Transmission  for Cluster-Based Wireless Sensor Net...
Secure and Efficient Data Transmission for Cluster-Based Wireless Sensor Net...Walchand college of Engineering,Sangli
 
Object oriented database model
Object oriented database modelObject oriented database model
Object oriented database modelPAQUIAAIZEL
 
Why Your Healthcare Business Intelligence Strategy Can't Win
Why Your Healthcare Business Intelligence Strategy Can't WinWhy Your Healthcare Business Intelligence Strategy Can't Win
Why Your Healthcare Business Intelligence Strategy Can't WinHealth Catalyst
 
9. Object Relational Databases in DBMS
9. Object Relational Databases in DBMS9. Object Relational Databases in DBMS
9. Object Relational Databases in DBMSkoolkampus
 
Юрий Ветров — Алгоритмический дизайн
Юрий Ветров — Алгоритмический дизайнЮрий Ветров — Алгоритмический дизайн
Юрий Ветров — Алгоритмический дизайнYury Vetrov
 

En vedette (20)

Application security models
Application security modelsApplication security models
Application security models
 
SECURE AND EFFICIENT DATA TRANSMISSION FOR CLUSTER-BASED WIRELESS SENSOR NETW...
SECURE AND EFFICIENT DATA TRANSMISSION FOR CLUSTER-BASED WIRELESS SENSOR NETW...SECURE AND EFFICIENT DATA TRANSMISSION FOR CLUSTER-BASED WIRELESS SENSOR NETW...
SECURE AND EFFICIENT DATA TRANSMISSION FOR CLUSTER-BASED WIRELESS SENSOR NETW...
 
Object-Relational Database Systems(ORDBMSs)
Object-Relational Database Systems(ORDBMSs)Object-Relational Database Systems(ORDBMSs)
Object-Relational Database Systems(ORDBMSs)
 
Secure Data Transmission
Secure Data TransmissionSecure Data Transmission
Secure Data Transmission
 
Pengenalan dasar sistem basisdata
Pengenalan dasar sistem basisdataPengenalan dasar sistem basisdata
Pengenalan dasar sistem basisdata
 
Metodologías de Desarrollo de Aplicaciones Web Seguras
Metodologías de Desarrollo de Aplicaciones Web SegurasMetodologías de Desarrollo de Aplicaciones Web Seguras
Metodologías de Desarrollo de Aplicaciones Web Seguras
 
Pengenalan sistem database
Pengenalan sistem databasePengenalan sistem database
Pengenalan sistem database
 
Data Modelling
Data ModellingData Modelling
Data Modelling
 
Database security
Database securityDatabase security
Database security
 
Trends in Data Modeling
Trends in Data ModelingTrends in Data Modeling
Trends in Data Modeling
 
Secure and Efficient Data Transmission for Cluster-Based Wireless Sensor Net...
Secure and Efficient Data Transmission  for Cluster-Based Wireless Sensor Net...Secure and Efficient Data Transmission  for Cluster-Based Wireless Sensor Net...
Secure and Efficient Data Transmission for Cluster-Based Wireless Sensor Net...
 
Database Security
Database SecurityDatabase Security
Database Security
 
Database Security
Database SecurityDatabase Security
Database Security
 
Database security
Database securityDatabase security
Database security
 
Database security
Database securityDatabase security
Database security
 
Object oriented database model
Object oriented database modelObject oriented database model
Object oriented database model
 
Why Your Healthcare Business Intelligence Strategy Can't Win
Why Your Healthcare Business Intelligence Strategy Can't WinWhy Your Healthcare Business Intelligence Strategy Can't Win
Why Your Healthcare Business Intelligence Strategy Can't Win
 
9. Object Relational Databases in DBMS
9. Object Relational Databases in DBMS9. Object Relational Databases in DBMS
9. Object Relational Databases in DBMS
 
Юрий Ветров — Алгоритмический дизайн
Юрий Ветров — Алгоритмический дизайнЮрий Ветров — Алгоритмический дизайн
Юрий Ветров — Алгоритмический дизайн
 
Dbms models
Dbms modelsDbms models
Dbms models
 

Similaire à Database modeling and security

Iaetsd database intrusion detection using
Iaetsd database intrusion detection usingIaetsd database intrusion detection using
Iaetsd database intrusion detection usingIaetsd Iaetsd
 
Database security and security in networks
Database security and security in networksDatabase security and security in networks
Database security and security in networksG Prachi
 
Row-level security and Dynamic Data Masking
Row-level security and Dynamic Data MaskingRow-level security and Dynamic Data Masking
Row-level security and Dynamic Data MaskingSolidQ
 
How to Build and Promote a Successful MDM Solution on a Shoestring
How to Build and Promote a Successful MDM Solution on a ShoestringHow to Build and Promote a Successful MDM Solution on a Shoestring
How to Build and Promote a Successful MDM Solution on a ShoestringDATAVERSITY
 
Security Issues Surrounding Data Manipulation in a Relational Database
Security Issues Surrounding Data Manipulation in a Relational DatabaseSecurity Issues Surrounding Data Manipulation in a Relational Database
Security Issues Surrounding Data Manipulation in a Relational DatabaseDavid Murphy
 
Data Redaction - OTN TOUR LA 2015
Data Redaction - OTN TOUR LA 2015 Data Redaction - OTN TOUR LA 2015
Data Redaction - OTN TOUR LA 2015 Alex Zaballa
 
DBMS-material for b.tech students to learn
DBMS-material for b.tech students to learnDBMS-material for b.tech students to learn
DBMS-material for b.tech students to learnRajasekhar364622
 
Oracle Data Redaction
Oracle Data RedactionOracle Data Redaction
Oracle Data RedactionAlex Zaballa
 
Database Security Methods, DAC, MAC,View
Database Security Methods, DAC, MAC,ViewDatabase Security Methods, DAC, MAC,View
Database Security Methods, DAC, MAC,ViewDr-Dipali Meher
 
Visible Governance: How to set up data governance using Visible Analyst Comme...
Visible Governance: How to set up data governance using Visible Analyst Comme...Visible Governance: How to set up data governance using Visible Analyst Comme...
Visible Governance: How to set up data governance using Visible Analyst Comme...Michael Cesino
 
UNIT 3- DATABASE INTEGRITY AND SECURITY CONCEPTS (1).pdf
UNIT 3- DATABASE INTEGRITY AND SECURITY CONCEPTS (1).pdfUNIT 3- DATABASE INTEGRITY AND SECURITY CONCEPTS (1).pdf
UNIT 3- DATABASE INTEGRITY AND SECURITY CONCEPTS (1).pdfKavitaShinde26
 
Chapter Five Physical Database Design.pptx
Chapter Five Physical Database Design.pptxChapter Five Physical Database Design.pptx
Chapter Five Physical Database Design.pptxhaymanot taddesse
 
Week 2 Characteristics & Benefits of a Database & Types of Data Models
Week 2 Characteristics & Benefits of a Database & Types of Data ModelsWeek 2 Characteristics & Benefits of a Database & Types of Data Models
Week 2 Characteristics & Benefits of a Database & Types of Data Modelsoudesign
 
Database security
Database securityDatabase security
Database securityCAS
 

Similaire à Database modeling and security (20)

Database concepts
Database conceptsDatabase concepts
Database concepts
 
Iaetsd database intrusion detection using
Iaetsd database intrusion detection usingIaetsd database intrusion detection using
Iaetsd database intrusion detection using
 
Database security and security in networks
Database security and security in networksDatabase security and security in networks
Database security and security in networks
 
Row-level security and Dynamic Data Masking
Row-level security and Dynamic Data MaskingRow-level security and Dynamic Data Masking
Row-level security and Dynamic Data Masking
 
Data base Access Control a look at Fine grain Access method
Data base Access Control a look at Fine grain Access methodData base Access Control a look at Fine grain Access method
Data base Access Control a look at Fine grain Access method
 
How to Build and Promote a Successful MDM Solution on a Shoestring
How to Build and Promote a Successful MDM Solution on a ShoestringHow to Build and Promote a Successful MDM Solution on a Shoestring
How to Build and Promote a Successful MDM Solution on a Shoestring
 
Security Issues Surrounding Data Manipulation in a Relational Database
Security Issues Surrounding Data Manipulation in a Relational DatabaseSecurity Issues Surrounding Data Manipulation in a Relational Database
Security Issues Surrounding Data Manipulation in a Relational Database
 
Oracle Database Vault
Oracle Database VaultOracle Database Vault
Oracle Database Vault
 
Data Redaction - OTN TOUR LA 2015
Data Redaction - OTN TOUR LA 2015 Data Redaction - OTN TOUR LA 2015
Data Redaction - OTN TOUR LA 2015
 
DBMS-material for b.tech students to learn
DBMS-material for b.tech students to learnDBMS-material for b.tech students to learn
DBMS-material for b.tech students to learn
 
Chapter23
Chapter23Chapter23
Chapter23
 
Oracle Data Redaction
Oracle Data RedactionOracle Data Redaction
Oracle Data Redaction
 
Database Security Methods, DAC, MAC,View
Database Security Methods, DAC, MAC,ViewDatabase Security Methods, DAC, MAC,View
Database Security Methods, DAC, MAC,View
 
Visible Governance: How to set up data governance using Visible Analyst Comme...
Visible Governance: How to set up data governance using Visible Analyst Comme...Visible Governance: How to set up data governance using Visible Analyst Comme...
Visible Governance: How to set up data governance using Visible Analyst Comme...
 
UNIT 3- DATABASE INTEGRITY AND SECURITY CONCEPTS (1).pdf
UNIT 3- DATABASE INTEGRITY AND SECURITY CONCEPTS (1).pdfUNIT 3- DATABASE INTEGRITY AND SECURITY CONCEPTS (1).pdf
UNIT 3- DATABASE INTEGRITY AND SECURITY CONCEPTS (1).pdf
 
Database management systems
Database management systemsDatabase management systems
Database management systems
 
Chapter Five Physical Database Design.pptx
Chapter Five Physical Database Design.pptxChapter Five Physical Database Design.pptx
Chapter Five Physical Database Design.pptx
 
11 Database Concepts
11 Database Concepts11 Database Concepts
11 Database Concepts
 
Week 2 Characteristics & Benefits of a Database & Types of Data Models
Week 2 Characteristics & Benefits of a Database & Types of Data ModelsWeek 2 Characteristics & Benefits of a Database & Types of Data Models
Week 2 Characteristics & Benefits of a Database & Types of Data Models
 
Database security
Database securityDatabase security
Database security
 

Dernier

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 

Dernier (20)

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 

Database modeling and security

  • 2. WHAT IS DATA MODELING?  Data modeling is the act of exploring data-oriented structures.  Define key data modeling terms  Entity type  Attribute  Multivalued attribute  Relationship  Degree  Cardinality  Business Rule  Associative entity  Trigger  Supertype  Subtype
  • 4. HOW ARE DATA MODELS USED IN PRACTICE?  Conceptual data models- These are often created as part of initial requirements envisioning efforts to explore the high-level static business structures and concepts.  Logical data models-used to explore the domain concepts, and their relationships, of problem domain.  Physical data models (PDMs)-PDMs are used to design the internal schema of a database, depicting the data tables, the data columns of those tables, and the relationships between the tables.
  • 5. A SIMPLE LOGICAL DATA MODEL.
  • 6. A SIMPLE PHYSICAL DATA MODEL
  • 7. WHAT ABOUT CONCEPTUAL MODELS?  Object-Role models(ORM’s) are preferably created for conceptual models.
  • 10. CONT.
  • 11. HOW TO MODEL DATA  The following tasks are performed in an iterative manner  Identify entity types  Identify attributes  Apply naming conventions  Identify relationships  Apply data model patterns  Assign keys  Normalize to reduce data redundancy  Denormalize to improve performance
  • 12. 1.Identify Entity Types  Entity - a class of real world objects having common characteristics and properties about which we wish to record information.An entity can be of normal type or weak type.  2.Identify Attributes  Attribute - a characteristic of an entity or relationship  * Identifier - uniquely determines an instance of an entity  * Identity dependence - when a portion of an identifier is inherited from another entity  * Multi-valued - same attribute having many values for one entity  * Surrogate - system created and controlled unique key
  • 13. 3. Apply Data Naming Conventions- Every organization should have standards and guidelines applicable to data modeling, something we should be able to obtain from your enterprise administrator.  Identify Relationships  Re lat ionship - an association among two or more entities  * occurrence - instance of a relationship is the collective instances of the related entities  * degree - number of entities associated in the relationship (binary, ternary, other n-ary)  * connectivity - one-to-one, one-to-many, many-to-many  * existence dependency (constraint) - optional/mandatory
  • 14. A LOGICAL DATA MODEL
  • 15. 5.APPLY DATA MODEL PATTERNS
  • 16. 6.Assign keys-
  • 17. 7. NORMALIZE TO REDUCE DATA REDUNDANCY  The goal of data normalization is to reduce and even eliminate data redundancy.  Table 2. Data Normalization Rules.  First normal form (1NF)-An entity type is in 1NF when it contains no repeating groups of data.  Second normal form (2NF)-An entity type is in 2NF when it is in 1NF and when all of its non-key attributes are fully dependent on its primary key.  Third normal form (3NF)-An entity type is in 3NF when it is in 2NF and when all of its attributes are directly dependent on the primary key.
  • 18.
  • 19.
  • 20. 8. DENORMALIZE TO IMPROVE PERFORMANCE  The rules of data normalization focus on reducing data redundancy, not on improving performance of data access. An important part of data modeling is to denormalize portions of your data schema to improve database access times.
  • 22. CONTENTS  Definitions  Countermeasures  Security Controls  Data Protection and Privacy  Statistical Databases  Web Database Security Issues and Solutions  SQL Injection
  • 23. DATABASE SECURITY DEFINITION  Definition :  The protection of the database against intentional or unintentional threats using computer-based or non-computer-based controls  Areas in which to reduce risk:  theft and fraud  loss of confidentiality  loss of privacy  loss of integrity  loss of availability
  • 24. COUNTERMEASURES  Ways to reduce risk  Include  Computer Based Controls  Non-computer Based Controls
  • 25. COMPUTER BASED CONTROLS  Security of a DBMS is only as good as the OS  Computer based Security controls available:  authorization and authentication  views  backup and recovery  Integrity  Encryption ▪ within database and data transport  RAID – for fault tolerance  associated procedures ▪ e.g. backup, auditing, testing, upgrading, virus checking
  • 26. NON-COMPUTER BASED CONTROLS  Include:  Security policy and contingency plan  personnel controls  secure positioning of equipment  escrow agreements  maintenance agreements  physical access controls  Both internal and external
  • 27. DATA SECURITY  Two(original) broad approaches to data security:  Discretionary access control  a given user has different access rights (privileges) on different objects  flexible, but limited to which rights users can have on an object  privileges can be passed on at user’s discretion  Mandatory access control  each data object is labelled with a certain classification level  each user is given a certain clearance level  rigid, hierarchic
  • 28. ROLE BASED ACCESS CONTROL A specific function within an organisation  Authorizations are granted to the roles  Instead of users  Users are made members of roles  Privileges can not be passed on to other users  Simplifies authorization management  Supported in SQL
  • 29. SYSTEM R AUTHORIZATION MODEL  One of the first authorization model for RDBMS  As part of System R RDBMS  Based on concept of ‘Protection Objects’  Tables and views  Access modes  SELECT  INSERT  DELETE  UPDATE  Not all applicable for views
  • 30. SYSTEM R AUTHORIZATION MODEL  Userscan give access to other users through use of  GRANT and REVOKE  Removing REVOKE is recursive  System R has a closed world policy  If no authorization then access is denied  However authorization can be granted later  Negative authorization  Denials are expressed  Denials take precedence
  • 31. SQL FACILITIES  SQL supports discretionary access control using view mechanism and authorization system  e.g. CREATE VIEW S_NINE_TO_FIVE AS SELECT S.S#, S.SNAME, S.STATUS, S.CITY FROM S WHERE to_char(SYSDATE, 'HH24:MI:SS‘) >= ‘09:00:00’ AND to_char(SYSDATE, 'HH24:MI:SS‘) <= ‘17:00:00’; GRANT SELECT, UPDATE (STATUS) ON S_NINE_TO_FIVE TO Purchasing;  parameterised view  Also referential and entity integrity
  • 32. ORACLE SECURITY  Oracle supports 2 types of privileges  System privileges  Rights to perform action on schema objects  e.g. create table spaces, create and delete users  Object priviliges  Rights to perform actions on database objects  e.g. create/delete tables, views, indexes, functions  Priviliges can be granted to users or roles
  • 33. ORACLE OBJECT PRIVILEGES  Table Privileges  ALTER, DELETE, INDEX, INSERT, REFERENC ES, SELECT, UPDATE  View Privileges  DELETE, INSERT, SELECT, UPDATE  Privileges can be granted to users or roles, e.g. CREATE ROLE admin; GRANT INSERT ON my_table TO admin; GRANT admin TO fred;  To revoke/remove roles: REVOKE admin FROM barney; DROP ROLE admin;
  • 34. ORACLE VIRTUAL PRIVATE DATABASES  Fine-grained access control based on tuple-level access  Uses dynamic query modification  Users are given a specific policy  The policy returns a specific WHERE clause in the query depending on the policy  SELECT * FROM prop_for_rent  Becomes  SELECT * FROM prop_for_rent WHERE prop_type = ‘F’
  • 35. DATA PROTECTION AND PRIVACY  Privacy  concerns the right of an individual not to have personal information collected, stored and disclosed either willfully or indiscriminately  Data Protection Act  the protection of personal data from unlawful acquisition, storage and disclosure, and the provision of the necessary safeguards to avoid the destruction or corruption of the legitimate data held  New Freedom of Information Act
  • 36. STATISTICAL DATABASES A database that permits queries that derive aggregated information (e.g. sums, averages)  but not queries that derive individual information  Tracking  possible to make inferences from legal queries to deduce answers to illegal ones  SELECT COUNT(*) FROM STATS X WHERE X.SEX=‘M’ AND X.OCCUPATION = ‘Programmer’  SELECT SUM(X.SALARY) FROM STATS X WHERE X.SEX=‘M’ AND X.OCCUPATION = ‘Programmer’
  • 37. SIMPLE EXAMPLE  The following warehouse relation contains information about a number of drivers, and the points they have stored in races.  The only queries allowed are those which utilise aggregate operators, e.g. using count to find out a driver’s total earnings in any one year.  However using this table, statistical tracking is possible.  Explain why? DriverId Race PointsScored PrizeMoney 1 Monaco 10 50000 1 Imola 4 25000 2 Monaco 6 30000 3 Monaco 8 40000 3 Silverstone 10 50000
  • 38. STATISTICAL DATABASES  Various strategies can be used to minimize problems  prevent queries from operating on only a few database entries  swap attribute values among tuples  randomly add in additional entries  use only a random sample  maintain history of query results and reject queries that use a high number of records identical to previous queries
  • 39. WEB DATABASE SECURITY ISSUES  Internet is an open network  traffic can easily be monitored, e.g. credit card numbers  Challengeis to ensure that information conforms to:  privacy, integrity, authenticity, non- fabrication, non-repudiation  Information also needs protected on web server  Also need to protect from executable content
  • 40. WEB DATABASE SECURITY SOLUTIONS  Various methods can be used  proxy servers  improve performance and filter requests  firewalls  prevents unauthorised access to/from a private network  digital certificates  electronic message attachments to verify that user is authentic  Kerberos  centralised security server for all data and resources on network
  • 41. WEB DATABASE SECURITY SOLUTIONS  Secure Sockets Layer and Secure HTTP ▪ SSL - secure connection between client and server ▪ S-HTTP - individual messages transmitted securely  Secure Electronic Transactions ▪ certificates which splits transactions so that only relevant information is provided to each user  Java - Java Virtual Machine (JVM) ▪ class loader - checks applications do not violate system integrity by checking class hierarchies ▪ bytecode verifier - verify that code will not crash or violate system integrity  ActiveX - ▪ uses digital signatures, user is responsible for security
  • 42. SQL INJECTION  ‘a technique used to take advantage of non- validated input vulnerabilities to pass SQL commands through a Web application for execution by a backend database’1  Can chain SQL commands  Embed SQL commands in a string  Ability to execute arbitrary SQL queries
  • 43. SQL INJECTION: EXAMPLE 1  Form asking for username and password  Original Query:  SQLQuery = “SELECT count(*) FROM users WHERE username = „” + $usename + “„ AND password = „” + $password + “„;”  Specify usename and password = ‘ OR “ 1=1 ‘  SELECT count(*) FROM users WHERE username = ‘’ OR 1 = 1 AND password = ‘’ OR 1 = 1;
  • 44. SQL INJECTION : EXAMPLE 2  SQLQuery = “SELECT * FROM staff WHERE staff_no = ” + $name + “;”  Enter staff_no: 100 OR 1 = 1  Will give the query:  SELECT * FROM staff WHERE staff_no = 100 OR 1 = 1;  Even worse:  Enter staff_no: 100; DROP TABLE staff; SELECT * FROM sys.user_tables  Enter staff_no: 100 UNION SELECT SELECT Username, Password FROM Users
  • 45. SQL INJECTION : REMEDIES  Can include:  Strip quotation marks and other spurious characters from strings  Use stored procedures  Limit field lengths or even don’t allow text entries  Restrict UNION