Passageiro Piloto Voo Empregado Aeronave Técnico Tipo-Avião Peça ISA cic N End Sal DN B HV Es cic N End Tel hp hc orig Des Nv Ns Hv DF M Fb NL C Cd Np.

Slides:



Advertisements
Similar presentations
Finding a Common Denominator
Advertisements

Relational data objects 1 Lecture 6. Relational data objects 2 Answer to last lectures activity.
ADDING & SUBTRACTING INTEGERS by Angela Gallacher NS 1.2 and AF 1.3
SQL. More than 100 DBMS support SQL –Used by DBAs and application programmers –Structured Query Language or SEQUEL –ORACLE-> relation database based on.
ER to Relational Mapping. Logical DB Design: ER to Relational Entity sets to tables. CREATE TABLE Employees (ssn CHAR (11), name CHAR (20), lot INTEGER,
R ELATIONAL M ODEL TO SQL Data Model. 22 C ONCEPTUAL D ESIGN : ER TO R ELATIONAL TO SQL How to represent Entity sets, Relationship sets, Attributes, Key.
Copyright © 2008 Pearson Prentice Hall. All rights reserved.1 1 Committed to Shaping the Next Generation of IT Experts. Chapter 2.1: Relational Databases.
Logical DB Design: ER to Relational Entity sets to tables. Employees ssn name lot CREATE TABLE Employees (ssn CHAR (11), name CHAR (20), lot INTEGER, PRIMARY.
Multiplication Tables Test 3 and 5 Times Tables 3 and 5 times tables There are 10 questions. Each one will stay on the screen for 15 seconds. Write down.
Complex Integrity Constraints in SQL. Constraints over a Single Table Table Constraint: Create TABLE Sailors (sid INTEGER, sname CHAR(10), rating INTEGER,
CSC343: Intro. to Databases1 Tutorial for CSC343 Introduction to Databases Fall 2006 Week 2.
Database Chapters.
1 I Esempio di constraints. 2 DROP TABLE regions; CREATE TABLE regions ( region_id NUMBER CONSTRAINT region_id_nn NOT NULL, region_name VARCHAR2(25) );
Database Theory Each Table in a Database needs a Primary Key Data TypesDescriptionExample TextCharacters (Letters, numbers and symbols) ABC 123 NumberNumerical.
Book Chapter 3 (part 2 ) From ER to Relational Model.
SQL Lecture 10 Inst: Haya Sammaneh. Example Instance of Students Relation  Cardinality = 3, degree = 5, all rows distinct.
Data Design The futureERD - CardinalityCODINGRelationshipsDefinition.
SQL’s Data Definition Language (DDL) n DDL statements define, modify and remove objects from data dictionary tables maintained by the DBMS n Whenever you.
Access A Relational Database Management System. Prof. Leighton2 Database ► A database is a collection of data that’s related to a particular topic ► A.
CSE 190: Internet E-Commerce Lecture 10: Data Tier.
My CD Database THE BEST Shoemaker, Ray, Gleisberg.
Murali Mani SQL DDL and Oracle utilities. Murali Mani Datatypes in SQL INT (or) INTEGER FLOAT (or) REAL DECIMAL (n, m) CHAR (n) VARCHAR (n) DATE, TIME.
MIS 451 Building Business Intelligence Systems Logical Design (3) – Design Multiple-fact Dimensional Model.
1 times table 2 times table 3 times table 4 times table 5 times table
Databases. Objectives Define what a database is. Understand the difference between a flat and relational database Design and create a relational database.
Computer Science & Engineering 2111 CSE 2111 Lecture Basic Criteria in Queries 1CSE 2111 Lecture-Basic Criteria in Queries.
Batak Programming Language
ER to Relational Mapping. Logical DB Design: ER to Relational Entity sets to tables. CREATE TABLE Employees (ssn CHAR (11), name CHAR (20), lot INTEGER,
For Project 1, Deliverable 4, you will add referential integrity (FOREIGN KEY) constraints to existing tables, as well as composing general assertions.
-- Introduction to database principles Maoying Wu March 25, 2013 Chapter 4: Advanced SQL (1)
RELATIONSHIPS Generally there are two main database types: flat-file and relational.
Biostatistics Case Studies 2008 Peter D. Christenson Biostatistician Session 3: Replicates.
Chapter 4 Introduction to MySQL. MySQL “the world’s most popular open-source database application” “commonly used with PHP”
For Project 1, Deliverable 4, you will add referential integrity (FOREIGN KEY) constraints to existing tables, as well as composing general assertions.
Customer Order Order Number Date Cust ID Last Name First Name State Amount Tax Rate Product 1 ID Product 1 Description Product 1 Quantity Product 2 ID.
SQL Basics. 5/27/2016Chapter 32 of 19 Naming SQL commands are NOT case sensitive SQL commands are NOT case sensitive But user identifier names ARE case.
Databases MIS 21. Some database terminology  Database: integrated collection of data  Database Management System (DBMS): environment that provides mechanisms.
Database Management System Quiz 1. A company needs to store information about: the employees identified by EmpNo, Name, Salary and Phone; departments.
Constraints - primary and foreign keys in Oracle Please use speaker notes for additional information!
MySQL and JDBC Tutorial ECT 7130 Hong Cheng. Supplement on MySQL ement/Supplement4bMySQL.pdf.
CREATE TABLE CREATE TABLE statement is used for creating relations Each column is described with three parts: column name, data type, and optional constraints.
Relational Databases. Relational database  data stored in tables  must put data into the correct tables  define relationship between tables  primary.
Quiz questions. 1 A data structure that is made up of fields and records? Table.
Different key fields for different cases More to Learn A key field is a field that can be used to uniquely identify one specific record from other records.
* Database is a group of related objects * Objects can be Tables, Forms, Queries or Reports * All data reside in Tables * A Row in a Table is a record.
$100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300.
CREATE TABLE ARTIST ( ArtistID int NOT NULL IDENTITY (1,1), Namechar(25) NOT NULL, TEXT ERROR Nationality char (30) NULL, Birthdate numeric (4,0) NULL,
Tables Learning Support
Howard Paul. Sequential Access Index Files and Data File Random Access.
Mapping E/R to RM, R. Ramakrishnan and J. Gehrke with Dr. Eick’s additions 1 Mapping E/R Diagrams to Relational Database Schemas Second Half of Chapter.
SQL constrains and keys. SORTED RESULTS Sort the results by a specified criterion SELECT columns FROM tables WHERE predicates ORDER BY column ASC/DESC;
Dorm Name PK Occupancy Dorm Name PK Occupancy HighResDorm StartDate HighResDorm StartDate LowResDorm StartDate WaterSensorID WaterOnLineDate ElecSensorID.
Year 12 > 13 Applied GCE ICT Unit 7 Using Database Software.
MS SQL Create Table Cust USE jxc00 GO CREATE TABLE cust ( cust_id smallint IDENTITY(1,1) NOT NULL, cust_name char(10)
DAY # 11 Haifa Abulaiha February 29,
Basic Criteria in Queries
MySQL Explain examples
Times Tables.
DATABASE SQL= Structure Query Language مبادئ قواعد بيانات
Hp Printer Phone Number USA Call Now Usa 1*866*535*9089
אילוצי שלמות אילוצי תחום מפתחות ומפתחות זרים טריגרים triggers
البرمجة بلغة فيجول بيسك ستوديو
Data type for fields in Access
DATABASE SQL= Structure Query Language مبادئ قواعد بيانات
HP Printer
Instructor: Samia arshad
3 times tables.
6 times tables.
Thing / Person:____________________ Dates:_________________
SQL (Structured Query Language)
Presentation transcript:

Passageiro Piloto Voo Empregado Aeronave Técnico Tipo-Avião Peça ISA cic N End Sal DN B HV Es cic N End Tel hp hc orig Des Nv Ns Hv DF M Fb NL C Cd Np Pr usa Qt está- habilitado hab DVoo Res Id Data Classe Preço Escalado é-pilotado- por utiliza pertence está associado a

CREATE TABLE PASSAGEIRO (CIC INTEGER, NOME CHAR(20), ENDE CHAR(40), TEL INTEGER, PRIMARY KEY (CIC)) CREATE TABLE EMPREGADO (CIC INTEGER, NOME CHAR(20), ENDE CHAR(40), SAL NUMERIC, DN DATE, PRIMARY KEY (CIC)) CREATE TABLE VOO (NV CHAR(6), HP TIME, HC TIME, ORIG CHAR(20), DEST CHAR(20), PRIMARY KEY (NV)) CREATE TABLE PILOTO (CIC INTEGER, B CHAR(5), HV INTEGER, PRIMARY KEY (CIC), UNIQUE (B), FOREIGN KEY (CIC) REFERENCES EMPREGADO) CREATE TABLE TECNICO (CIC INTEGER, ES CHAR(15), PRIMARY KEY (CIC), FOREIGN KEY (CIC) REFERENCES EMPREGADO) CREATE TABLE PECA (NP INTEGER, Pr NUMERIC, PRIMARY KEY (NP)) CREATE TABLE DVOO (ID INTEGER, Data DATE, NV CHAR(6), CIC INTEGER, NS INTEGER, PRIMARY KEY (NP), FOREIGN KEY (NV) REFERENCES VOO, FOREIGN KEY (CIC) REFERENCES PILOTO, FOREIGN KEY (NS) REFERENCES AERONAVE)

CREATE TABLE AERONAVE (NS INTEGER, HV INTEGER, DF DATE, Cd CHAR(4), PRIMARY KEY (NS), FOREIGN KEY (Cd) REFERENCES Tipo-AVIAO) CREATE TABLE TIPO-AVIAO (Cd CHAR(4), MODELO CHAR(20), FABR CHAR(20), NLUGARES INTEGER, COMPR INTEGER, PRIMARY KEY (Cd)) CREATE TABLE RES (CIC INTEGER, ID INTEGER, CLASSE CHAR(15), PRECO NUMERIC, PRIMARY KEY (CIC,ID), FOREIGN KEY (CIC) REFERENCES PASSAGEIRO, FOREIGN KEY (ID) REFERENCES DVOO) CREATE TABLE ESCALADO (ID INTEGER, CIC INTEGER, PRIMARY KEY (ID,CIC), FOREIGN KEY (CIC) REFERENCES EMPREGADO, FOREIGN KEY (ID) REFERENCES DVOO) CREATE TABLE USA (Cd CHAR(4), NP INTEGER, Qt INTEGER, PRIMARY KEY (Cd,NP), FOREIGN KEY (Cd) REFERENCES Tipo-AVIAO, FOREIGN KEY (NP) REFERENCES PECA) CREATE TABLE HABILITADO (Cd CHAR(4), CIC INTEGER, PRIMARY KEY (ID,CIC), FOREIGN KEY (CIC) REFERENCES EMPREGADO, FOREIGN KEY (Cd) REFERENCES Tipo-AVIAO)