Be a Better Developer: The skills and behaviours of great software developers by Patrick Haston
Author:Patrick Haston [Haston, Patrick]
Language: eng
Format: epub
Publisher: UNKNOWN
Published: 2017-02-01T08:00:00+00:00
Text
Graphics
Photos
Video
Audio
Maps
Code
User
Some of these items could be handled in the same way, for example Graphics and Photos are often stored in the same file formats. This might allow you to store this information in the same database table.
The list is mainly a list of the different elements that make up a web page, and a few moments of reflection should allow you to add a few other elements, such as CSS and JavaScript.
At this stage I find it helpful to think about how these things relate to each other. Starting at the top we have web pages, so we could have a table called web_pages (note the underscore: most databases don’t allow spaces in table names). Web pages are part of a web site, and it would be a strange CMS that didn’t support multiple websites. So already we have another possible table: web_sites. A web site can have multiple web pages. Although it is possible for exactly the same page to appear on different sites, this is probably an unlikely scenario. Because one web site can have many pages this is called a one-to-many relationship.
Web pages tend to have text. This could be a single block of text, stored as html. If there is only ever one block of text for each web page, this would be a one-to-one relationship. One-to-one relationships can be an indication that two things can be stored together in the same table, so perhaps our block of text is an attribute of a web page and not a different table.
Web pages can obviously include many images, so these will need to be stored. The same image can appear on multiple pages, so we have a many-to-many relationship. Relational databases don’t cope well with many-to-many relationships, so a third table is introduced. This is often called an intersection table, and in our example it would log which images appear on which web pages.
Intersection tables often take their name from the two tables being linked, so ours could be web page images. Web_page_images would have an entry for each that appeared on each page. At a minimum the entry in web_page_images would contain the id of the web page and the id of the image. Intersection tables often contain interesting information, and in our example it could be information about the positioning of the image on the page.
In relational databases there are only two types of relationship allowed: one-to-one and one-to-many. Many-to-many relationships have to be resolved to two one-to-many relationships by adding an intersection table. It’s remarkably simple yet very powerful.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Deep Learning with Python by François Chollet(12568)
Hello! Python by Anthony Briggs(9913)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9795)
The Mikado Method by Ola Ellnestam Daniel Brolund(9777)
Dependency Injection in .NET by Mark Seemann(9337)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8295)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7763)
Grails in Action by Glen Smith Peter Ledbrook(7696)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7557)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(7054)
Microservices with Go by Alexander Shuiskov(6817)
Practical Design Patterns for Java Developers by Miroslav Wengner(6734)
Test Automation Engineering Handbook by Manikandan Sambamurthy(6675)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6409)
Angular Projects - Third Edition by Aristeidis Bampakos(6079)
The Art of Crafting User Stories by The Art of Crafting User Stories(5607)
NetSuite for Consultants - Second Edition by Peter Ries(5547)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(5347)
Kotlin in Action by Dmitry Jemerov(5062)
