SQL_RelationalAlg Flashcards
(181 cards)
Is SQL case sensitive?
Case convention
• SQL is completely case insensitive.
Upper-case or Lower-case makes no
difference. We will use case in the
following way:
– UPPERCASE marks keywords of the SQL
language.
– lowercase marks the name of an attribute.
– Capitalized marks the name of a table.
How to Create and Drop Tables?
What are Table declaration elements?
Why add NOT NULL when creating tables?
How to declare keys?
How to add Primary Key SQL?
How to code foreign keys?
Rules concerning Foregin Keys.
Code in SQL.
Another Example
How to use value constraints?
Add value constraint that the period is an INT for period 1:4.
Another Check Constraint for the Period being an INT of values 1-4.
How to insert data to this table?
Why is one of those illegal?
CREATE TABLE GivenCourses (
course CHAR(6) REFERENCES Courses,
period INT CHECK (period IN (1,2,3,4)),
numStudents INT,
teacher INT REFERENCES People(ssn) NOT
NULL,
PRIMARY KEY (course, period)
);
How to Delete rows from Table.
How to update tables.
What is a Query? What is the difference between query and modifications?
What does SQL means?
How is Algebra defined in this context?
What is relational algebra?
Explain Selection (Relational Algebra).
Which operations is denoted with a sigma?


