01 - Databases, Relation Models, ER Diagrams and Tables in MySQL

01 - Databases, Relation Models, ER Diagrams and Tables in MySQL

memorize.aimemorize.ai (lvl 286)
Section 1

Preview this deck

data model components

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

1

All-time users

1

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (27)

Section 1

(27 cards)

data model components

Front

structure operations constraints

Back

update the information in a table

Front

UPDATE Hardcovers SET cost = 18.50 WHERE isbn = 7894651;

Back

what is the difference between char and varchar data types

Front

char has a fixed string length, whereas varchar has variable string length up to a maximum value

Back

what is an entity

Front

a collection of things

Back

what is a database

Front

collection of relations

Back

what is a database schema

Front

set of all relation schemas in a database

Back

what is the command to retrieve information from a relation

Front

SELECT

Back

what is the command needed to create a relation

Front

create table

Back

what are the relations in a table

Front

the table name

Back

create a relation

Front

CREATE TABLE Purchases( name varchar(20), book decimal(9) );

Back

when would you use double quotes in a string

Front

when there is an actual apostrophe in the string

Back

insert a row into a relation (when in column order)

Front

INSERT INTO Books VALUES ('John', 'Smith', 40);

Back

select all the information from a relation

Front

SELECT * FROM PURCHASES;

Back

what is important to remember when working with string in SQL

Front

you must use single quotes

Back

what is a relation schema

Front

the relation name and attribute list

Back

what is a relation

Front

a connection between two or more entities

Back

what are the attributes in a table

Front

column headers

Back

insert a row into a relation (when NOT in column order)

Front

INSERT INTO Books(name, lastname, cost) VALUES ('John', 'Smith', 40);

Back

what is an ER diagram

Front

an entity-relation diagram, allows differentiation between entities and the relations between them

Back

what is the command to modify information in a relation

Front

UPDATE

Back

what is the command to insert a row into a relation

Front

INSERT INTO

Back

show an example of a schema (both methods)

Front

Books(title, author) Books(title:varchar(30), author:varchar(60))

Back

what are the tuples in a table

Front

the rows

Back

select information conditionally from a relation

Front

SELECT name, book FROM Purchases WHERE cost > 25;

Back

what are 6 data types

Front

integer/int real/float decimal (n,m) - n digits, m to right of decimal point char(n) varchar(n) date, time and datetime

Back

what is the command to remove a relation

Front

DROP TABLE

Back

what does a table represent

Front

a relation

Back