SYS 2202 Lecture Notes - Lecture 5: Database, Foreign Key, Mysql

33 views1 pages

Document Summary

Client-server architecture: client processes manipulate database by interacting with server: mysql stores and manages databases, develop php applications with php for server interaction b. Interact with server using the client application called the mysql command line interface (cli) i. >mysql u user p: launch the cli and enter username and password returning mysql> for sql statements: mysql>use rlc9s: select a database with use d. To create a table: create table (list of attributes/data types): delete: drop table create table department ( ->dname varchar(50) primary key . e. f. g. h. i. Date: type in sql in form date yyyy-mm-dd. Cname char(20) primary key for declaring a primary key or primary key (cnum, sectnum) for multi- Foreign key: value appearing in one relation is a primary key of another relation. i. Two schemas: department(dname, chair) and course(cnum, dname, name subj) Dname of course is a foreign key and for any tuple in course consider vale of dname component.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents