{"id":3519,"date":"2022-09-05T18:15:37","date_gmt":"2022-09-05T18:15:37","guid":{"rendered":"https:\/\/databasetown.com\/?p=3519"},"modified":"2023-01-15T21:00:15","modified_gmt":"2023-01-15T21:00:15","slug":"relational-database-model-operations-constraints","status":"publish","type":"post","link":"https:\/\/databasetown.com\/relational-database-model-operations-constraints\/","title":{"rendered":"Relational Database (Model, Operations & Constraints)"},"content":{"rendered":"\n
Relational databases are used for storing and organizing data in a way that can be easily accessed, updated, and queried. They consist of tables. A table is a set of data values that are organized in columns and rows. The cells are where the rows and columns intersect.<\/p>\n\n\n\n
The relational model is a data model for storing and retrieving information. It is the most widely used database model in the world, with over 90% of commercial databases using it. The term “relational” refers to how data in tables are related to one another through common field names and similar rows structure. Relational databases are made up of relations that consist of columns<\/strong> (or attributes) and rows<\/strong> (also called tuples or records). <\/p>\n\n\n\n In the relational database model, each piece of data is stored in a row (or record) and columns (or fields). Each row is linked to other rows via unique IDs. This eliminates duplication of data. The database performs automatic work here: if the ID changes at any time (e.g., due to updating), then the link will be updated accordingly.<\/p>\n\n\n\n The basic structure consists of:<\/p>\n\n\n\n Attributes<\/strong> can be either single-valued or multi-valued, while values <\/strong>correspond to specific objects like strings or integers. Relationships <\/strong>between different entities can be represented as links where each link has its own unique identifier number called a primary key which enables retrieval from other<\/p>\n\n\n\n One example from this relational model would be an email address table where each row contains contact information such as name, company address etc., just like you might find on your computer desktop’s contacts list applet (the ones usually found at top right). You can also think about any spreadsheet document which has multiple cells separated by column headers: there are many ways these could represent different types of individuals who<\/p>\n\n\n\n The relational model, or RM for short, represents the database as a collection of related tables. The columns in these tables denote entities and their relationships to one another. For example: House has-a Street will be represented by two rows – one representing the “House” entity with three values (name=house), streetName=”Street”, address=”123 Main St.”) and other row defining an instance of its relationship to Street(“has-a”)with value (“street”).<\/p>\n\n\n\n In the relational model, four types of operations are performed.<\/p>\n\n\n\n The data is stored in a structured format i.e. in columns and rows. In this type of storage, we can easily access the values. It is called a relational database because the values within the same table are closely related to each other. Tables within the database can also be related to each other. We can run different queries to fetch data or some specific value from multiple tables.<\/p>\n\n\n\n In the database, the data is stored in a file while in a relational database the data is stored in the form of tables and rows. Unlike the database, we can fetch multiple data items in a relational database. <\/p>\n\n\n\n Database, usually, have a small quantity of data while relational database can deal with large amounts of data.<\/p>\n\n\n\n A number of relational database software are available in the market. We have listed some popular ones.<\/p>\n\n\n\n You can see the worldwide popularity of relational databases here.<\/strong><\/a><\/p>\n\n\n\n No, Python is an interpreted programming language. Python isn’t a relational database, but it’s very good at extracting information from them. Pandas library (or some other library) is used to connect the python to a relational database for analysis purpose.<\/p>\n\n\n\nID<\/strong><\/td> Product Name<\/strong><\/td> Weight (g)<\/strong><\/td> Pack<\/strong><\/td><\/tr> 701<\/td> Honey<\/td> 500<\/td> 12<\/td><\/tr> 702<\/td> Honey<\/td> 1000<\/td> 6<\/td><\/tr> 703<\/td> Lentils<\/td> 250<\/td> 4<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n <\/figure>\n\n\n\n
Terminologies Used in Relational Model<\/h3>\n\n\n\n
\n
Integrity Constraints<\/h3>\n\n\n\n
\n
Operations performed in Relational Model <\/h3>\n\n\n\n
\n
Why is it called a relational database?<\/h2>\n\n\n\n
What is the difference between database and relational database?<\/h2>\n\n\n\n
List of popular relational database<\/h2>\n\n\n\n
\n
Is Python a relational database?<\/h2>\n\n\n\n