What should I look towards to create an easily maintainable news page? [closed] - html

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I want to create a news page on my website but I cant figure out how I should make it easily manageable.
The idea would be to have the latest news appear at the top and for it to knock the older news further down as new news is added.
Someone mentioned mySQL, had a little look but seemed quite complicated for what I want to do.
Really old news would go into a drop down menu, so to save space/loading etc

I'm going to assume that given you've just tagged HTML and CSS and you obviously aren't using a database that this is a basic hand coded site.
If you aren't going to use a database (honestly this is probably the right approach) you're at least going to need a dynamic language, the easiest to accomplish it would be PHP.
This is the kind of thing that CMS's like WordPress do right out of the box. CMS is Content Management System, and your news page is exactly that.
It would be relatively quick and painless to write for even a moderate PHP developer. If you didn't want to use a database (you should) you could load flat documents then create each news article as it's own document. Parsing the creation date and sorting, then relegating to a dropdown is pretty basic stuff.

You'll need a database and a server-side programming language.
HTML and CSS just format what the website looks like, they don't possess the capability to store and retrieve data under certain conditions.
PHP is one such example of a server-side language. While I don't think PHP is a very good language, it's kind of the best in the world for teaching beginners because it puts into context the logic of what's happening by making you deliberately write it out. Other ways of making web applications like Ruby on Rails aren't so good because they're based on the premise of following conventions and automatically generating groups of files for you, what you're actually doing might only come into context much later down the road.
MySQL is a Structured Query Language and it's used to query information, most usually from databases. You'll need to use an SQL in some regard in conjunction with your server-side language.
Look up some tutorials on creating databases and querying information from them, preferably starting out with a language like PHP. This will probably be under a title like "Create a news website".

Related

