PHP provides access to a great number of different database systems, many of which are relational in nature and can be interrogated using Structured Query Language (SQL).
Integrity constraints are rules that help maintain data quality and consistency in a database. The main types of integrity constraints are:
1. Domain constraints specify valid values and data types for attributes to restrict what data can be entered.
2. Entity constraints require that each row have a unique identifier and prevent null values in primary keys.
3. Referential integrity constraints maintain relationships between tables by preventing actions that would invalidate links between foreign and primary keys.
4. Cascade rules extend referential integrity by automatically propagating updates or deletes from a primary table to its related tables.
SQL is a programming language used to manage data in relational database systems. It can be used to create, query, update, and modify relational databases. SQL comprises both data definition and data manipulation languages that allow users to define and modify database schemas as well as store, retrieve, and manage data within databases. Some key advantages of SQL include high speed for retrieving large amounts of data, adherence to well-defined standards, and not requiring coding to manage database systems.
A distributed database is a collection of logically interrelated databases distributed over a computer network. A distributed database management system (DDBMS) manages the distributed database and makes the distribution transparent to users. There are two main types of DDBMS - homogeneous and heterogeneous. Key characteristics of distributed databases include replication of fragments, shared logically related data across sites, and each site being controlled by a DBMS. Challenges include complex management, security, and increased storage requirements due to data replication.
Database recovery is the process of restoring a database to its most recent consistent state before a failure occurred. The purpose is to preserve the ACID properties of transactions and bring the database back to the last consistent state prior to the failure. Database failures can occur due to transaction failures, system failures, or media failures. A good recovery plan is important for making a quick recovery from failures.
The document discusses the three levels of database management system (DBMS) architecture: the internal level, conceptual level, and external level. The internal level defines how data is physically stored. The conceptual level describes the overall database structure and hides internal details. The external level presents different views of the database customized for specific user groups.
This document provides information about different types of database languages. It discusses database definition languages (DDL) which are used to define the database structure, data manipulation languages (DML) which are used to retrieve and modify data, data control languages (DCL) which control security and access, and transaction control languages (TCL) which manage transactions. Examples of commands for each language type are provided, such as CREATE, ALTER, and DROP for DDL and SELECT, INSERT, UPDATE, and DELETE for DML.
Concurrency control mechanisms use various protocols like lock-based, timestamp-based, and validation-based to maintain database consistency when transactions execute concurrently. Lock-based protocols use locks on data items to control concurrent access, with two-phase locking being a common approach. Timestamp-based protocols order transactions based on timestamps to ensure serializability. Validation-based protocols validate that a transaction's writes do not violate serializability before committing its writes.
The document discusses database management systems and their importance in modern society. It provides examples of common database applications and outlines some key benefits of using a database approach, including controlling data redundancy, sharing data among users, and providing backup and recovery services. It also describes the roles of database administrators, users, and designers in working with database systems.
The document presents an overview of XML and its usage and relationship to databases. It discusses how XML is a markup language used to transport, store, and share data. While XML is useful for small to medium amounts of data, it lacks features of relational databases and is less suitable for large data. The document also covers XML characteristics like being tag-based and user-defined, as well as how XML schema and validation are used.
The document discusses various SQL statements and functions used for managing databases and querying data. It provides the syntax for SQL statements like CREATE TABLE, INSERT, SELECT, UPDATE, DELETE and functions like COUNT, AVG, MIN, MAX, SUM to operate on data in database tables. It also covers statements for altering tables, joining tables, filtering rows with WHERE and HAVING clauses, removing duplicates with DISTINCT, and ordering results.
Structured Query Language
SQL Commands:
• The standard SQL commands to interact with relational databases are CREATE, SELECT, INSERT, UPDATE, DELETE and DROP
This document provides an introduction to NoSQL databases. It discusses the history and limitations of relational databases that led to the development of NoSQL databases. The key motivations for NoSQL databases are that they can handle big data, provide better scalability and flexibility than relational databases. The document describes some core NoSQL concepts like the CAP theorem and different types of NoSQL databases like key-value, columnar, document and graph databases. It also outlines some remaining research challenges in the area of NoSQL databases.
Functional dependency defines a relationship between attributes in a table where a set of attributes determine another attribute. There are different types of functional dependencies including trivial, non-trivial, multivalued, and transitive. An example given is a student table with attributes Stu_Id, Stu_Name, Stu_Age which has the functional dependency of Stu_Id->Stu_Name since the student ID uniquely identifies the student name.
The document discusses transactions and the ACID properties that ensure transaction integrity in a database management system (DBMS). It defines a transaction as a logical unit of work that can include operations like insert, delete, update, or retrieve data from a database. ACID properties - Atomicity, Consistency, Isolation, and Durability - guarantee that transactions are processed reliably and data integrity is maintained. It provides examples to illustrate how each ACID property functions and its importance for transaction processing.
This document discusses data independence and the three-schema architecture in database systems. It explains that the schema is the overall structure or design of a database, while a subschema is a subset of the schema that inherits its properties and provides a window for users to view specific parts of the database. The three-schema architecture consists of the physical, logical, and view levels. The physical level deals with how data is stored, the logical level describes what data is stored and relationships, and the view level presents an external schema that users interact with. Data independence allows changes to schemas at one level without affecting higher levels, as seen through examples of logical and physical data independence.
This document provides an overview of SQL programming including:
- A brief history of SQL and how it has evolved over time.
- Key SQL fundamentals like database structures, tables, relationships, and normalization.
- How to define and modify database structures using commands like CREATE, ALTER, DROP.
- How to manipulate data using INSERT, UPDATE, DELETE, and transactions.
- How to retrieve data using SELECT statements, joins, and other techniques.
- How to aggregate data using functions like SUM, AVG, MAX, MIN, and COUNT.
- Additional topics covered include subqueries, views, and resources for further learning.
The document discusses the purpose and users of a database management system (DBMS). The main purposes of a DBMS are to prevent data redundancy, inconsistencies, difficulties in data access, isolation problems, integrity issues, atomicity problems, concurrent access anomalies, and security problems. Users of a DBMS include naive users, application programmers, sophisticated users who write SQL queries, and specialized users who write complex database applications.
ACID properties
Atomicity, Consistency, Isolation, Durability
Transactions should possess several properties, often called the ACID properties; they should be enforced by the concurrency control and recovery methods of the DBMS.
This document discusses XML namespaces and how they allow elements and attributes from different sources to be combined without naming conflicts. A namespace is a set of unique names identified by a URI. The namespace is declared using the xmlns attribute and a prefix, and elements in that namespace are then identified using the prefix. Namespaces allow documents to be combined, reusable code modules to be invoked, and browsers to handle multiple sources of documents. Local and multiple namespaces are also described.
Entity Relationship Diagrams (ERDs) are conceptual data models used in software engineering to model information systems. ERDs represent entities as rectangles, attributes as ellipses, and relationships as diamonds connecting entities. Attributes can be single-valued, multi-valued, composite, or derived. Relationships have cardinality like one-to-one, one-to-many, many-to-one, or many-to-many. Participation constraints and Codd's 12 rules of relational databases are also discussed in the document.
The document discusses various types of physical storage media used in databases, including their characteristics and performance measures. It covers volatile storage like cache and main memory, and non-volatile storage like magnetic disks, flash memory, optical disks, and tape. It describes how magnetic disks work and factors that influence disk performance like seek time, rotational latency, and transfer rate. Optimization techniques for disk block access like file organization and write buffering are also summarized.
SQL language includes four primary statement types: DML, DDL, DCL, and TCL. DML statements manipulate data within tables using operations like SELECT, INSERT, UPDATE, and DELETE. DDL statements define and modify database schema using commands like CREATE, ALTER, and DROP. DCL statements control user access privileges with GRANT and REVOKE. TCL statements manage transactions with COMMIT, ROLLBACK, and SAVEPOINT to maintain data integrity.
This document discusses validation controls in ASP.NET. It explains that validation controls are used to implement presentation logic and validate user input data, checking things like data format, data type, and data range. There are several types of validation controls, including required field, compare, range, regular expression, custom, and validation summary controls. Each control performs a specific type of validation, and validation can occur on both the client-side and server-side. The document provides examples of how to implement each validation control in ASP.NET.
This document discusses different methods for organizing and indexing data stored on disk in a database management system (DBMS). It covers unordered or heap files, ordered or sequential files, and hash files as methods for physically arranging records on disk. It also discusses various indexing techniques like primary indexes, secondary indexes, dense vs sparse indexes, and multi-level indexes like B-trees and B+-trees that provide efficient access to records. The goal of file organization and indexing in a DBMS is to optimize performance for operations like inserting, searching, updating and deleting records from disk files.
The document discusses the entity-relationship (E-R) data model. It defines key concepts in E-R modeling including entities, attributes, entity sets, relationships, and relationship sets. It describes different types of attributes and relationships. It also explains how to represent E-R diagrams visually using symbols like rectangles, diamonds, and lines to depict entities, relationships, keys, and cardinalities. Primary keys, foreign keys, and weak entities are also covered.
Integrity constraints are rules used to maintain data quality and ensure accuracy in a relational database. The main types of integrity constraints are domain constraints, which define valid value sets for attributes; NOT NULL constraints, which enforce non-null values; UNIQUE constraints, which require unique values; and CHECK constraints, which specify value ranges. Referential integrity links data between tables through foreign keys, preventing orphaned records. Integrity constraints are enforced by the database to guard against accidental data damage.
Data integrity refers to the correctness and completeness of data in a database. It is preserved through constraints that restrict what values can be inserted or updated. The main types of constraints are required data, validity checking, entity integrity, and referential integrity constraints. Deferred constraint checking allows constraints to be checked at transaction commit rather than for each statement, which is useful when multiple updates are needed to maintain consistency.
The document discusses various SQL concepts like views, triggers, functions, indexes, joins, and stored procedures. Views are virtual tables created by joining real tables, and can be updated, modified or dropped. Triggers automatically run code when data is inserted, updated or deleted from a table. Functions allow reusable code and improve clarity. Indexes allow faster data retrieval. Joins combine data from different tables. Stored procedures preserve data integrity.
This document provides an introduction to relational databases and SQL. It discusses key concepts such as:
- Relational databases contain multiple tables that are linked together through primary and foreign keys. This allows normalization of data to reduce redundancy.
- SQL is the standard language used to interact with relational database management systems. SQL can be used to query, manipulate, and define data.
- Common SQL statements include SELECT to query data, INSERT to add new records, UPDATE to modify existing records, and DELETE to remove records.
- Proper database design principles like normalization help ensure data integrity and optimize database performance by eliminating redundant or inconsistent data.
The document discusses using PHP to connect to and manipulate MySQL databases. It covers using MySQLi and PDO to connect to MySQL from PHP, and provides examples of inserting, selecting, updating, and deleting data from MySQL databases using PDO commands. Key points include that PDO can work with multiple database types while MySQLi only works with MySQL, and that both support prepared statements to protect against SQL injection.
The document presents an overview of XML and its usage and relationship to databases. It discusses how XML is a markup language used to transport, store, and share data. While XML is useful for small to medium amounts of data, it lacks features of relational databases and is less suitable for large data. The document also covers XML characteristics like being tag-based and user-defined, as well as how XML schema and validation are used.
The document discusses various SQL statements and functions used for managing databases and querying data. It provides the syntax for SQL statements like CREATE TABLE, INSERT, SELECT, UPDATE, DELETE and functions like COUNT, AVG, MIN, MAX, SUM to operate on data in database tables. It also covers statements for altering tables, joining tables, filtering rows with WHERE and HAVING clauses, removing duplicates with DISTINCT, and ordering results.
Structured Query Language
SQL Commands:
• The standard SQL commands to interact with relational databases are CREATE, SELECT, INSERT, UPDATE, DELETE and DROP
This document provides an introduction to NoSQL databases. It discusses the history and limitations of relational databases that led to the development of NoSQL databases. The key motivations for NoSQL databases are that they can handle big data, provide better scalability and flexibility than relational databases. The document describes some core NoSQL concepts like the CAP theorem and different types of NoSQL databases like key-value, columnar, document and graph databases. It also outlines some remaining research challenges in the area of NoSQL databases.
Functional dependency defines a relationship between attributes in a table where a set of attributes determine another attribute. There are different types of functional dependencies including trivial, non-trivial, multivalued, and transitive. An example given is a student table with attributes Stu_Id, Stu_Name, Stu_Age which has the functional dependency of Stu_Id->Stu_Name since the student ID uniquely identifies the student name.
The document discusses transactions and the ACID properties that ensure transaction integrity in a database management system (DBMS). It defines a transaction as a logical unit of work that can include operations like insert, delete, update, or retrieve data from a database. ACID properties - Atomicity, Consistency, Isolation, and Durability - guarantee that transactions are processed reliably and data integrity is maintained. It provides examples to illustrate how each ACID property functions and its importance for transaction processing.
This document discusses data independence and the three-schema architecture in database systems. It explains that the schema is the overall structure or design of a database, while a subschema is a subset of the schema that inherits its properties and provides a window for users to view specific parts of the database. The three-schema architecture consists of the physical, logical, and view levels. The physical level deals with how data is stored, the logical level describes what data is stored and relationships, and the view level presents an external schema that users interact with. Data independence allows changes to schemas at one level without affecting higher levels, as seen through examples of logical and physical data independence.
This document provides an overview of SQL programming including:
- A brief history of SQL and how it has evolved over time.
- Key SQL fundamentals like database structures, tables, relationships, and normalization.
- How to define and modify database structures using commands like CREATE, ALTER, DROP.
- How to manipulate data using INSERT, UPDATE, DELETE, and transactions.
- How to retrieve data using SELECT statements, joins, and other techniques.
- How to aggregate data using functions like SUM, AVG, MAX, MIN, and COUNT.
- Additional topics covered include subqueries, views, and resources for further learning.
The document discusses the purpose and users of a database management system (DBMS). The main purposes of a DBMS are to prevent data redundancy, inconsistencies, difficulties in data access, isolation problems, integrity issues, atomicity problems, concurrent access anomalies, and security problems. Users of a DBMS include naive users, application programmers, sophisticated users who write SQL queries, and specialized users who write complex database applications.
ACID properties
Atomicity, Consistency, Isolation, Durability
Transactions should possess several properties, often called the ACID properties; they should be enforced by the concurrency control and recovery methods of the DBMS.
This document discusses XML namespaces and how they allow elements and attributes from different sources to be combined without naming conflicts. A namespace is a set of unique names identified by a URI. The namespace is declared using the xmlns attribute and a prefix, and elements in that namespace are then identified using the prefix. Namespaces allow documents to be combined, reusable code modules to be invoked, and browsers to handle multiple sources of documents. Local and multiple namespaces are also described.
Entity Relationship Diagrams (ERDs) are conceptual data models used in software engineering to model information systems. ERDs represent entities as rectangles, attributes as ellipses, and relationships as diamonds connecting entities. Attributes can be single-valued, multi-valued, composite, or derived. Relationships have cardinality like one-to-one, one-to-many, many-to-one, or many-to-many. Participation constraints and Codd's 12 rules of relational databases are also discussed in the document.
The document discusses various types of physical storage media used in databases, including their characteristics and performance measures. It covers volatile storage like cache and main memory, and non-volatile storage like magnetic disks, flash memory, optical disks, and tape. It describes how magnetic disks work and factors that influence disk performance like seek time, rotational latency, and transfer rate. Optimization techniques for disk block access like file organization and write buffering are also summarized.
SQL language includes four primary statement types: DML, DDL, DCL, and TCL. DML statements manipulate data within tables using operations like SELECT, INSERT, UPDATE, and DELETE. DDL statements define and modify database schema using commands like CREATE, ALTER, and DROP. DCL statements control user access privileges with GRANT and REVOKE. TCL statements manage transactions with COMMIT, ROLLBACK, and SAVEPOINT to maintain data integrity.
This document discusses validation controls in ASP.NET. It explains that validation controls are used to implement presentation logic and validate user input data, checking things like data format, data type, and data range. There are several types of validation controls, including required field, compare, range, regular expression, custom, and validation summary controls. Each control performs a specific type of validation, and validation can occur on both the client-side and server-side. The document provides examples of how to implement each validation control in ASP.NET.
This document discusses different methods for organizing and indexing data stored on disk in a database management system (DBMS). It covers unordered or heap files, ordered or sequential files, and hash files as methods for physically arranging records on disk. It also discusses various indexing techniques like primary indexes, secondary indexes, dense vs sparse indexes, and multi-level indexes like B-trees and B+-trees that provide efficient access to records. The goal of file organization and indexing in a DBMS is to optimize performance for operations like inserting, searching, updating and deleting records from disk files.
The document discusses the entity-relationship (E-R) data model. It defines key concepts in E-R modeling including entities, attributes, entity sets, relationships, and relationship sets. It describes different types of attributes and relationships. It also explains how to represent E-R diagrams visually using symbols like rectangles, diamonds, and lines to depict entities, relationships, keys, and cardinalities. Primary keys, foreign keys, and weak entities are also covered.
Integrity constraints are rules used to maintain data quality and ensure accuracy in a relational database. The main types of integrity constraints are domain constraints, which define valid value sets for attributes; NOT NULL constraints, which enforce non-null values; UNIQUE constraints, which require unique values; and CHECK constraints, which specify value ranges. Referential integrity links data between tables through foreign keys, preventing orphaned records. Integrity constraints are enforced by the database to guard against accidental data damage.
Data integrity refers to the correctness and completeness of data in a database. It is preserved through constraints that restrict what values can be inserted or updated. The main types of constraints are required data, validity checking, entity integrity, and referential integrity constraints. Deferred constraint checking allows constraints to be checked at transaction commit rather than for each statement, which is useful when multiple updates are needed to maintain consistency.
The document discusses various SQL concepts like views, triggers, functions, indexes, joins, and stored procedures. Views are virtual tables created by joining real tables, and can be updated, modified or dropped. Triggers automatically run code when data is inserted, updated or deleted from a table. Functions allow reusable code and improve clarity. Indexes allow faster data retrieval. Joins combine data from different tables. Stored procedures preserve data integrity.
This document provides an introduction to relational databases and SQL. It discusses key concepts such as:
- Relational databases contain multiple tables that are linked together through primary and foreign keys. This allows normalization of data to reduce redundancy.
- SQL is the standard language used to interact with relational database management systems. SQL can be used to query, manipulate, and define data.
- Common SQL statements include SELECT to query data, INSERT to add new records, UPDATE to modify existing records, and DELETE to remove records.
- Proper database design principles like normalization help ensure data integrity and optimize database performance by eliminating redundant or inconsistent data.
The document discusses using PHP to connect to and manipulate MySQL databases. It covers using MySQLi and PDO to connect to MySQL from PHP, and provides examples of inserting, selecting, updating, and deleting data from MySQL databases using PDO commands. Key points include that PDO can work with multiple database types while MySQLi only works with MySQL, and that both support prepared statements to protect against SQL injection.
The document discusses databases and data storage. It begins with an introduction to relational databases, including their data structures, algorithms, and scalability issues. It then covers search engines and their data structures and algorithms. The document introduces the NoSQL movement and discusses various NoSQL database families like key-value stores, column stores, document stores and graph databases. It covers database principles like CAP and patterns for scaling, high availability and elasticity. The document asks how to choose between database types and concludes with a summary.
This document provides information about MySQL, including that it is a popular open source database that is ideal for both small and large applications. It notes that Facebook and other large companies use MySQL and have contributed to WebScaleSQL, a collaboration to improve MySQL performance for large-scale use. The document then gives examples of common MySQL operations like connecting, managing databases and tables, inserting/updating/deleting data, and more.
This document discusses building dynamic web sites using databases. It begins by explaining that truly dynamic sites have content that changes over time, is customized for users, and can be automatically generated. It recommends using a database rather than storing content in files, as databases are faster, more efficient, and easier to manage when content grows large. The document then provides an overview of key database concepts like tables, fields, queries, and the relational structure. It gives an example of how a student database might be implemented and why a database is better than flat files for such an application. Finally, it discusses MySQL as a popular open-source database and shows basic concepts like connecting to the database, selecting a database, performing queries, and extracting record
Here are the SQL commands for the questions:
Q1: SELECT PNAME FROM PROJECT WHERE PLOCATION='Houston';
Q2: SELECT FNAME, LNAME FROM EMPLOYEE WHERE HOURS>20;
Q3: SELECT FNAME, LNAME FROM EMPLOYEE, DEPARTMENT WHERE MGRSSN=SSN;
Dive deeper into the essentials of MySQL with this hands-on session focused on schema design, data types, and table creation. This presentation is a continuation of foundational database concepts and is designed to help learners move from theory to practice in crafting effective MySQL databases.
Key highlights:
Detailed breakdown of tables, columns, primary keys, and foreign keys
Relationship types in relational databases (1-to-1, 1-to-many, many-to-many)
Comprehensive overview of MySQL data types: CHAR, VARCHAR, TEXT, DECIMAL, FLOAT, ENUM, BLOB, and more
Syntax and best practices for creating and deleting databases and tables
Practical guide to designing high-performance, scalable, and reliable schemas
With real-world examples and simplified explanations, this session helps you build and manage robust MySQL databases from scratch — a must-know skill for data-driven roles.
A database is a collection of data organized in tables that can be queried and manipulated. A database management system (DBMS) allows users to add, insert, retrieve, change, and delete data from the database. The relational model represents data in tables with rows and columns and allows queries using SQL. The Perl DBI provides a standardized interface to connect to and interact with different database systems from Perl code.
Structured Query Language (SQL) _ Edu4Sure Training.pptxEdu4Sure
The PPT content is for reference only. The training will be hands-on & practical.
Training: SQL (Structured Query Language)
For any Training & Certificate, please email us at [email protected]
or Call/ whatsapp at +91-9555115533
Or visit www.testformula.com (Our LMS to access Self-paced vidoes) or visit www.edu4sure.com
This document discusses an introduction to Structured Query Language (SQL). It covers SQL concepts like data definition language to create and modify database tables, data types, queries to select data from one or multiple tables, filtering with selections, ordering results, and joining tables. The document is presented as part of a university course on database technologies by the Department of Information Technology.
This document summarizes the history of PHP persistence from 1995 to present day. It begins with early file handling in PHP/FI in 1995 and the introduction of database support. It then discusses the evolution of code reusability through functions and classes. Professional abstraction layers like PEAR and later ORM frameworks provided more robust and standardized APIs. NoSQL databases and drivers were later incorporated, moving beyond relational databases. Current frameworks provide object document mapping for non-SQL databases like MongoDB.
A presentation about MySQL for beginners. It includes the following topics:
- Introduction
- Installation
- Executing SQL statements
- SQL Language Syntax
- The most important SQL commands
- MySQL Data Types
- Operators
- Basic Syntax
- SQL Joins
- Some Exercise
SQLite is an embedded SQL database engine that is public domain, self-contained, serverless, zero-configuration, and transactional. It is used in many applications due to its small size and ease of use. This tutorial covers the basics of SQLite including its database structure, SQL language implementation, and provides sample tables to demonstrate concepts.
This document discusses biological databases and SQL. It provides an overview of primary and derived data in biological research, as well as different data levels. It then discusses direct querying of selected bioinformatics databases using SQL and provides examples of 3-tier database models. The document proceeds to discuss rationale for learning SQL to query biological databases and provides definitions and explanations of key SQL concepts like tables, records, queries, data types, keys, integrity rules and constraints.
Assignment 5Understanding SQL100 points (Questions 1 to 7 eac.docxssuser562afc1
Assignment 5
Understanding SQL
100 points: (Questions 1 to 7 each worth 12 points, Question 8 worth 16 points)
Please provide detail answer and explain If you run the following SQL queries what will be on your report. In simple words what will be the output of each of the following queries?
These questions are related to Databases Premiere Products described in lecture slide Database Concepts posted under this week for your review. Please read the PP slides to understand the Premiere Products database and answer the following questions.
For Example:
SELECT CustomerNum, CustomerName, CreditLimit, Balance FROM Customer WHERE CreditLimit>Balance ;
Your Answer: The output will list the number, name, credit limit, and balance for all customers with credit limits that exceed their balances
Now read each of the following 7 queries and submit a word document with your answers similar to the above example. Please only submit your answers do not repeat the queries.
1) SELECT CustomerNum, CustomerName, FROM Customer WHERE RepNum=’35’ UNION SELECT Customer.CustomerNum, CustomerName, FROM Customer, Orders WHERE Customer.CustomerNum=Orders.CustomerNum ;
2) SELECT Description FROM Part WHERE Warehouse=’3’ OR OnHand>20 ;
3) SELECT CustomerNum, CustomerName, Street, City, State, Zip FROM Customer WHERE Street LIKE “*Oxford”;
4) SELECT CustomerNum, CustomerName, Street, CreditLimit FROM Customer ORDER BY CreditLimit DESC, CustomerName ;
5) SELECT CustomerNum, CustomerName, CreditLimit, RepNum
FROM Customer
WHERE RepNum='35'
AND CreditLimit>2000;
6) SELECT CustomerNum, CustomerName, CreditLimit, RepNum
FROM Customer
WHERE RepNum='35'
OR CreditLimit<3000;
7) SELECT CustomerNum, CustomerName
FROM Customer, Rep
WHERE Customer.RepNum=Rep.RepNum
AND LastName='Perez' AND FirstName='Juan';
8) Review E-R diagram for the Premiere Products database on PP slide page 19 and
Explain what are the relationship between these tables. (16 points)
Good Luck
Concepts of Database Management
Introduction to Database Management
*
ObjectivesIntroduce Premiere Products, the company that is used as the basis for many of the examples throughout the textIntroduce basic database terminologyDescribe database management systems (DBMSs)Explain the advantages and disadvantages of database processing
*
*
Premiere Products BackgroundPremiere ProductsDistributor of appliances, houseware, and sporting goodsUses spreadsheet software to maintain important dataRecent growth has made spreadsheet approach problematic
*
*
Premiere Products Background (continued)
FIGURE 1-1: Sample orders spreadsheet
*
*
Premiere Products Background (continued)Problems using spreadsheetRedundancyDuplication of data or the storing of the same data in more than one placeDifficulty accessing related dataLimited securitySize limitations
*
*
Premiere Products Background (continued)Information P ...
This document contains study material prepared by D.GAYA, Assistant Professor of Computer Science at Pondicherry University Community College, for the subject Relational Database Management System. It covers various topics related to SQL including basic SQL reports and commands, data types, joins, DDL, DML, DCL commands, and binary data types. Examples are provided to explain concepts such as creating and dropping databases, creating tables, commenting in SQL, and using the TO_HEX and HEX_TO_BINARY functions for binary data.
This document provides an overview of biological databases and SQL. It discusses different data levels in biological research like primary data, derived data, and interpreted data. It also summarizes some popular biological databases like Ensembl, ArrayExpress, and PharmGKB and whether they support direct SQL querying. The document then provides definitions for key database concepts like database, table, record, and query. It also describes different data types in SQL like numeric, string, date/time types and large object types. It discusses keys, integrity rules, and referential integrity in database design.
This document discusses managing dynamic web content through databases. It explains that databases allow content to be programmatically generated and easier to manage over time compared to file-based systems. It provides an overview of key database concepts like tables, fields, queries, and the benefits of relational databases. It also introduces phpMyAdmin as a tool for visually managing databases and provides examples of connecting to a MySQL database from PHP scripts to perform operations like selecting, inserting, and retrieving data.
Android is an open-source, Linux-based operating system developed by Google. It offers a unified approach to application development. Android versions are named after desserts or sweets and new versions typically introduce new features and capabilities. The document provides details on various Android versions as well as an overview of Android architecture and key components like the Linux kernel, libraries, runtime, and framework.
Open education aims to remove barriers to learning through open courses, open educational resources, and open pedagogies. Open courses like MOOCs had over 230,000 courses in 2012 enrolling over 25,000 students on average, though only 15% completed courses. Open educational resources are learning materials that can be modified and shared under open licenses. Benefits of open education include helping democratize and lifelong learning, allowing students to explore new industries, and providing flexibility for instructors.
This document discusses system security topics such as root user usage, user security, login blocking, network security, OpenSSH, SSH port tunneling, public key authentication, and GNU Privacy Guard (GnuPG). It provides instructions for switching to the root user safely, setting password expiration, limiting user resources, blocking logins, and configuring OpenSSH encryption. Public key authentication with OpenSSH verifies users by matching encrypted random number hashes.
This document provides an overview of networking concepts for a Linux system administration course. It covers topics like IPv4 and IPv6 addressing, network interface configuration, routing, hostname and DNS configuration, and troubleshooting. Key points include how ports allow services to run on a single IP address, methods for static and dynamic IP configuration, link-local versus global IPv6 addresses, and tools for resolving hostnames and checking network connectivity issues.
Disk and File System Management in LinuxHenry Osborne
This document discusses disk and file system management in Linux. It covers MBR and GPT partition schemes, logical volume management, common file systems like ext4 and XFS, mounting file systems, and file system maintenance tools. It also discusses disk quotas, file ownership, permissions, and the umask command for setting default permissions.
The HTML5 canvas element allows drawing directly onto the page via JavaScript. It provides pixel-level control for creating animations, games, charts, and more. The canvas is drawn upon by using a drawing context object and its methods like fillRect(), stroke(), arc(), and fillText(). Gradients, patterns, and images can also be rendered onto the canvas to create advanced graphics.
The World Wide Web Consortium (W3C) introduced the video element for the purpose of playing videos and movies. The intent was to offer a standard way to play video on the web without requiring plug-ins.
The document discusses information architecture and its primary aims which include organizing content into taxonomies and hierarchies, communicating site structure to teams, researching navigation concepts, and setting standards for markup and content handling. It provides details on organizing content through inventories, hierarchies, taxonomies, chunking information, and designing site structure using sequences, hierarchies and webs. Diagrams and wireframes are presented as tools to visualize and communicate information architecture design.
The document discusses principles of effective interface and navigation design for websites. It covers the core components of wayfinding like orientation, route decisions, mental mapping and closure. It also discusses important design elements like paths, edges, districts, nodes and landmarks that help users navigate complex websites. Finally, it provides guidelines for designers like creating consistent navigation paths, unique regional identities, limiting choices on home pages, and using landmarks for orientation.
The document discusses universal usability and universal design principles. It outlines four principles of equitable use, flexible use, simple and intuitive use, and perceptible information. It then provides guidelines for universal usability including moving beyond typical users, supporting adaptation through flexibility, user control, keyboard functionality, and text equivalents. Finally, it discusses methods for incorporating universal usability into the design process such as user research, personas, scenarios, prototypes, and user testing.
PHP provides a rich toolset with immense power—some have argued that it is perhaps too much power—and this power, when used with careful attention to detail, allows for the creation of complex and robust applications. Without this attention to detail, though, malicious users can use PHP’s power to their advantage, attacking applications in a variety of ways.
The document discusses XML, XML technologies, and web services. It provides an overview of XML, defines key XML concepts like elements and attributes. It also discusses XML validation with DTDs, namespaces, parsing XML with SimpleXML and DOM, querying XML with XPath, and modifying XML. The document also provides an introduction to web services standards like XML-RPC, SOAP, and RESTful services.
Object Oriented programming, coupled with Design Patterns—including those provided by the Standard PHP Library—is the key to re-usable and highly modular code
This document provides an overview of object-oriented programming fundamentals in PHP, including classes, objects, inheritance, methods, properties, constructors, destructors, visibility, constants, interfaces, abstract classes, and exceptions. Key concepts covered are class declaration, object instantiation, class inheritance that allows extending and overriding methods and properties, defining and calling methods and properties, constructors and destructors, visibility levels for properties and methods, declaring and accessing properties, static methods and properties, class constants, interfaces for specifying APIs, abstract classes for defining basic skeletons, and exceptions for error control.
This document summarizes parameters used for file uploads in HTML forms. It lists parameter names like "name", "type", "size", and "tmp_name" that provide details about uploaded files, such as the original file name, file type, size, and temporary location. It also describes an "error" parameter that indicates if the file upload encountered any issues, with UPLOAD_ERR_OK representing a successful upload. Examples are given of URLs used to submit forms with GET and POST requests and order query strings.
Strings in PHP can represent text data and be manipulated using a variety of functions. Strings can be interpolated with variable values, accessed as arrays to retrieve individual characters, searched using functions like strpos(), and formatted for output. Common string operations include searching, replacing, comparing values, and extracting/modifying substrings.
This document discusses PHP functions and arrays. It covers basic syntax for defining functions, returning values from functions, and variable scope. It also covers array basics like indexing and printing arrays, as well as operations like sorting, searching, and iterating over arrays. Functions for stacks, queues and sets using arrays are also demonstrated. The document is a comprehensive reference for working with functions and arrays in PHP.
PHP is a scripting language commonly used for web development. It has tags like <?php ?> to denote code blocks. It supports common programming constructs like variables, data types, operators, conditional statements and loops. Variables start with $ and can be of types like integers, floats, strings, arrays and objects. PHP is loosely typed and performs automatic type conversions. Errors can be fatal, recoverable or warnings and notices.
This document discusses activities, fragments, and events in Android mobile application development. It covers the life cycle of activities, using fragments to customize user interfaces, linking activities with intents, and displaying notifications. Activities provide interfaces for user interaction and have stages like onCreate() and onPause(). Fragments are reusable interface elements that can be placed within activities. Notifications are persistent status bar messages.
The document discusses establishing a web presence, including identifying the key components needed such as an internet service provider to transmit data, web development tools to create and edit web pages, and understanding MIME types to properly display different file formats in browsers. It provides examples of popular wired and wireless internet services, text editors, servers, and FTP clients to use as development tools, and lists common file extensions and their associated MIME types.
*Order Hemiptera:*
Hemiptera, commonly known as true bugs, is a large and diverse order of insects that includes cicadas, aphids, leafhoppers, and shield bugs. Characterized by their piercing-sucking mouthparts, Hemiptera feed on plant sap, other insects, or small animals. Many species are significant pests, while others are beneficial predators.
*Order Neuroptera:*
Neuroptera, also known as net-winged insects, is an order of insects that includes lacewings, antlions, and owlflies. Characterized by their delicate, net-like wing venation and large, often prominent eyes, Neuroptera are predators that feed on other insects, playing an important role in biological control. Many species have aquatic larvae, adding to their ecological diversity.
How to Manage Maintenance Request in Odoo 18Celine George
Efficient maintenance management is crucial for keeping equipment and work centers running smoothly in any business. Odoo 18 provides a Maintenance module that helps track, schedule, and manage maintenance requests efficiently.
How to Create Quotation Templates Sequence in Odoo 18 SalesCeline George
In this slide, we’ll discuss on how to create quotation templates sequence in Odoo 18 Sales. Odoo 18 Sales offers a variety of quotation templates that can be used to create different types of sales documents.
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecdrazelitouali
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
This presentation has been made keeping in mind the students of undergraduate and postgraduate level. To keep the facts in a natural form and to display the material in more detail, the help of various books, websites and online medium has been taken. Whatever medium the material or facts have been taken from, an attempt has been made by the presenter to give their reference at the end.
In the seventh century, the rule of Sindh state was in the hands of Rai dynasty. We know the names of five kings of this dynasty- Rai Divji, Rai Singhras, Rai Sahasi, Rai Sihras II and Rai Sahasi II. During the time of Rai Sihras II, Nimruz of Persia attacked Sindh and killed him. After the return of the Persians, Rai Sahasi II became the king. After killing him, one of his Brahmin ministers named Chach took over the throne. He married the widow of Rai Sahasi and became the ruler of entire Sindh by suppressing the rebellions of the governors.
This presentation was provided by Nicole 'Nici" Pfeiffer of the Center for Open Science (COS), during the first session of our 2025 NISO training series "Secrets to Changing Behavior in Scholarly Communications." Session One was held June 5, 2025.
A short update and next week. I am writing both Session 9 and Orientation S1.
As a Guest Student,
You are now upgraded to Grad Level.
See Uploads for “Student Checkin” & “S8”. Thx.
Thank you for attending our workshops.
If you are new, do welcome.
Grad Students: I am planning a Reiki-Yoga Master Course (As a package). I’m Fusing both together.
This will include the foundation of each practice. Our Free Workshops can be used with any Reiki Yoga training package. Traditional Reiki does host rules and ethics. Its silent and within the JP Culture/Area/Training/Word of Mouth. It allows remote healing but there’s limits As practitioners and masters. We are not allowed to share certain secrets/tools. Some content is designed only for “Masters”. Some yoga are similar like the Kriya Yoga-Church (Vowed Lessons). We will review both Reiki and Yoga (Master tools) in the Course upcoming.
Session Practice, For Reference:
Before starting a session, Make sure to check your environment. Nothing stressful. Later, You can decorate a space as well.
Check the comfort level, any needed resources (Yoga/Reiki/Spa Props), or Meditation Asst?
Props can be oils, sage, incense, candles, crystals, pillows, blankets, yoga mat, any theme applies.
Select your comfort Pose. This can be standing, sitting, laying down, or a combination.
Monitor your breath. You can add exercises.
Add any mantras or affirmations. This does aid mind and spirit. It helps you to focus.
Also you can set intentions using a candle.
The Yoga-key is balancing mind, body, and spirit.
Finally, The Duration can be long or short.
Its a good session base for any style.
Next Week’s Focus:
A continuation of Intuition Development. We will review the Chakra System - Our temple. A misguided, misused situation lol. This will also serve Attunement later.
For Sponsor,
General updates,
& Donations:
Please visit:
https://ldmchapels.weebly.com
This presentation was provided by Jennifer Gibson of Dryad, during the first session of our 2025 NISO training series "Secrets to Changing Behavior in Scholarly Communications." Session One was held June 5, 2025.
Parenting Teens: Supporting Trust, resilience and independencePooky Knightsmith
For more information about my speaking and training work, visit: https://www.pookyknightsmith.com/speaking/
SESSION OVERVIEW:
Parenting Teens: Supporting Trust, Resilience & Independence
The teenage years bring new challenges—for teens and for you. In this practical session, we’ll explore how to support your teen through emotional ups and downs, growing independence, and the pressures of school and social life.
You’ll gain insights into the teenage brain and why boundary-pushing is part of healthy development, along with tools to keep communication open, build trust, and support emotional resilience. Expect honest ideas, relatable examples, and space to connect with other parents.
By the end of this session, you will:
• Understand how teenage brain development affects behaviour and emotions
• Learn ways to keep communication open and supportive
• Explore tools to help your teen manage stress and bounce back from setbacks
• Reflect on how to encourage independence while staying connected
• Discover simple strategies to support emotional wellbeing
• Share experiences and ideas with other parents
RE-LIVE THE EUPHORIA!!!!
The Quiz club of PSGCAS brings to you a fun-filled breezy general quiz set from numismatics to sports to pop culture.
Re-live the Euphoria!!!
QM: Eiraiezhil R K,
BA Economics (2022-25),
The Quiz club of PSGCAS
How to Create an Event in Odoo 18 - Odoo 18 SlidesCeline George
Creating an event in Odoo 18 is a straightforward process that allows you to manage various aspects of your event efficiently.
Odoo 18 Events Module is a powerful tool for organizing and managing events of all sizes, from conferences and workshops to webinars and meetups.
Artificial intelligence Presented by JM.jmansha170
AI (Artificial Intelligence) :
"AI is the ability of machines to mimic human intelligence, such as learning, decision-making, and problem-solving."
Important Points about AI:
1. Learning – AI can learn from data (Machine Learning).
2. Automation – It helps automate repetitive tasks.
3. Decision Making – AI can analyze and make decisions faster than humans.
4. Natural Language Processing (NLP) – AI can understand and generate human language.
5. Vision & Recognition – AI can recognize images, faces, and patterns.
6. Used In – Healthcare, finance, robotics, education, and more.
Owner By:
Name : Junaid Mansha
Work : Web Developer and Graphics Designer
Contact us : +92 322 2291672
Email : [email protected]
Different pricelists for different shops in odoo Point of Sale in Odoo 17Celine George
Price lists are a useful tool for managing the costs of your goods and services. This can assist you in working with other businesses effectively and maximizing your revenues. Additionally, you can provide your customers discounts by using price lists.
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptxArshad Shaikh
Diptera, commonly known as flies, is a large and diverse order of insects that includes mosquitoes, midges, gnats, and horseflies. Characterized by a single pair of wings (hindwings are modified into balancing organs called halteres), Diptera are found in almost every environment and play important roles in ecosystems as pollinators, decomposers, and food sources. Some species, however, are significant pests and disease vectors, transmitting diseases like malaria, dengue, and Zika virus.
Slides from a Capitol Technology University presentation covering doctoral programs offered by the university. All programs are online, and regionally accredited. The presentation covers degree program details, tuition, financial aid and the application process.
3. RELATIONAL DATABASE
A relational database is a collection of data items
organized as a set of formally-described tables from
which data can be accessed or reassembled in
many different ways without having to reorganize the
database tables. The relational database was
invented by E. F. Codd at IBM in 1970.
http://searchsqlserver.techtarget.com/definition/relational-database
4. INDICES
• Make it possible to organize the data in a table according
to one or more columns.
• One of the cardinal elements of relational databases
• Can usually be created on one or more columns of a table
• Can also be declared as unique
• Primary keys are a special type of unique index that is used
to determine the “natural” method of uniquely identifying a
row in a table
5. RELATIONSHIPS
• One-to-one: at most, one row in the child table can
correspond to each row in the parent table
• One-to-many: an arbitrary number of rows in the child table
can correspond to any one row in the parent table
• Many-to-many: an arbitrary number of rows in the child
table can correspond to an arbitrary number of rows in the
parent table
6. DATA TYPES
int or integer
smallint
real
float
char
varchar
Signed integer number, 32 bits in length.
Signed integer number, 16 bits in length.
Signed floating-point number, 32 bits in length.
Signed floating-point number, 64 bits in length.
Fixed-length character string.
Variable-length character string.
15. ADDING/MANIPULATING DATA
To update records, you can use the UPDATE statement.
UPDATE book
SET publisher = ’Tor Science Fiction’, author = ’Orson S. Card’
WHERE isbn = ’0812550706’;
17. RETRIEVE DATA
SELECT * FROM book;
SELECT * FROM book WHERE author = ’Ray Bradbury’;
SELECT * FROM book
WHERE author = ’Ray Bradbury’ OR author = ’George Orwell’;
SELECT * FROM book
WHERE author = ’Ray Bradbury’ AND publisher LIKE ’%Del Ray’;
21. PHP DATA OBJECTS (PDO)
• The standard distribution of PHP 5.1 and greater includes
PDO and the drivers for SQLite by default
• There are many other database drivers for PDO, including:
• Microsoft SQL Server
• Firebird
• MySQL
• Oracle
• PostgreSQL, and
• ODBC
22. PHP DATA OBJECTS (PDO)
• Once installed, the process for using each driver is,
for the most part, the same because PDO provides a
unified data access layer to each of these
database engines.
• There is no longer a need for separate mysql_query()
or pg_query() functions.
• PDO provides a single object-oriented interface to
these databases.
24. ERROR HANDLING
try {
$dsn = ’mysql:host=localhost;dbname=library’;
$dbh = new PDO($dsn, ’dbuser’, ’dbpass’);
$dbh->setAttribute(PDO::ATTR_EMULATE_PREPARES, TRUE);
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
// All other database calls go here
}
catch (PDOException $e)
{
echo ’Failed: ’ . $e->getMessage();
}
25. DATABASE QUERY WITH PDO
$author = ’’;
if (ctype_alpha($_GET[’author’])){
$author = $_GET[’author’];
}
// Escape the value of $author with quote()
$sql = ’SELECT author.*, book.* FROM author LEFT JOIN book ON author.id =
book.author_id WHERE author.last_name = ’ . $dbh->quote($author);
// Execute the statement and echo the results
$results = $dbh->query($sql);
foreach ($results as $row)
{
echo "{$row[’title’]}, {$row[’last_name’]}n";
}
26. DATABASE QUERY WITH PDO
$results = $dbh->query($sql);
$results->setFetchMode(PDO::FETCH_OBJ);
foreach ($results as $row)
{
echo "{$row->title}, {$row->last_name}n";
}
27. DATABASE QUERY WITH PDO
$sql = "INSERT INTO book (isbn, title, author_id,
publisher_id)
VALUES (’0395974682’, ’The Lord of the Rings’, 1,
3)";
$affected = $dbh->exec($sql);
echo "Records affected: {$affected}";
#7: SQL supports a number of data types, which provide a greater degree of flexibility than PHP in how the data is stored and representedchar string will always have a fixed length, regardless of how many characters it contains (the string is usually padded with spaces to the column’s length). In both cases, however, a string column must be given a length (usually between 1 and 255 characters, al-though some database systems do not follow this rule), which means that any string coming from PHP, where it can have an arbitrary length, can be truncated, usually without even a warning, thus resulting in the loss of data.Most database systems also define an arbitrary-length character data type (usually called text) that most closely resembles PHP’s strings. However, this data type usually comes with a number of strings attached (such as a maximum allowed length and severe limitations on search and indexing capabilities). Therefore, you will still be forced to use char and (more likely) varchar, with all of their limitations.
#8: The formal definition of database schema is a set of formulas (sentences) called integrity constraints imposed on a database. These integrity constraints ensure compatibility between parts of the schema. All constraints are expressible in the same language. ~http://en.wikipedia.org/wiki/Database_schema
#11: Indices can be created (as was the example with the primary key above) while you are creating a table; alternatively, you can create them separately at a later point in time
#12: Foreign-key relationships are created either when a table is created, or at a later date with an altering statement. For example, suppose we wanted to add a table that contains a list of all of the chapter titles for every bookThis code creates a one-to-many relationship between the parent table book and the child table book_chapter based on the isbn field. Once this table is created, you can only add a row to it if the ISBN you specify exists in book.
#13: The act of deleting an object from a schema—be it a table, an index, or even the schema itself—is called dropping. It is performed by a variant of the DROP statementA good database system that supports referential integrity will not allow you to drop a table if doing so would break the consistency of your data. Thus, deleting the book table cannot take place until book_chapter is dropped first.The same technique can be used to drop an entire schema
#14: The first form of the INSERT statement is used when you want to provide values for every column in your table—in this case, the column values must be specified in the same order in which they appear in the table declaration.In its second form, the INSERT statement consists of three main parts. The first part tells the database engine into which table to insert the data. The second part indicates the columns for which we’re providing a value; finally, the third part contains the actual data to insert.
#17: DELETE FROM book;This simple statement will remove all records from the book table, leaving behind an empty table.
#18: To retrieve data from any SQL database engine, you must use a SELECT statement; SELECT statements range from very simple to incredibly complex, depending on your needsSELECT * FROM bookWHERE author = ’Ray Bradbury’ OR author = ’George Orwell’;SELECT * FROM bookWHERE author = ’Ray Bradbury’ AND publisher LIKE ’%Del Ray’;The first example statement contains an OR clause and, thus, broadens the results to return all books by each author, while the second statement further restricts the results with an AND clause to all books by the author that were also published by a specific publisher. Note, here, the use of the LIKE operator, which provides a case-insensitive match and allows the use of the % wild character to indicate an arbi-trary number of characters. Thus, the expression AND publisher LIKE ’%Del Ray’ will match any publisher that ends in the string del ray, regardless of case.
#19: Joins combine data from multiple tables to create a single recordset.There are two basic types of joins: inner joins and outer joins. In both cases, joins create a link between two tables based on a common set of columns (keys).An inner join returns rows from both tables only if keys from both tables can be found that satisfies the join conditions.
#20: Outer joins return all records from one table, while restricting the other table to matching records, which means that some of the columns in the results will contain NULL values.Left joins are a type of outer join in which every record in the left table that matches the WHERE clause (if there is one) will be returned regardless of a match made in the ON clause of the right table.
#21: Right joins are analogous to left joins—only reversed: instead of returning all results from the “left” side, the right join returns all results from the “right” side, restricting results from the “left” side to matches of the ON clause.Here, the table on the left is still the author table, and the right table is still the book table, but, this time, the results returned will include all records from the book table and only those from the author table that match the ON clause where book.author_id = author.id
#24: To connect to a database, PDO requires at least a Data Source Name, or DSN, format-ted according to the driver used. Detailed DSN formatting documentation exists on the PHP Web site for each driver. Additionally, if your database requires a username or password, PDO will need these to access the database.
#25: This is not only a best practice, but it is very useful in debugging. Note that the default error mode for PDO is PDO::ERRMODE_SILENT, which means that it will not emit any warnings or error messages. For the examples the error mode is set to PDO::ERRMODE_EXECEPTION. This causes PDO to throw a PDOExecption when an error occurs. This exception can be caught and displayed for debugging purposes.
#26: To retrieve a result set from a database using PDO, use the PDO::query() method.To escape a value included in a query (e.g. from $_GET, $_POST, $_COOKIE, etc.) use the PDO::quote() method. PDO will ensure that the string is quoted properly for the database used.The method PDO::query() returns a PDOStatement object.
#27: By default, the fetch mode for a PDOStatement is PDO::FETCH_BOTH, which means that it will return an array containing both associative and numeric indexes. It is possible to change the PDOStatement object to return, for example, an object instead of an array so that each column in the result set may be accessed as properties of an object instead of array indices.
#28: To execute an INSERT, UPDATE, or DELETE statement against a database, PDO provides the PDO::exec() method. The PDO::exec() method executes an SQL statement and returns the number of rows affected.