SER 322 PRACTICE TEST
Terminology for SQL - ANSWER Table, Row, Column
Main SQL Command for Data Definition - ANSWER CREATE
Create a schema statement called company with an authorized user
Jsmith - ANSWER CREATE SCHEME COMPANY AUTHORIZATION
'Jsmith';
Create a table called Employee from the company schema - ANSWER
CREATE TABLE COMPANY.EMPLOYEE or CREATE TABLE
EMPLOYEE
Base tables (base relations) - ANSWER Relation and its tuples are
actually created and stored as a file by the DBMS
Virtual relations (views) - ANSWER Created through the CREATE
VIEW statement. Do not correspond to any physical file.
In Table schema all primary keys have to be NOT NULL - ANSWER
TRUE
UNQUE (attribute) is used for - ANSWER Candidate Keys
Create a foreign key for Mgr_Ssn that useds Ssn from another table
called EMPLOYER - ANSWER PRIMARY KEY (Mgr_Ssn)
REFERENCES EMPLOYEE(Ssn));
SQL datatypes: Integer numbers: - ANSWER INTEGER, INT &
SMALLINT
FLOATING_POINT real numbers: - ANSWER FLOAT, REAL and
DOUBLE PRECISION
Character & string: - ANSWER CHAR(n), CHARACTER(n),
VARCHAR(n), CHAR VARYING, CHARACTER VARYING(N)
Terminology for SQL - ANSWER Table, Row, Column
Main SQL Command for Data Definition - ANSWER CREATE
Create a schema statement called company with an authorized user
Jsmith - ANSWER CREATE SCHEME COMPANY AUTHORIZATION
'Jsmith';
Create a table called Employee from the company schema - ANSWER
CREATE TABLE COMPANY.EMPLOYEE or CREATE TABLE
EMPLOYEE
Base tables (base relations) - ANSWER Relation and its tuples are
actually created and stored as a file by the DBMS
Virtual relations (views) - ANSWER Created through the CREATE
VIEW statement. Do not correspond to any physical file.
In Table schema all primary keys have to be NOT NULL - ANSWER
TRUE
UNQUE (attribute) is used for - ANSWER Candidate Keys
Create a foreign key for Mgr_Ssn that useds Ssn from another table
called EMPLOYER - ANSWER PRIMARY KEY (Mgr_Ssn)
REFERENCES EMPLOYEE(Ssn));
SQL datatypes: Integer numbers: - ANSWER INTEGER, INT &
SMALLINT
FLOATING_POINT real numbers: - ANSWER FLOAT, REAL and
DOUBLE PRECISION
Character & string: - ANSWER CHAR(n), CHARACTER(n),
VARCHAR(n), CHAR VARYING, CHARACTER VARYING(N)