Friday, December 20, 2019
Features Of A Relational Database - 2399 Words
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
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.