This Doc Consist of ER diagram of University and NHL, Introduction to posgres SQL and installation,DML and its various commands,implementation of constraints with examples,DML Implementation with set operations & Functions,Implementation of nested Queries.
The document discusses various types of constraints in SQL including column level constraints like NOT NULL, UNIQUE, DEFAULT, and CHECK constraints as well as table level constraints like PRIMARY KEY and FOREIGN KEY. It provides examples of how to define these constraints when creating or altering tables and explains how each constraint enforces integrity rules and data validation. Constraints are used to impose rules on data values and relationships between columns and tables.
SQL is a standard language for querying and manipulating data in relational databases. It contains five categories of statements: data definition language (DDL) for defining data structure, data manipulation language (DML) for managing data, data control language (DCL) for privileges, transaction control statements for transactions, and session control statements for sessions. Common DDL commands include CREATE, ALTER, and DROP for databases and tables. Common DML commands include SELECT, INSERT, UPDATE, and DELETE for querying and modifying data. Joins are used to combine data from two or more tables.
The document describes several databases related to banking, insurance, orders, students, and books. It includes the structure of each database with table definitions and sample data. Various SQL queries are demonstrated to retrieve, update, insert and delete records in the tables to solve business problems for each database application.
Structured Query Language
SQL Commands:
• The standard SQL commands to interact with relational databases are CREATE, SELECT, INSERT, UPDATE, DELETE and DROP
(INNER) JOIN: , LEFT (OUTER) JOIN: ,RIGHT (OUTER) JOIN: , FULL (OUTER) JOIN: , SQL UNION Operator, SQL GROUP BY HAVING statement, The SQL EXISTS Operator, The SQL ANY and ALL Operators, The SQL SELECT INTO Statement, The SQL INSERT INTO SELECT StatementThe SQL INSERT INTO SELECT Statement
This document provides an overview of PL/SQL (Embedded SQL) including its basic constructs such as anonymous blocks, procedures, functions, packages, triggers, and cursors. It discusses the benefits of PL/SQL in combining the power of SQL with programming constructs like loops and conditional statements. Examples are provided for each construct to demonstrate their usage.
The document discusses various types of constraints in SQL including column level constraints like NOT NULL, UNIQUE, DEFAULT, and CHECK constraints as well as table level constraints like PRIMARY KEY and FOREIGN KEY. It provides examples of how to define these constraints when creating or altering tables and explains how each constraint enforces integrity rules and data validation. Constraints are used to impose rules on data values and relationships between columns and tables.
SQL is a standard language for querying and manipulating data in relational databases. It contains five categories of statements: data definition language (DDL) for defining data structure, data manipulation language (DML) for managing data, data control language (DCL) for privileges, transaction control statements for transactions, and session control statements for sessions. Common DDL commands include CREATE, ALTER, and DROP for databases and tables. Common DML commands include SELECT, INSERT, UPDATE, and DELETE for querying and modifying data. Joins are used to combine data from two or more tables.
The document describes several databases related to banking, insurance, orders, students, and books. It includes the structure of each database with table definitions and sample data. Various SQL queries are demonstrated to retrieve, update, insert and delete records in the tables to solve business problems for each database application.
Structured Query Language
SQL Commands:
• The standard SQL commands to interact with relational databases are CREATE, SELECT, INSERT, UPDATE, DELETE and DROP
(INNER) JOIN: , LEFT (OUTER) JOIN: ,RIGHT (OUTER) JOIN: , FULL (OUTER) JOIN: , SQL UNION Operator, SQL GROUP BY HAVING statement, The SQL EXISTS Operator, The SQL ANY and ALL Operators, The SQL SELECT INTO Statement, The SQL INSERT INTO SELECT StatementThe SQL INSERT INTO SELECT Statement
This document provides an overview of PL/SQL (Embedded SQL) including its basic constructs such as anonymous blocks, procedures, functions, packages, triggers, and cursors. It discusses the benefits of PL/SQL in combining the power of SQL with programming constructs like loops and conditional statements. Examples are provided for each construct to demonstrate their usage.
This document provides an overview of entity-relationship modeling as a first step for designing a relational database. It describes how to model entities, attributes, relationships, and participation constraints. Key aspects covered include using boxes to represent entity types, diamonds for relationship types, and labeling relationships with degrees. The document also discusses handling multi-valued attributes and deciding whether to model concepts as attributes or entity types.
This document contains a 40 question multiple choice test on database concepts. It covers topics like the ANSI-SPARC architecture, database properties, relationships in ER models, keys, normalization, and transactions. Sample questions test identification of entities, relationships and keys in ER diagrams. Other questions cover SQL statements, relational algebra operations, and concurrency control topics like isolation levels and locking. The test is divided into two sections, with the second section containing two structured questions requiring explanations of database concepts and drawing an ER diagram.
Function in PL/SQL, Create Function Syntax, Example – No Parameters in Function , Example – Testing RetrieveSalary Function, Example Function with Parameter, Dropping a Function
The document provides an overview of entity-relationship (E-R) modeling concepts including:
- Entity sets represent collections of real-world entities that share common properties
- Relationship sets define associations between entity sets
- Attributes provide additional information about entities and relationships
- Keys uniquely identify entities and relationships
- Cardinalities constrain how entities can participate in relationships
- E-R diagrams visually depict entity sets, attributes, relationships and constraints.
Aggregate functions are functions that take a collection of values as input and return a single value.The ISO standard defines five (5) aggregate functions namely :-
1) COUNT
2) SUM
3) AVG
4) MIN
5) MAX
1.COUNT Function
The COUNT function returns the total number of values in the specified field. It works on both numeric and non-numeric data types. All aggregate functions by default exclude nulls values before working on the data.
MIN function
The MIN function returns the smallest value in the specified table field.
2.MAX function
Just as the name suggests, the MAX function is the opposite of the MIN function. It returns the largest value from the specified table field.
3.SUM function
Suppose we want a report that gives total amount of payments made so far. We can use the MySQL SUM function which returns the sum of all the values in the specified column. SUM works on numeric fields only. Null values are excluded from the result returned.
4.AVG function
MySQL AVG function returns the average of the values in a specified column. Just like the SUM function, it works only on numeric data types.
5.MIN function
The MIN function returns the smallest value in the specified table field.
Object Oriented Approach for Software DevelopmentRishabh Soni
This document provides an overview of object-oriented design methodologies. It discusses key object-oriented concepts like abstraction, encapsulation, and polymorphism. It also describes the three main models used in object-oriented analysis: the object model, dynamic model, and functional model. Finally, it outlines the typical stages of the object-oriented development life cycle, including system conception, analysis, system design, class design, and implementation.
PL/SQL is a programming language and control structures used for Oracle databases. It allows for procedural programming, object-oriented programming features like data encapsulation and error handling. PL/SQL code is organized into logical blocks like anonymous and named blocks. It supports various data types, variables, control structures like conditional statements and loops, and SQL statements for data manipulation.
Structured Query Language (SQL) is a query language that allows users to specify conditions to retrieve data from a database. SQL queries select rows from database tables that satisfy specified conditions. The results are output in a table format. Common SQL clauses include SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY, and INTO to output results to a table, cursor, file or printer. SQL can perform queries on single or multiple related tables through joins.
The document discusses various SQL concepts like database and tables, RDBMS terminology, SQL commands categories, data types, creating and manipulating tables. It explains concepts like primary key, foreign key, aggregate functions like MAX(), MIN(), AVG(), SUM(). Examples are provided for queries using SELECT, WHERE, ORDER BY, UPDATE and DELETE statements. Logical and relational operators used for filtering data in WHERE clause are also explained.
The document discusses requirements analysis and specification in software engineering. It defines what requirements are and explains the typical activities involved - requirements gathering, analysis, and specification. The importance of documenting requirements in a Software Requirements Specification (SRS) document is explained. Key sections of an SRS like stakeholders, types of requirements (functional and non-functional), and examples are covered. Special attention is given to requirements for critical systems and importance of non-functional requirements.
This document provides an introduction to SQL (Structured Query Language). It defines SQL as a standard language for accessing and manipulating databases. The key points covered include:
- SQL lets you perform queries against a database to retrieve, insert, update, and delete data. It can also be used to create and modify database structures.
- Common SQL commands covered are SELECT, INSERT, UPDATE, DELETE, CREATE TABLE, ALTER TABLE, DROP TABLE.
- Additional SQL concepts explained are data types, WHERE clauses, ORDER BY clauses, GROUP BY clauses, and JOIN operations.
- RDBMS systems like MySQL, SQL Server, Oracle, etc. use SQL to communicate with the databases they manage.
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.
Keys are used to establish relationships between tables and uniquely identify records. The main types of keys are:
- Primary key - uniquely identifies each record and is never null; every table must have a primary key.
- Foreign key - references a primary key in another table to link the tables; ensures referential integrity.
- Candidate key - minimum set of fields that uniquely identify records; one is selected as the primary key while others are alternate keys.
Consists of the explanations of the basics of SQL and commands of SQL.Helpful for II PU NCERT students and also degree studeents to understand some basic things.
This document discusses different types of SQL joins: inner join, outer join, and cross join. It explains that inner joins return only matching records from both tables, while outer joins return all records from one table and matching records from the other table. The three types of outer joins are left, right, and full outer joins. Cross joins return all possible combinations of records between the two tables. Syntax examples and sample queries are provided to illustrate each type of join.
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.
The document provides instructions on how to create tables, insert data, and write queries for a database with tables for students, library memberships, books, and book issue records. It includes examples of creating the tables with primary and foreign keys, inserting sample data, and queries to list student names and issued books, count books issued per student, and create views of issue records and daily issues.
Banking Management System Project documentationChaudhry Sajid
This document provides the full documentation for a bank management system project. It contains sections on the table of contents, acknowledgments, declarations, project overview, abstract, introduction to SQL and database concepts, product overview, requirements, design and architecture, implementation details, additional features, main code, user guide and conclusion. It was created by four students for their class project and submitted to their project supervisor for review. The document outlines the purpose and functionality of the bank management system they developed using Oracle Database software on a Windows operating system.
This document discusses different types of SQL functions including string, numeric, conversion, group, date/time, and user-defined functions. It provides examples of common string functions like UPPER, LENGTH, SUBSTR. Numeric functions covered include ABS, ROUND, POWER. Group functions include AVG, COUNT, MAX, MIN, SUM. Date functions allow conversion and calculation involving dates. The document demonstrates how to create scalar and table-valued user-defined functions in SQL.
This document summarizes structural modeling techniques used to identify classes in object-oriented analysis and design. It discusses three common approaches: the noun-phrase approach, which identifies classes from nouns in requirements; the common class pattern approach, which leverages known common classes; and the use case driven approach, which analyzes use cases. It also describes how to represent classes, relationships, interfaces and packages using class and object diagrams. Finally, it compares entity-relationship diagrams and class diagrams, noting class diagrams describe system structure without persistence details.
This document provides an introduction and overview of PostgreSQL, including its history, features, installation, usage and SQL capabilities. It describes how to create and manipulate databases, tables, views, and how to insert, query, update and delete data. It also covers transaction management, functions, constraints and other advanced topics.
PostgreSQL 8.4 introduced several new features including common table expressions, window functions, parallel restore, and performance improvements. Version 9.0 will focus on improving replication support through streaming replication and read-only hot standby servers. Overall, PostgreSQL continues to expand its feature set to better support modern SQL standards.
This document provides an overview of entity-relationship modeling as a first step for designing a relational database. It describes how to model entities, attributes, relationships, and participation constraints. Key aspects covered include using boxes to represent entity types, diamonds for relationship types, and labeling relationships with degrees. The document also discusses handling multi-valued attributes and deciding whether to model concepts as attributes or entity types.
This document contains a 40 question multiple choice test on database concepts. It covers topics like the ANSI-SPARC architecture, database properties, relationships in ER models, keys, normalization, and transactions. Sample questions test identification of entities, relationships and keys in ER diagrams. Other questions cover SQL statements, relational algebra operations, and concurrency control topics like isolation levels and locking. The test is divided into two sections, with the second section containing two structured questions requiring explanations of database concepts and drawing an ER diagram.
Function in PL/SQL, Create Function Syntax, Example – No Parameters in Function , Example – Testing RetrieveSalary Function, Example Function with Parameter, Dropping a Function
The document provides an overview of entity-relationship (E-R) modeling concepts including:
- Entity sets represent collections of real-world entities that share common properties
- Relationship sets define associations between entity sets
- Attributes provide additional information about entities and relationships
- Keys uniquely identify entities and relationships
- Cardinalities constrain how entities can participate in relationships
- E-R diagrams visually depict entity sets, attributes, relationships and constraints.
Aggregate functions are functions that take a collection of values as input and return a single value.The ISO standard defines five (5) aggregate functions namely :-
1) COUNT
2) SUM
3) AVG
4) MIN
5) MAX
1.COUNT Function
The COUNT function returns the total number of values in the specified field. It works on both numeric and non-numeric data types. All aggregate functions by default exclude nulls values before working on the data.
MIN function
The MIN function returns the smallest value in the specified table field.
2.MAX function
Just as the name suggests, the MAX function is the opposite of the MIN function. It returns the largest value from the specified table field.
3.SUM function
Suppose we want a report that gives total amount of payments made so far. We can use the MySQL SUM function which returns the sum of all the values in the specified column. SUM works on numeric fields only. Null values are excluded from the result returned.
4.AVG function
MySQL AVG function returns the average of the values in a specified column. Just like the SUM function, it works only on numeric data types.
5.MIN function
The MIN function returns the smallest value in the specified table field.
Object Oriented Approach for Software DevelopmentRishabh Soni
This document provides an overview of object-oriented design methodologies. It discusses key object-oriented concepts like abstraction, encapsulation, and polymorphism. It also describes the three main models used in object-oriented analysis: the object model, dynamic model, and functional model. Finally, it outlines the typical stages of the object-oriented development life cycle, including system conception, analysis, system design, class design, and implementation.
PL/SQL is a programming language and control structures used for Oracle databases. It allows for procedural programming, object-oriented programming features like data encapsulation and error handling. PL/SQL code is organized into logical blocks like anonymous and named blocks. It supports various data types, variables, control structures like conditional statements and loops, and SQL statements for data manipulation.
Structured Query Language (SQL) is a query language that allows users to specify conditions to retrieve data from a database. SQL queries select rows from database tables that satisfy specified conditions. The results are output in a table format. Common SQL clauses include SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY, and INTO to output results to a table, cursor, file or printer. SQL can perform queries on single or multiple related tables through joins.
The document discusses various SQL concepts like database and tables, RDBMS terminology, SQL commands categories, data types, creating and manipulating tables. It explains concepts like primary key, foreign key, aggregate functions like MAX(), MIN(), AVG(), SUM(). Examples are provided for queries using SELECT, WHERE, ORDER BY, UPDATE and DELETE statements. Logical and relational operators used for filtering data in WHERE clause are also explained.
The document discusses requirements analysis and specification in software engineering. It defines what requirements are and explains the typical activities involved - requirements gathering, analysis, and specification. The importance of documenting requirements in a Software Requirements Specification (SRS) document is explained. Key sections of an SRS like stakeholders, types of requirements (functional and non-functional), and examples are covered. Special attention is given to requirements for critical systems and importance of non-functional requirements.
This document provides an introduction to SQL (Structured Query Language). It defines SQL as a standard language for accessing and manipulating databases. The key points covered include:
- SQL lets you perform queries against a database to retrieve, insert, update, and delete data. It can also be used to create and modify database structures.
- Common SQL commands covered are SELECT, INSERT, UPDATE, DELETE, CREATE TABLE, ALTER TABLE, DROP TABLE.
- Additional SQL concepts explained are data types, WHERE clauses, ORDER BY clauses, GROUP BY clauses, and JOIN operations.
- RDBMS systems like MySQL, SQL Server, Oracle, etc. use SQL to communicate with the databases they manage.
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.
Keys are used to establish relationships between tables and uniquely identify records. The main types of keys are:
- Primary key - uniquely identifies each record and is never null; every table must have a primary key.
- Foreign key - references a primary key in another table to link the tables; ensures referential integrity.
- Candidate key - minimum set of fields that uniquely identify records; one is selected as the primary key while others are alternate keys.
Consists of the explanations of the basics of SQL and commands of SQL.Helpful for II PU NCERT students and also degree studeents to understand some basic things.
This document discusses different types of SQL joins: inner join, outer join, and cross join. It explains that inner joins return only matching records from both tables, while outer joins return all records from one table and matching records from the other table. The three types of outer joins are left, right, and full outer joins. Cross joins return all possible combinations of records between the two tables. Syntax examples and sample queries are provided to illustrate each type of join.
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.
The document provides instructions on how to create tables, insert data, and write queries for a database with tables for students, library memberships, books, and book issue records. It includes examples of creating the tables with primary and foreign keys, inserting sample data, and queries to list student names and issued books, count books issued per student, and create views of issue records and daily issues.
Banking Management System Project documentationChaudhry Sajid
This document provides the full documentation for a bank management system project. It contains sections on the table of contents, acknowledgments, declarations, project overview, abstract, introduction to SQL and database concepts, product overview, requirements, design and architecture, implementation details, additional features, main code, user guide and conclusion. It was created by four students for their class project and submitted to their project supervisor for review. The document outlines the purpose and functionality of the bank management system they developed using Oracle Database software on a Windows operating system.
This document discusses different types of SQL functions including string, numeric, conversion, group, date/time, and user-defined functions. It provides examples of common string functions like UPPER, LENGTH, SUBSTR. Numeric functions covered include ABS, ROUND, POWER. Group functions include AVG, COUNT, MAX, MIN, SUM. Date functions allow conversion and calculation involving dates. The document demonstrates how to create scalar and table-valued user-defined functions in SQL.
This document summarizes structural modeling techniques used to identify classes in object-oriented analysis and design. It discusses three common approaches: the noun-phrase approach, which identifies classes from nouns in requirements; the common class pattern approach, which leverages known common classes; and the use case driven approach, which analyzes use cases. It also describes how to represent classes, relationships, interfaces and packages using class and object diagrams. Finally, it compares entity-relationship diagrams and class diagrams, noting class diagrams describe system structure without persistence details.
This document provides an introduction and overview of PostgreSQL, including its history, features, installation, usage and SQL capabilities. It describes how to create and manipulate databases, tables, views, and how to insert, query, update and delete data. It also covers transaction management, functions, constraints and other advanced topics.
PostgreSQL 8.4 introduced several new features including common table expressions, window functions, parallel restore, and performance improvements. Version 9.0 will focus on improving replication support through streaming replication and read-only hot standby servers. Overall, PostgreSQL continues to expand its feature set to better support modern SQL standards.
The document proposes an IT infrastructure for Shiv LLC, a company with locations in Los Angeles, Dallas, and Houston. It recommends implementing an Active Directory domain to enable communication and file sharing across the three locations. A centralized file server would store common files and applications. Each location would have its own local area network, connected to the other sites and to the internet via VPN. Firewalls, antivirus software, and regular backups would help secure the network and protect company data. The design allows for future growth and expansion as the company scales up.
Postgres в основе вашего дата-центра, Bruce Momjian (EnterpriseDB)Ontico
This document discusses how Postgres can function as a central database in enterprises due to its extensibility and flexibility. Postgres supports object-relational features like user-defined data types, functions, operators and indexes. It also supports plug-ins for NoSQL-like functionality, analytics, and data federation. The document outlines how Postgres compares favorably to traditional relational and NoSQL databases by combining the best aspects of both.
This short text will get you up to speed in no time on creating visualizations using R's ggplot2 package. It was developed as part of a training to those who had no prior experience in R and had limited knowledge on general programming concepts. It's a must have initial guide for those exploring the field of Data Science
The document describes the steps to install MySQL on Windows. It begins with downloading the MySQL community server software from the official website. It then outlines 14 steps for the installation process, which includes selecting the setup type, configuring options like the authentication method and root password, configuring the Windows service, and completing the installation. It provides screenshots for some of the installation wizard screens. Once installed, it opens the MySQL shell and Workbench.
Postgres has the unique ability to act as a powerful data aggregator in many data centers. This presentation shows how Postgres's extensibility, access to foreign data sources, and ability handle NoSQL-like and data warehousing workloads gives it unmatched capabilities to function in this role.
- Exploratory data analysis (EDA) is used to summarize and visualize data to understand its key characteristics, variables, and relationships.
- In R, EDA involves descriptive statistics like mean, median, and mode as well as graphical methods like histograms, density plots, and box plots.
- Functions like head(), tail(), summary(), and str() provide information about the structure, dimensions, and descriptive statistics of data frames in R. Additional functions like pairs plots and faceted histograms allow visualizing relationships between variables.
The document outlines a lecture plan for object oriented programming. It covers topics like structures and classes, function overloading, constructors and destructors, operator overloading, inheritance, polymorphism, and file streams. It provides examples to explain concepts like structures, classes, access specifiers, friend functions, and operator overloading. The document also includes questions for students to practice these concepts.
SQLMAP is an open source penetration testing tool that automates the process of detecting and exploiting SQL injection flaws and taking over of database servers.
This document provides information about an upcoming DataWeave meetup session, including details about the speaker, agenda, and logistics. The speaker will discuss DataWeave basics like data types, operators, and expressions for transforming data to JSON, Java, and XML formats. The session will include hands-on examples using the Transform Message component. Attendees can ask questions in the chat and provide feedback after the meetup.
Boost Your Neo4j with User-Defined ProceduresNeo4j
The document discusses user-defined procedures and functions in Neo4j. It begins with an example of a simple "Hello World" user-defined function. It describes how procedures and functions can be written in any JVM language, deployed to the database, and accessed via Cypher. It provides examples of real-world uses like optimizing queries for category overlap. It also discusses existing libraries like APOC that provide common graph algorithms and functions. The document provides guidance on developing, testing, and deploying custom procedures and functions.
Pig Latin is a data flow language for analyzing large datasets that provides an alternative to SQL and MapReduce. It allows programmers to write scripts as a sequence of steps and handles optimization and parallelization. Pig Latin supports user-defined functions, flexible nested data models, and interactive debugging. The language is implemented by compiling logical query plans into physical MapReduce jobs and allows for lazy execution. It is well suited for tasks like temporal analysis, session analysis, and rollups on large log and web crawl data.
Best Data Science Ppt using Python
Data science is an inter-disciplinary field that uses scientific methods, processes, algorithms and systems to extract knowledge and insights from many structural and unstructured data. Data science is related to data mining, machine learning and big data.
Getting Started with PostGIS geographic database - Lasma Sietinsone, EDINAJISC GECO
The document discusses PostGIS, a spatial extension to PostgreSQL that allows for geographic data types and functions. It provides an overview of PostGIS features like geometry types and spatial functions, and describes common workflows for loading and querying spatial data using PostGIS. The document also outlines steps for installing PostgreSQL, PostGIS and osm2pgsql to load OpenStreetMap data and perform location-based queries on amenities data.
SQL Server 2008 Performance Enhancementsinfusiondev
This document summarizes several performance improvements introduced in SQL Server 2008 including partitioning enhancements, sparse columns, filtered indexes, plan freezing, and the MERGE statement. It provides information on how each feature works and example use cases.
A talk given by Julian Hyde at DataCouncil SF on April 18, 2019
How do you organize your data so that your users get the right answers at the right time? That question is a pretty good definition of data engineering — but it is also describes the purpose of every DBMS (database management system). And it’s not a coincidence that these are so similar.
This talk looks at the patterns that reoccur throughout data management — such as caching, partitioning, sorting, and derived data sets. As the speaker is the author of Apache Calcite, we first look at these patterns through the lens of Relational Algebra and DBMS architecture. But then we apply these patterns to the modern data pipeline, ETL and analytics. As a case study, we look at how Looker’s “derived tables” blur the line between ETL and caching, and leverage the power of cloud databases.
Similar to DataBase Management System Lab File (20)
This file work is made for the purpose of learning and to get knowledge about programs in big data. Relevant information is taken from various sources. This file was for acadmic purpose and it is shared for learnig purposes
This doc contain information about upcoming pen style networking technology called as 5 Pen Pc Technology.All the relevant data is taken from various sources and accordingly made for information and academic related purposes.
The document contains a list of experiments related to computer networking. It includes 7 experiments covering topics like defining different types of LANs, WANs and MANs; describing network devices and topologies; implementing framing methods like bit stuffing, byte stuffing and character stuffing; and implementing routing algorithms such as simple redundancy check, cyclic redundancy check, checksum, and Hamming code. For each experiment, it provides details about the concepts and includes sample C code programs to demonstrate the techniques.
A common parking issue faced by the people of India due to insufficient parking spaces available.So smart parking system is developed to overcome the problem of congestion of vehicles,traffic issues and much more.It is IOT based with use of different sensors and other devices.To save time and fuel we need to have such a smart system.It will be beneficial in controlling the pollution too.
This S.R.S deals with the basic's of hotel management system.It will show different features with different functionalities.Data Flow diagram is also mentioned With 0 and 1 Level diagram.
The document discusses several network topologies: bus, ring, star, mesh, tree, and hybrid. Bus topology connects all devices to a single cable. Ring topology connects each device to two neighbors in a closed loop. Star topology connects all devices to a central hub. Mesh topology uses point-to-point connections between all devices. Tree topology organizes devices hierarchically with connections to a root node. Hybrid topology combines two or more topologies.
This is an overview of my current metallic design and engineering knowledge base built up over my professional career and two MSc degrees : - MSc in Advanced Manufacturing Technology University of Portsmouth graduated 1st May 1998, and MSc in Aircraft Engineering Cranfield University graduated 8th June 2007.
Sri Guru Hargobind Ji - Bandi Chor Guru.pdfBalvir Singh
Sri Guru Hargobind Ji (19 June 1595 - 3 March 1644) is revered as the Sixth Nanak.
• On 25 May 1606 Guru Arjan nominated his son Sri Hargobind Ji as his successor. Shortly
afterwards, Guru Arjan was arrested, tortured and killed by order of the Mogul Emperor
Jahangir.
• Guru Hargobind's succession ceremony took place on 24 June 1606. He was barely
eleven years old when he became 6th Guru.
• As ordered by Guru Arjan Dev Ji, he put on two swords, one indicated his spiritual
authority (PIRI) and the other, his temporal authority (MIRI). He thus for the first time
initiated military tradition in the Sikh faith to resist religious persecution, protect
people’s freedom and independence to practice religion by choice. He transformed
Sikhs to be Saints and Soldier.
• He had a long tenure as Guru, lasting 37 years, 9 months and 3 days
1. 1 | P a g e
Submitted To:- Submitted By:-
Sir Arun Kumar Uttam Singh Chaudhary
(17EMBIT055)
2. 2 | P a g e
Table of Contents
S.no Experiment Page no.
1 Database design using E-R model of
university
4
2 Database design using E-R model
National Hockey league
5-8
3 Introductionto PostGres SQL and its
installation.
9-17
4 Implementation of Data Definition
language (DML), Commands with
Examples
i. Create Database
ii. Select Database
iii. Delete Database
iv. Create Table
v. Delete Table
vi. Insertion Data into table, Etc.
18-23
5 Implement type of Constraintswith
Examples
(a) Primary key, (b) Foreign Key,
(c) Check, (d) Unique (e) Null
(f) Not null, (g) Default
24-28
6 Implementation on Data
Manipulation (DML) (Introductionto
29-32
3. 3 | P a g e
SQL)
a. Select clause
b. From clause
c. Where clause
7 implementation on Data
Manipulation (DML)
a. Aggregation functions (Min,
Max, Sum, Avg, count)
b. Group by clause
c. Having
d. Rename operation (as)
33-36
8 Implementation on Data
Manipulation (DML), Set Operations
a. Union Operation
b. Intersect Operation
c. Except Operation
37-39
9 Implementation of Nested Queries 40-45
10 Create a Company Database and
Write SQL retrieval queries with
example.
46-54
4. 4 | P a g e
Experiment:-1
Aim:-Design a ER diagram for the University
database
Fig :1
It describe different entities having relation with each other.
5. 5 | P a g e
Experiment:-2
Aim:-Design a clean and clear ER diagram for the NHL
Database.
Fig:-2
It describes National hockey league database with different
entities having set of attributes with relationship among them.
6. 6 | P a g e
Definitions:
1. Entity:- An entity can be any real world object that has an
independent existence.
E.g.:- person, place, object etc.
2. Attributes:- Attributes can be described as the properties of
entities.
Types of attributes:-
Simple:- Attributes which can’t be broken into
smaller subparts.
E.g.:- Student Id.
Composite:- Attributes which can be broken down
into smaller parts.
E.g.:- Student Name.
Single valued:-Attributes having only one value.
E.g.:- Student Age.
Multi-valued:- Attributes having more thanone value.
E.g.:-Student Mobile Number
Stored:-Attribute which is already present as an
attribute for an entity.
7. 7 | P a g e
E.g.;- Student college duration can be calculated using date of
joining. Here Date of joining is stored attribute.
Derived:- Attribute which is derived from stored attributes it
was not present as an attribute for an entity.
E.g.:- Student college duration is derived attribute.
Null:-Attributes having null values.
E.g.:- Student Mobile Number may or may not have
null value.
3. Specialization:- It is a process of creating subclasses out of
given entity types.
4. Generalization:- It is a process in which two or more entity
types are taken and grouped under a common subclass. It
is a reverse process of specialization.
5. Relationship:- This shows relations between different
entities and hold together various component of ER model.
6. Keys:- Keys are the attributes used to distinguish one entity
from another in entity set.
8. 8 | P a g e
TYPES OF KEYS:-
Super key:- It is a set of key having one or more
attribute that can uniquely identify entity in a entity
set.
Candidate Key:- Least combination of attributes that
can uniquely identify an entity set. It could be subset
of super key.
Primary Key:- It is the candidate key which is most
appropriate key for the table. It is decided by the
administrator.
Foreign Key:- It is generally a primary key that serve
as a field to another field in the same database.
Simple Key:- It is a key having single attribute.
Composite key:-It is a key which is not simple key but
having more than one attribute.
Compound Key:- It is key which is not composite key.
Alternate Key:-It is term used for candidate key
which is chosen after choosing a primary key by
database designer.
9. 9 | P a g e
Experiment 3
Aim: Introduction to PostGreSQL and its installation.
SQL is also called SE-QU-EL. It has got some historical
significance - the initial name of SQL
was Simple English Query Language.
You will be using PostgreSQL as the relational database
management system. PostgreSQL is very light-weight,
and it is free as well.
What is PostgreSQL?
PostgreSQL is a powerful, open source object-relational
database system that uses and extends the SQL language
combined with many features that safely store and scale
the most complicated data workloads.
PostgrSQL has earned a strong reputation for its proven
architecture, reliability, data integrity, robust feature set,
extensibility, and the dedication of the open source
community behind the software to consistently deliver
performing and innovative solutions.
10. 10 | P a g e
PostgreSQL runs on all major operating systems, has
been ACID-compliant since 2001, and has powerful add-
ons such as the popular PostGRES geospatial database
extender. It is no surprise that PostgreSQL has become
the open source relational database of choice for many
people and organizations .
Install PostgreSQL step by step
Start Installing PostgreSQL
Specify installation folder, choose your own or keep the
default folder suggested by PostgreSQL installer.
11. 11 | P a g e
Enterthe password for the database super user and service
account.
Enter the port for PostgreSQL. Make sure that no other
applications are using this port. Leave it as default if you
are unsure.
12. 12 | P a g e
Choose the default locale used by the database.
13. 13 | P a g e
You’ve completed providing information for the
PostgreSQL installer. Click the Next button to install
PostgreSQL
14. 14 | P a g e
The installation may take few minutes to complete.
15. 15 | P a g e
Click the Finish button to complete the PostgreSQL
installation.
Verify the Installation
There are several ways to verify the installation. You can
try to connect to the PostgreSQL database server from
any client application e.g., psql and pgAdmin.
The quick way to verify the installation is through
the pgAdmin application.
16. 16 | P a g e
First, click on pgAdmin III to launch it. The pgAdmin III
GUI will display.
Second, double-click PostgreSQL 9.5 on the object
browser. It will ask you for the admin password. Just
enter the password you’ve used in the installation step.
17. 17 | P a g e
Third, if everything is fine, the pgAdmin will display all
the objects that belong to the server.
Congratulation!you’ve successfully installed PostgreSQL
database server on your local system.
18. 18 | P a g e
Experiment:-4
Aim:-Implementation of Data Definition language
(DML), Commands with Examples
i. Create Database
ii. Select Database
iii. Delete Database
iv. Create Table
v. Delete Table
vi. Insertion Data into table, Etc.
DDL- Data Definition Language (DDL) statements are
used to define the database structure or schema.
DDL uses different statements :
CREATE - to create objects in the database
ALTER - alters the structure of the database
DROP - delete objects from the database
TRUNCATE - remove all records from a table, including
all spaces allocated for the records are removed
19. 19 | P a g e
COMMENT - add comments to the data dictionary
RENAME - rename an object
CREATE TABLE
Syntax: Create table tablename( fieldname1
datatype(),fieldname2 datatype()...);
ALTER TABLE
1. ADD
2.MODIFY
ADD
Syntax:alter table table name ADD (fieldname
datatype()...);
modify
syntax: Alter table table name modify (fieldname
datatype()...);
DESCRIBE TABLE
Syntax: DESCRIBE TABLE NAME;
DROP TABLE
Syntax: DROP Table name;
20. 20 | P a g e
COMMENT - add comments to the data dictionary
RENAME - rename a table
Synatax: rename table table name to new table name
Examples : In this example we creates a table and insert
the values.
21. 21 | P a g e
Example : In the following figure shows the alter a table .
For Example : In this figure shows the describe
command.
22. 22 | P a g e
DML- Data Manipulation Language (DML) statements
are used for managing data within schema objects DML
deals with data manipulation, and therefore includes most
common SQL statements such SELECT, INSERT, etc.
DML allows to add / modify / delete data itself.
DML is used to manipulate with the existing data in the
database objects (insert, select, update, delete).
DML Commands:
1.INSERT
2.SELECT
3.UPDATE
4.DELETE
*INSERT:
Syntax: INSERT INTO Table name values();
*SELECT:
Syntax: Select*from <table name>
*UPDATE:
Syntax: Update<table name> set to(calculation);
*DELETE:
Syntax: Delete form<table name>
23. 23 | P a g e
Example : In the below figure shows the update and
delete command on the given table.
24. 24 | P a g e
Experiment :-5
Aim:-Implement type of constraints with examples
(a) Primary key
(b) Foreign key
(c) Check
(d) Unique
(e) Null
(f) Not null
(g) Default
Primary Keys:
Primary key uniquely identifies each record in a table. It
must have unique values and cannot contain nulls. In the
below example the ROLL_NO field is marked as primary
key, that means the ROLL_NO field cannot have
duplicate and null values.
25. 25 | P a g e
CREATE TABLE STUDENT(
ROLL_NO INT NOT NULL,
STU_NAME VARCHAR (35) NOT NULL UNIQUE,
STU_AGE INT NOT NULL,
STU_ADDRESS VARCHAR (35) UNIQUE,
PRIMARY KEY (ROLL_NO)
);
Foreign keys: are the columns of a tablethat points to the
primary key of another table. They act as a cross-
reference between tables.
This constraint is used for specifying range of values for a
particular column of a table. When this constraint is being
set on a column, it ensures that the specified column must
have the value falling in the specified range.
CREATE TABLE STUDENT(
ROLL_NO INT NOT NULL CHECK(ROLL_NO
>1000) ,
STU_NAME VARCHAR (35) NOT NULL,
26. 26 | P a g e
STU_AGE INT NOT NULL,
EXAM_FEE INT DEFAULT 10000,
STU_ADDRESS VARCHAR (35) ,
PRIMARY KEY (ROLL_NO)
);
In the above example we have set the check constraint on
ROLL_NO column of STUDENT table. Now, the
ROLL_NO field must have the value greater than 1000.
UNIQUE Constraint:enforces a column or set of columns
to have unique values. If a column has a unique
constraint, it means that particular column cannot have
duplicate values in a table.
CREATE TABLE STUDENT(
ROLL_NO INT NOT NULL,
STU_NAME VARCHAR (35) NOT NULL UNIQUE,
STU_AGE INT NOT NULL,
STU_ADDRESS VARCHAR (35) UNIQUE,
PRIMARY KEY (ROLL_NO)
27. 27 | P a g e
);
NOT NULL: constraint makes sure that a column does
not hold NULL value. When we don’t provide value for a
particular column while inserting a record into a table, it
takes NULL value by default. By specifying NULL
constraint, we can be sure that a particular column(s)
cannot have NULL values.
Example:
CREATE TABLE STUDENT(
ROLL_NO INT NOT NULL,
STU_NAME VARCHAR (35) NOT NULL,
STU_AGE INT NOT NULL,
STU_ADDRESS VARCHAR (235),
PRIMARY KEY (ROLL_NO)
);
28. 28 | P a g e
The DEFAULT: constraint provides a default value to a
column when there is no value provided while inserting a
record into a table.
Example:-
CREATE TABLE STUDENT(
ROLL_NO INT NOT NULL,
STU_NAME VARCHAR (35) NOT NULL,
STU_AGE INT NOT NULL,
EXAM_FEE INT DEFAULT 10000,
STU_ADDRESS VARCHAR (35) ,
PRIMARY KEY (ROLL_NO)
);
29. 29 | P a g e
Experiment:-6.
Aim:-Explain Data ManipulationLanguage(DML)
with examples in DBMS.
Data manipulation language (DML) can be defined as a
set of syntax elements that are used to manage the data in
the database. The commands of DML are not auto
committed and modification made by them are not
permanent to the database. It is a computer programming
language that is used to perform select, insert delete and
updatedata in a database.Theuser requests are assisted by
data manipulation language. This language is responsible
for all forms of data modification in a database.
Types of Data Manipulation Languages.
1.Procedural programming
In this type the user will specify what data is required
and how to get it.
2 Declarative programming
Here, the user will only specify what data is required
30. 30 | P a g e
Commands
The DML section of SQL consists of following a set of
commands.
Select/From/Where
Insertinto/values
Update/set/where
Delete/from/where
The database programmers and users are allowed by this
basic to enter the data and information into the database
and then retrieve it by the use of several numbers of filter
option.
Select/from/where
Select
It is one of the basic query commands available in SQL
and works in the same way as the projection operation of
relational algebra. The attributes are selected by this
command on the basis of the condition defined by the
where clause.
From
A relation name is taken by this clause as an argument
from where attributed are to be projected or selected.
31. 31 | P a g e
Where
The predictions or conditions that should match for
qualifying the attributed to be projected are defined by
this clause.
For example
Select author_name
From book-set
Where age>40
The name of the authors will be yield by the command
from the relation book set whose age is greater than 40.
e.g.
SQL> select*from student
32. 32 | P a g e
OUTPUT:-
ROLL NO. NAME MARKS ADDR
101 ABC 75 LINK ROAD
102 XYZ 80 JM ROAD
103 PQR 87 N7
SQL>select *from student where marks=80
ROLL NO. NAME MARKS ADDR
102 XYZ 80 JM ROAD
33. 33 | P a g e
Experiment:7
Aim:- Implementationof Aggregate Functions
These functions operate on the multiset of values of a
column of a relation, and return a value
avg: average value
min: minimum value
max: maximum value
sum: sum of values
count: number of values
Q.1 Find the avg salary of employee from employee table
Ans:- Select avg(salary)
From employee
Q.2 Find the no. of employee who worksin dept-no.2
Ans:- Select count(*)
From employee
Where dept-no.2
34. 34 | P a g e
Q.3 Find the no. of cities where dept present
Ans:-Select count(distinct(city))
From department
Q.4 Give the age of oldest employee
Ans:-Select max(age)
From employee
Q.5 Find the mini. Age of employee whose salary is
greater than 50K
Ans:- Select min(age)
From employee
Where salary>50K
Q.6 Find the total salary of all employees
Ans:- Select sum(salary)
From employee
35. 35 | P a g e
Aggregate Functions –Group By
Find the average salary of instructors in each department
select dept_name, avg(salary) as avg_salary
from instructor
group by dept_name;
Attributes in select clause outside of aggregate functions
must appear in group bylist
/* erroneous query */
select dept_name, ID, avg(salary)
from instructor
group by dept_name;
Aggregate Functions –Having Clause
Find the names and average salaries of all departments
whose average salary is greater than 42000
36. 36 | P a g e
select dept_name, avg(salary)
from instructor
group by dept_name
having avg(salary) > 42000;
Note: predicates in the havingclause are applied after the
formation of groups whereas predicates in the where
clause are applied before forming groups
RENAME OPERATOR:-
Employee(employee_name,e_id,age,salary)
Q. Find the name of employee whose salary is greater
than 20K
Select employee_name as name
From employee
Where salary>20K
37. 37 | P a g e
Experiment:-8
Aim:-Implementation of Set operations on Data
manipulation language
Set Operations:-
Find courses that ran in Fall 2009 or in Spring 2010
(selectcourse_idfrom section where sem= ‘Fall’ and year
= 2009)
Union
(selectcourse_idfrom section where sem= ‘Spring’ and
year = 2010)
Find courses that ran in Fall 2009 but not in Spring 2010
(selectcourse_idfrom section where sem= ‘Fall’ and year
= 2009)
Intersect
(selectcourse_idfrom section where sem= ‘Spring’ and
year = 2010)
38. 38 | P a g e
Find courses that ran in Fall 2009 and in Spring 2010
(selectcourse_idfrom section where sem= ‘Fall’ and year
= 2009)
Except
(selectcourse_idfrom section where sem= ‘Spring’ and
year = 2010)
1.Find the salaries of all instructors that are less than the
largest salary
select distinct T.salary
from instructor as T, instructor as S
where T.salary< S.salary
2.Find all the salaries of all instructors
select distinct salary
from instructor
39. 39 | P a g e
3.Find the largest salary of all instructors
(select“second query” )
Except
(select“first query”)
Set operations union, intersect, and except
Each of the above operations automatically eliminates
duplicates
To retain all duplicates use the corresponding multiset
versions union all, intersect alland except all.
Suppose a tuple occurs mtimes in rand n times in s, then,
it occurs:
m + n times in r union all s
min(m,n)times in rintersect all s
max(0, m –n)times in rexcept all s
40. 40 | P a g e
EXPERIMENT-9
Aim:-IMPLEMENTATION OF NESTED QUERIES
In nested queries, a query is written inside a query. The
result of inner query is used in execution of outer query.
We will use STUDENT, COURSE,
STUDENT_COURSEtablesfor understandingnested
queries.
STUDENT
S_ID S_NAME S_ADDRESS S_PHONE S_AGE
S1 RAM DELHI 9455123451 18
S2 RAMESH GURGAON 9652431543 18
S3 SUJIT ROHTAK 9156253131 20
S4 SURESH DELHI 9156768971 18
41. 41 | P a g e
COURSE
C_ID C_NAME
C1 DSA
C2 Programming
C3 DBMS
STUDENT_COURSE
S_ID C_ID
S1 C1
S1 C3
S2 C1
S3 C2
S4 C2
S4 C3
42. 42 | P a g e
There are mainly two types of nested queries:
Independent Nested Queries: In independent nested
queries, query execution starts from innermost query
to outermost queries. The execution of inner query is
independent of outer query, but the result of inner
query is used in execution of outer query. Various
operators like IN, NOT IN, ANY, ALL etc are used in
writing independent nested queries.
IN: If we want to find out S_ID who are enrolled
in C_NAME ‘DSA’ or ‘DBMS’, we can write it with
the help of independent nested query and IN operator.
From COURSE table, we can find
out C_ID for C_NAME ‘DSA’ or DBMS’ and we can
use these C_IDs for finding S_IDs
from STUDENT_COURSE TABLE.
STEP1: Finding C_ID for C_NAME =’DSA’or
‘DBMS’
Select C_ID from COURSE where C_NAME = ‘DSA’
or C_NAME = ‘DBMS’
43. 43 | P a g e
STEP 2: Using C_ID of step 1 for finding S_ID
Select S_ID from STUDENT_COURSEwhere C_ID IN
(SELECT C_ID from COURSE where C_NAME =
‘DSA’ or C_NAME=’DBMS’);
STEP 3: Using C_ID of step 1 for finding S_ID
Select S_ID from STUDENT_COURSEwhere C_ID IN
(SELECT C_ID from COURSE where C_NAME =
‘DSA’ or C_NAME=’DBMS’);
The inner query will return a set with members C1 and C3
and outer query will return those S_IDs for
which C_ID is equal to any member of set (C1 and C3 in
this case). So, it will return S1, S2 and S4.
Note: If we want to find out names of STUDENTs
who have either enrolledin ‘DSA’ or ‘DBMS’, it can
be done as:
44. 44 | P a g e
Select S_NAME from STUDENT where S_ID IN
(Select S_ID from STUDENT_COURSE
where C_ID IN
(SELECT C_ID from COURSE where C_NAME=’DSA
’ or C_NAME=’DBMS’));
NOT IN: If we want to find out S_IDs
of STUDENTs who have neither enrolled in ‘DSA’
nor in ‘DBMS’, it can be done as:
Select S_ID from STUDENT where S_ID NOT IN
(Select S_ID from STUDENT_COURSE
where C_ID IN
(SELECT C_ID from COURSE where C_NAME=’
DSA’ or C_NAME=’DBMS’));
The innermost query will return a set with members C1
and C3. Second inner query will return those S_IDs for
which C_ID is equal to any member of set (C1 and C3 in
this case) which are S1, S2 and S4. The outermost query
will return those S_IDs where S_ID is not a member of
set (S1, S2 and S4). So it will return S3.
45. 45 | P a g e
Co-related Nested Queries: In co-related nested
queries, the output of inner query dependson the row
which is being currentlyexecuted in outer query. e.g.;
If we want to find out S_NAME of STUDENTswho
are enrolled in C_ID ‘C1’, it can be done with the
help of co-related nested query as:
Select S_NAME from STUDENT S where EXISTS
( select * from STUDENT_COURSE SC where
S.S_ID=SC.S_ID and SC.C_ID=’C1’).
For each row of STUDENT S, it will find the rows
from
STUDENT_COURSE
where S.S_ID = SC.S_ID and SC.C_ID=’C1’.
If for a S_ID from STUDENT S, atleast a row exists
in STUDENT_COURSE SC with C_ID=’C1’, then
inner query will return true and
corresponding S_ID will be returned as output.
46. 46 | P a g e
Experiment:-10
Aim:-Create a company database and Write SQL
Retrieval Queries with example
CREATE TABLE employee (
emp_idINT PRIMARY KEY,
first_nameVARCHAR(40),
last_nameVARCHAR(40),
birth_dayDATE,
sexVARCHAR(1),
salaryINT,
super_idINT,
branch_idINT
);
CREATE TABLE branch (
branch_idINT PRIMARY KEY,
branch_nameVARCHAR(40),
mgr_idINT,
mgr_start_dateDATE,
47. 47 | P a g e
FOREIGN KEY(mgr_id) REFERENCES
employee(emp_id) ONDELETESETNULL
);
ALTERTABLE employee
ADD FOREIGN KEY(branch_id)
REFERENCESbranch(branch_id)
ONDELETESETNULL;
ALTERTABLE employee
ADD FOREIGN KEY(super_id)
REFERENCESemployee(emp_id)
ONDELETESETNULL;
CREATETABLEclient (
client_idINT PRIMARY KEY,
client_nameVARCHAR(40),
branch_idINT,
48. 48 | P a g e
FOREIGN KEY(branch_id) REFERENCES
branch(branch_id) ONDELETESETNULL
);
CREATETABLEworks_with (
emp_idINT,
client_idINT,
total_salesINT,
PRIMARY KEY(emp_id, client_id),
FOREIGN KEY(emp_id) REFERENCES
employee(emp_id) ONDELETECASCADE,
FOREIGN KEY(client_id)
REFERENCESclient(client_id) ONDELETECASCADE
);
CREATETABLEbranch_supplier(
branch_idINT,
supplier_nameVARCHAR(40),
supply_typeVARCHAR(40),