Database Design Flashcards
Define and explain ‘ERD’
Entity relationship diagram - simple visual description of a database
State the four components of ERDs
1) Entities
2) Relationships
3) Cardinality
4) Attributes
Describe ‘Entities’ in relation to ERDs
The objects that will be linked i.e table or spreadsheet
Describe ‘Relationships’ in relation to ERDs
Shows which entities are linked together i.e relationships in Pbi
Describe ‘Cardinality’ in relation to ERDs
How many distinct values are within a column. Examples of cardinality are one-to-one, many-to-many, one-to-many etc
Describe ‘Attributes’ in relation to ERDs
A single non-zero value within a database (such as a single cell in Excel)
Describe a ‘Logical’ data model
A model that maps out maps out what the tables are called and which table is linked to each other.
Describe a ‘Physical’ data model
Includes more detail than a logical data model, such as data types, database triggers, storage procedures, access constraints/permissions
What does ‘INT’ refer to within database managament
Integer. For no decimal place whole numbers
What does ‘VARCHAR’ refer to within database management, and what does it mean.
Variable character. Defines the number of characters the database will accept up to. I.e VARCHAR(6) means that it will only accept entries up to 6 characters
What does ‘CHAR’ refer to within database management, and what does it mean.
Character. Defines the number of characters the database will accept ONLY. i.e CHAR (6) means that it will only accept entries of 6 characters
What does ‘NVARCHAR’ refer to within database management, and what does it mean.
Unicode variable character. Accepts characters with accents, hebru, arabic characters
What does ‘TINYINT’ refer to within database management, and what does it mean.
Tiny integer. Similar to integer, but only stores a low range of numbers, up to 255. If the range is exceeded, it revers to the other side of the range. i.e if you enter 256, it will class it as 0.
Describe a ‘relational’ database, and when you would use it.
Organises tables which can be linked/related based on data common to each
Use for small/medium amounts of data in simple formats
State the positives (3) and negatives (2) of using a relational database
Pros;
Easy to scale
Support available
Easy to understand structure
Cons;
Can’t use complex data formats such as videos and images
Complex relational databases can become confusing