Databases - Nick

studied byStudied by 0 people
5.0(1)
learn
LearnA personalized and smart learning plan
exam
Practice TestTake a test on your terms and definitions
spaced repetition
Spaced RepetitionScientifically backed study method
heart puzzle
Matching GameHow quick can you match all your cards?
flashcards
FlashcardsStudy terms and definitions

1 / 26

encourage image

There's no tags or description

Looks like no one added any tags here yet for you.

27 Terms

1

Database

An organized collection of information or data that allows for flexibility in organization, displaying, and printing of information.

New cards
2

Purpose of Databases

They take up little room, can be easily edited, and facilitate easier searching and sorting.

New cards
3

Entity

A person, place, thing, or concept about which data can be collected.

Some examples of database tables might be:

  • a customer table

  • an employee

  • a movies table

  • a smartphone table

  • a car table

New cards
4

Attribute

Describes the facts, details, or characteristics of an entity.

New cards
5

Attribute Types

Different categories of data such as Text, Number, Date, Time, and Boolean.

New cards
6

Text Attribute

Stores characters or words, including combinations of text and numbers.

New cards
7

Number Attribute

Can store whole numbers (integers) or numbers with decimal places.

New cards
8

Date Attribute

Stores dates in various formats.

New cards
9

Time Attribute

Stores time of day, typically in 24-hour format.

New cards
10

Boolean Attribute

Stores true/false or yes/no answers.

New cards
11

Attribute Size

Limits applied to restrict the amount of storage space for data entries.

New cards
12

Entity Relationship Diagrams

Visual representations of entities (green), attributes (orange), and relationships (yellow).

entityName.attributeName and criteria = “searchCriteria”.

Example: Dog.dog name and criteria = “Olly”

New cards
13
<p>What is the query for the cost of the walk?</p>

What is the query for the cost of the walk?

walk.cost

New cards
14
<p>What is the query for dog’s gender if his name is Bruno?</p>

What is the query for dog’s gender if his name is Bruno?

Dog.gender and criteria = “Bruno”

New cards
15

One to Many Relationship

A relationship where a row in table A can have many matching rows in table B, but not vice versa.

New cards
16

Flat File Databases

Useful for small amounts of records but prone to data duplication and human error.

New cards
17

Relational Databases

Tables are linked to prevent data duplication, allowing for complex queries and easier data management.

New cards
18

Validation

Ensures data entered is allowable and sensible through various checks (range, restricted choice, length, presence).

New cards
19

Primary Key

A unique identifier for a single record in a database.

New cards
20

Foreign Key

A field in one table that links to the primary key in another table, creating a relationship.

New cards
21
<p>Identify the primary and foreign key</p>

Identify the primary and foreign key

Product No.

New cards
22

Database Query

A request for information from a database, often performed using SQL.

New cards
23

SQL Code

Structured Query Language used to interact with databases, always ending with a semicolon.

New cards
24

SELECT Operation

Queries and retrieves data from one or more tables in a database.

Code Layout:

SELECT attributes (* means all)

FROM table_name

WHERE attribute = criteria

ORDER BY attribute ASC/DESC

Example:

SELECT name, age, house

FROM Pupils

WHERE age < 15

ORDER BY age DESC, house ASC;

This will print out the attributes name, age and house from the pupils table that are less than 15 years old. Results are sorted by the age attribute in descending order and house in ascending order.

New cards
25

INSERT INTO SQL

Command used to insert a new record into a database.

Code Layout:

INSERT INTO table_name

Values (value1, value2, value3, …); [IN ORDER OF ATTRIBUTE]

Example:

INSERT INTO Pupils

VALUES (6, "Jack Lawrie", 18, "Shiel");

New cards
26

UPDATE RECORD

Command used to update existing records in a database.

Code Layout:

UPDATE table_name

SET attribute1 = value1 etc.

WHERE attribute = criteria

Example:

UPDATE Pupils

SET house = “Ben Nevis”

WHERE house = “Nevis”;

New cards
27

DELETE RECORD

Command used to delete a record from a database.

Code Layout:

DELETE_FROM table_name

WHERE attribute = criteria

Example:

DELETE_FROM Pupils

WHERE name = “Bob Jordan”;

New cards

Explore top notes

note Note
studied byStudied by 344 people
752 days ago
5.0(2)
note Note
studied byStudied by 5 people
815 days ago
5.0(1)
note Note
studied byStudied by 138 people
970 days ago
5.0(1)
note Note
studied byStudied by 16 people
691 days ago
5.0(2)
note Note
studied byStudied by 35 people
861 days ago
5.0(1)
note Note
studied byStudied by 16 people
719 days ago
5.0(1)
note Note
studied byStudied by 31 people
521 days ago
5.0(1)
note Note
studied byStudied by 15 people
741 days ago
5.0(2)

Explore top flashcards

flashcards Flashcard (33)
studied byStudied by 9 people
757 days ago
5.0(1)
flashcards Flashcard (20)
studied byStudied by 4 people
543 days ago
5.0(3)
flashcards Flashcard (22)
studied byStudied by 57 people
708 days ago
4.5(2)
flashcards Flashcard (50)
studied byStudied by 5 people
554 days ago
5.0(1)
flashcards Flashcard (42)
studied byStudied by 12 people
485 days ago
5.0(1)
flashcards Flashcard (33)
studied byStudied by 1 person
694 days ago
5.0(1)
flashcards Flashcard (31)
studied byStudied by 23 people
780 days ago
5.0(1)
flashcards Flashcard (54)
studied byStudied by 18568 people
709 days ago
4.5(362)
robot