Features of a relational database
I will be explaining all the features of a relational database such as entities, attributes, relationships and benefits and will be giving examples on each of these to show how they affect the database.
Primary keys:
The main feature of a relation database would be the primary key. It is a unique identifier set to each and every record which moves across different tables in relationships. A good example of a primary key is a Social Security number. The primary keys job is to make each record unique and lets data to be kept in more than one table. Each table within a relational database will have to have a field for the primary key. Foreign keys:
A
…show more content…
Also seeing it from a SQL Server point of view having an identity field as the primary key is good because primary keys are clustered indexes. If that key automatically increments you don 't have to worry about braking primary key rules and other different problems when putting in values. Data types
Data type Example
Text- allows you to type text within the field First name: Andrew
Surname: Smith
Address: 12, High street
Number- Allows whole numbers and decimals but no text with a field 10 or 15.5(decimal)
Currency- This automatically changes to data to have a £ sign in front of it and also have 2 decimal places £12,000
Date/time- This restricts the data to only be 1-31 for day and 1-12 for month and also checks to see if the date is valid. It can also be broken down into short, medium and long date/time. Date: 31/01/14, 31-Jan-14, 31 January 2014
Time: 19:24, 7:24 PM, 19:24:30
Autonumber- This will increase by 1 each time a new record is added to the database Record 1 : 1
Record 2 : 2
Record 3 : 3
Boolean (yes/no)- This is a data type that restricts the record to only two choices, either yes or no. Yes : No
On : Off
Validation rules
Validation within a database is used to make sure the data entered into the database is sensible and makes sense, also to avoid any typing errors. You make a rule which only allows certain things to be typed into the
Identify bits of information which is used for compiling date, once data is interpreted and organized it can be presented as information.
Employee data (names and phone numbers), project data (project name), and job data (charge per hour and project hours).
* Write clearly and concisely about relational database management systems using proper writing mechanics and technical style conventions.
A relational database is a database that consists of a collection of tables with columns showing entities, and rows showing data. This type of database uses a primary key and foreign key. The foreign key in another table will point to the primary key of a table, and this is how tables can relate to each other. This permits for one-to-one, one-to-many, and many-to-many relationship between the data. An advantage of relational databases includes the ease of adding or modifying new tables and entities without needing to change the structure of the database already in place. Relational database have many features, including indexing, setting data type, and setting validation tests, all these help to ensure data integrity.
Database model defines the logical structure of the database by determining manner in which the data will be stored. Relational model is one of the most popular database models, which defines tables and relationships between the tables.
Why are databases important to business? How do databases generate sales and-or profits? What databases do you interact with, and how do they benefit you?
An AutoNumber field or auto incremented key in a table are used to give unique values which make each record unique.
In representing a 1:N relationship in a relational database design, the key of the table representing the entity on the "many" side is placed as a foreign key in the table representing the entity on the "one" side of the relationship.
If the field size is ‘70’, that means the user can input up to 70 letters, numbers or symbols. It’s important that you change it field size if it’s the automatically the appropriate size. This is because if you have a field size of 70, that’ll take up 70 bytes of storage, which by itself isn’t a lot, but over a massive database that’ll take up a lot of room. So for a First Name for example, instead of leaving it as 70, it should be changed to around 10-15.
1. List at least four advantages of indexing. Mention some indexing tips that would be of particular help to a database designer. Also, discuss indexing practices that can adversely affect the performance of a database. In your discussion, include information on how a designer should decide on how many indexes to provide per table.
Example 1 – Consider the following relational database for the Super Baseball League. It keeps track of teams in the league, coaches and players on the teams, work experience of the coaches, bats belonging to each team, and which players have played on which teams. Note the following facts about this environment:
Firstly a relational database contains a set of tables which basically are linked collectively by the relationships between the tables. Also it is also known as reason such as a database is called relational database.