Use of MYSQL to edit elements in HTML [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
So, I'm making a website for a music collective that I'm in, and on that site there's a page where you can see all the albums (a simple 300 x 300px hyper link image) that redirects you to a bandcamp page.
As of now, if I want to add another album I must go into the HTML file and manually add it. My question is, is it possible to use MYSQL to add albums?
And by that I mean that everytime I "add an album" in MYSQL it will edit the HTML automatically? And if so, how do I do?
This is how the code looks:
HTML
<div class="product-box fade-in-drop">
<!-- album -->
<div class ="album">
<img src="exmaple.com">
</div>
</div>
EDIT:
It might be worth noting that I use a web hosting service that has a cPanel so I have database access, I just don't know how to write the code to make my plan possible.
I apologize if I am assuming too much here.
Your question implies that you want to move from a static website to a dynamic one where, instead of the HTML having static data, your information comes to the page by way of a web server making a connection to a database via some sort of intermediary, third party software. This is much more complicated than what you are doing now, but it is certainly not the most difficult task for creating a simple website that has outgrown the needs of a static page.
Here is a nice tutorial I have found, for an introduction. But I would recommend getting a book on LAMP development, particularly one that is more current than that article. You also might want to look into Drupal, though that might be overkill depending upon how simple your needs are.
It's not possible with pure HTML. You need some server side logic to query the database, like PHP, python, perl etc., and use the data to build the HTML dynamically.
You can't use HTML5 / Javascript dynamics because they are run by the client, your database is on the server.
What you can do based on the information you have given us is take the data that exists currently in the cPanel database access and find some way to copy that data into MySQL whether it's importing it directly, using Excel, or whatever. That would be the best way to go and then set up a connection to the MySQL database server. As mentioned you can use PHP, python, etc. to manipulate that data and have access to read/write that data through your site. Just by googling the basics you should be set on the right path to get a working dynamic website.

Can someone explain the concept of MySQL to me? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
First and foremost, I do understand that MySQL is used for databases, and can be used to update content on a website. What I don't understand is how you actually are able to get MySQl to change the content on a site automatically, or if it is even possible. I really am a beginner so sorry if this question comes comes as noobish. I really don't understand the concept of MYSQL all that much, as I don't understand how websites are able to change the content on their main page daily using MYSQL, Now what I am saying is, if I were to have a website with new information every single day on the main page, and used Mysql as a database, would it be possible to upload for example 7 html files one for each day of the week,to the database, and have each of them displayed on different days, automatically? (This is all a presumption as I don't know how to get the data into a mySql database and if you upload a html file to the database) Sorry for the confusing question and thanks in advance for all the help.
As you mentioned, MySQL is just a database. You could in theory use Oracle or SQL Server or PostgreSQL, which are all MySQL's "competitors", if you will, in the database space.
What's generally done is that there is a program that sits alongside the web server on the box that reads the content from the database and then translates that content into HTML, where it's served up to you as a web page. This program is usually referred to as a Content Management System or "CMS" (You might want to Wikipedia for "Drupal", which is one popular CMS out there).
Web pages are rarely stored as whole HTML files in MySQL. Usually what's done is that the content (paragraphs of text, comments on a blog, upvotes and downvotes) are stored in some structured format, and the CMS takes that structured data from the database and presents it to you. The upshot of structuring the data in this way is that end-users who want to update content don't have to worry about coding the HTML -- they just write their content and the CMS takes care of the presentation bits.
MySQL is a database server, and doesn't have any web-related functionality built in. It's just a place to store data (though it's very good at that - it, and other relational database management systems like SQL Server and Oracle, attempt to optimize data storage and retrieval).
There's a layer between the database and the web server that you're missing - the web application framework. That's where your logic goes. If you want to display different data based on the day of the week, you'd program that in your web application:
// ludicrously simplified
if (Date.DayOfWeek = Friday)
Output "<html>TGIF!</html>"
PHP and ASP.NET are the best known languages for this kind of development.
There are a number of frameworks out there that simplify certain tasks. You can write HTML more or less directly from your code, using the languages above and the right runtimes (the ASP.NET runtime comes with Microsoft's IIS web server, and Zend is popular for PHP). Or with the right tools, you can specify the content each user sees at a very high level.
You can have some code/algorithm to rotate the news (articles) in your home page. Those articles can be inserted/stored into your MySQL database.
What I mean by rotate is that for each day a given article is retrieved from the database and shown on your homepage.
The articles can be inserted by hand on a given table in your MySQL database or they can be inserted using some kind of front end (a user form) for that purpose.
For a complete overview of MySQL, this page on Wikipedia is a good hit.
I don't know if the other answers have helped you understand, so I'll add a very simplistic answer that I hope will get you over the initial bump.
MySQL will act as an online storage space for you, but it won't provide the website.
In between MySql and the website, there will need to be a program of some sort.
There are many, many different languages and frameworks available to do this, and it's essentially the entire business of web developers to create these programs.
In your particular case, you asked about uploading different pages to MySql and having them displayed for each day of the week.
You wouldn't need to use MySQL or a database at all for this, a few lines of code in most common languages would do this for you, and adding a database would simply add complexity where it wasn't needed.

HTML Update News Page

I have a site which is basically a few HTML Pages. I no have a requirement to create a facility where a site admin can create and maintain a News section.
I am just pondering what my options are? It needs to be a fairly simple process to maintain news items and ideally not be database driven. Although I'm struggling to see how I can achieve this.
Any help is much appreciated.
Thanks
CuteNews should do what you want. It uses a flat file to store the news items so you don't need a database.
Not sure I understood well, but if you mean you have news in static HTML pages and you want to update them, without doing it by hand, you would have to write a script that creates new ones or updates the existing ones, but that's all too complicated in my oppinion.
The way to go is Server-side language (PHP, ASP etc) and database (MySQL, PostgreSQL etc).

Open source ER diagramming tool for mysql [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 9 days ago.
Improve this question
I want to reverse engineer (import into diagram form) the database definition dump of a database I have, then since no foreign keys are defined in this particular database, I want to be able to manually create the table to table key mappings (using crow feet notation if possible).
I've taken a look at MySQL Workbench, and it gets me 85% of the way there.
The nice little relationship lines won't show up though, and the auto arrange is horrible. A quick search of google turns up several other options, so I can evaluate these on my own, but:
Can I get some feedback from you guys for which are your favorite tools to use for this scenario? Why do you like that(your) particular tool?
My intended purpose is to take a legacy database, and train jr. engineers on the organization of the DB. Visual aids are nifty. My fallback option is to recreate an ER diagram by hand. Not fun for 250+ tables.
You might check out DBDesigner ...
Now known as MySQL Workbench
http://dev.mysql.com/downloads/workbench/5.0.html
SchemaCrawler is a free, open source tool that can generate E-R diagrams, with the help of GraphViz. You can use regular expressions to select the tables and columns you want to display. Relationships are inferred from commonly used naming conventions.
I've had some success using two commercial (but relatively cheap!) tools- but I still haven't found any really solid open source ones after months of looking.
MyEclipseIDE is a subscription product, I think it's around $60 a year. It's a set of bundled plugins for Eclipse, one of them is an ERD analyzer that works OK. If you're programming in Java (or another eclipse-supported language), it may be worth it.
SQLMaestro for MySQL: This one is a bit more expensive, with a $99 noncommercial / $179 single seat license. The ERD it generates is much better, and it provides other tools that make it easier to administer and maintain a more complex schema.
My understanding is that MySQL Workbench is still under active development, but they've been banging on it for a long time without really wrapping it up. Maybe now that Sun owns them, they'll get it together.
Check out Vertabelo.
It's an online database modeler that works under Chrome browser.
It provides you with:
DB model versioning and validation,
generating SQL scripts for particular database,
supports collaboration - allows sharing DB model with other members of your team,
supports reverse enginnering.
Moreover it's free of charge.
Generate ERD with PHPMyAdmin is also a better option. PHPMyadmin added this functionality from version 3.4
detail step to generate ERD : http://goo.gl/0z3vFE
You can refer to PHPMyAdmin documentation for more info: http://www.phpmyadmin.net/documentation/#pmadb
I am using Mysql Workbench 6.1. By default the diagram will look crunched for large number of tables, making it difficult to figure out relationship between tables. Many tables will overlay on other tables. This is because, the default layout size is small.
In the menu, Go to Model >> "Diagram properties and size".
Change width and size to some thing big (for example width 23 and height 5) -
Then in the menu, Go to Arrange >> Autolayout.
Now we should see a clean diagram with all the relations. Now we can re-adjust width and height, more meaningfully
I use dbeaver which can manage mysql and many others like postgresql
Useful link :
https://dbeaver.com/docs/wiki/Database-Structure-Diagrams/

Teach an M.B.A. the intricacies of Microsoft SQL Server (and how's it different from MySQL?) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
I haven't had to interact w/MSSQL much in my development career, though I've spent many an hour working with MySQL.
An M.B.A. friend of mine is starting a job where she needs to gain functional knowledge of MSSQL Server, and I'd really like to help.
What are the differences between MSSQL and MySQL?
How would you recommend a non-technical person go about learning the ups and downs of MSSQL Server?
[update] Previous database design skills are naught. I've given her to short and long on what a database does from a high-level.
I'd love to say, "you can't". But that would be untrue (or at least mean).
If she has any background with database design at all, then this is merely a new RDBMS.
If she's never done database design, the place to start is not so much with MS SQL, but with how databases work, in my opinion.
Database Design for Mere Mortals is a good place to start. From there I'd move to an MS SQL -specific book, such as Microsoft SQL Server Unleashed.
Download the free SQL Express and start using it. Microsoft also has several video tutorials that would be helpful. They start pretty much from the beginning with "What is a database" and move to more advanced topics.
From the perspective of the database user, the backend is generally irrelevant if they understand some basic concepts.
First and most important concept for the non-technical user is GIGO (Garbage in Garbage out). Bad data is useless data. Check everything you enter into a database for correctness. You really don't want the customer's product to be mailed to San Diego, VA instead of CA.
Then next most important thing is to really understand your user interface and how it works. I've spent a lot of time fixing up junk because users didn't know what they were supposed to put in fields in databases (it would have helped if the developers had not allowed non-email type data to be entered into the email field, but you can't send an email to 757-111-6789). It is never a good idea to put the wrong kind of data into a field because you don't have another place to put it. As a user, you may have no idea what the database is going to use that data for and wrong data can completely stop a process or break something really important. If you don't know what to put in a field, then ask. Don't put junk into a field just because it is required. (Hint, it is required for a reason, that usually means this is data critical to the operation of the database, do not fake this information.)
Now if this person is doing reporting, then the critical concepts become understanding boolean algebra and a very strong undertanding of joins. If you have these two concepts down pat, you have 80-90% of what you need to query a database.
The specifics of the database supported also become important. You need to understand what is stored in what tables (or what views to use) and how they relate to each other. Coming into a new job, I would sit down with the developers if possible and get an overview of the design and whatI would need to know to get the data. I would review existing report queries to see how the data is currently being retrieved and use that to ask questions if I don't understand what the person did. Even a database expert will need to spend some time doing this when faced with a new database, so there is no reason to be shy in asking these questions when you are new.
Final thing is to learn how to report a problem to the developers. Problems that are not reported don't get fixed! Problems that are not reproducable because the user didn't provide screen shots and a context for what she was doing when the error occurred, don't get fixed either. New data fields that are needed as business requirements change, don't get added to the database until the developers know about them (Please ask for a Notes field if you need it instead of entering junk data into a field like email that you personally are not using for instance). New business requirements often require a lot of work in the backend to change how things work, it isn't as simple as adding a field on a form. Please be aware of that too when you make requests.
I learned from Robert Vieira's Professional SQL Server 2000 Programming -- well written and comprehensive. I am pretty sure the 2005 version is very similar, just updated. Despite the 'professional' label, I found it a great intro (I had practically no database experience at the time).
Also I second Erikk's comment. Download SQL Express and PLAY!