Académique Documents
Professionnel Documents
Culture Documents
char(n). Fixed length character string, with user-specified length n. maximum character is 2000
varchar(n). Variable length character strings, with user-specified maximum length n. max character is
4000
int. Integer (a finite subset of the integers that is machine-dependent).
float(n). Floating point number, with user-specified precision of at least n digits.
CODING
SELECT * FROM publishers
SELECT *
from publishers
where state = CA
INSERT INTO publishers
VALUES (0010, pragmatics, 4 4th Ln, chicago, il)
CREATE DATABASE database_name
USE database_name
CREATE TABLE authors
(auth_id int(9) not null,
auth_name char(40) not null)
SELECT auth_name, auth_city
FROM publishers
DELETE from authors
WHERE auth_name=John Smith
UPDATE authors
SET auth_name=hello
ALTER TABLE Tname
ADD birth_date datetime null
ALTER TABLE authors
DROP birth_date
DROP DATABASE authors
SELECT AVG(apple) AS new // MIN MAX
FROM table
WHERE apple = a
OR apple = b
Relational Algebra
selection
Intersection
Difference
Normalization
Database normalization is the process of removing redundant data from your tables in to improve
storage efficiency, data integrity, and scalability.
We have seen how Database Normalization can decrease redundancy(), increase efficiency and
reduce anomalies
ER Entity Relationship Diagram
SQL
FoxPro
Relational Data Structure