BIM 6 Flashcards
What is data?
Data is raw facts, figures with no meaning
what is information?
information is a collection of data organized to have meaning
What is database technology?
a collection of related data organized to make it valuable and useful.
what is the relational database model?
a collection of tables to represent data and relationships of data.
What are columns/attributes/fields?
these are the columns of the table. they represent the different data categories
what are records/entity/instances/items?
these are rows of the table and the data.
what is a primary key?
to keep each row unique, we use a primary key to identify the different rows
what is a file?
these are the tables in the databases. the actual things data is in
What is a database?
the database includes the collection of files/tables containing information.
What is a data entity?
the things we store information about, this may be the people, places, objects. Basically a record/row of a table
What does SQl stand for?
sql stands for structured query language?
what does query mean?
query means a request for data/information from the database
What are the 3 languages/categories of SQL commands?
- Data Definition Language (DDL) - all about the structure of the table/file. It creates, deletes, and alters tables.
- Data Manipulation Language - DML is all about the content. It allows for editing, updating, inserting, etc
- Data Control Language - DCL is about access to the database
What are the DDL - creating tables commands?
CREATE TABLE tablename (columnname1 TEXT, column2, INTEGER)
What are the DDL data types?
- integer - whole numbers
- TEXT - text
- real - allows decimals
- blob - binary-large objects
renaming columnes
ALTER TABLE tablename RENAME COLUMN columnname TO newcolumnname
add columns
ALTER TABLE tablenname ADD columnname
using DML to manipulate table rows - add values into rows
INSERT INTO tablename VALUES (C1R1, …), (C1, R2)
INSERT INTO tablename (column1, column 2) VALUES (valueC1, …)
INSERT INTO [Phones] (PersonID, [Phone Number]) SELECT PersonID, Phone
From Person;
INSERT INTO table2
SELECT * FROM table1
WHERE condition;
Update values of rows
UPDATE tablename SET columnnameX=newvalue WHERE columnnameY=condition value