{ "@context": "https://schema.org", "@type": "Organization", "name": "Brainscape", "url": "https://www.brainscape.com/", "logo": "https://www.brainscape.com/pks/images/cms/public-views/shared/Brainscape-logo-c4e172b280b4616f7fda.svg", "sameAs": [ "https://www.facebook.com/Brainscape", "https://x.com/brainscape", "https://www.linkedin.com/company/brainscape", "https://www.instagram.com/brainscape/", "https://www.tiktok.com/@brainscapeu", "https://www.pinterest.com/brainscape/", "https://www.youtube.com/@BrainscapeNY" ], "contactPoint": { "@type": "ContactPoint", "telephone": "(929) 334-4005", "contactType": "customer service", "availableLanguage": ["English"] }, "founder": { "@type": "Person", "name": "Andrew Cohen" }, "description": "Brainscape’s spaced repetition system is proven to DOUBLE learning results! Find, make, and study flashcards online or in our mobile app. Serious learners only.", "address": { "@type": "PostalAddress", "streetAddress": "159 W 25th St, Ste 517", "addressLocality": "New York", "addressRegion": "NY", "postalCode": "10001", "addressCountry": "USA" } }

SQL Flashcards

(7 cards)

1
Q

What is SQL?

A

Structured Query Language, used to communicate with the Database

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How is data organised in a relational database?

A

In tables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a primary key?

A

It is a single field or combination of fields that defines the uniqueness of a row. A primary key cannot be null.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a foreign key?

A

field which can uniquely identify each row in another table.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a join?

A

A join defines the relationship betweem two tables. It links fields from each table that contain matching data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Image I had a table called table and I wanted to select all the data from it, what would the command be?

A

select * from table;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Can you explain what a self join is and give an example?

A

A self join is a join which allows the table to join to itself. An example could be an employee table with managers. A manager is also an employee and you would therefore have to join to itself to get a relationship with an employee and manager.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly